9
0
Fork 0

usb: gadget: fsl_udc: convert to streaming DMA ops

Move to the common streaming DMA ops in order to get rid of
the direct usage of the ARM MMU functions for the cache
maintenance.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Lucas Stach 2015-03-05 22:50:17 +01:00 committed by Sascha Hauer
parent efac9ca5bd
commit 3f1dee9c76
1 changed files with 4 additions and 4 deletions

View File

@ -568,8 +568,8 @@ static void done(struct fsl_ep *ep, struct fsl_req *req, int status)
dma_free_coherent(curr_td, 0, sizeof(struct ep_td_struct));
}
dma_inv_range((unsigned long)req->req.buf,
(unsigned long)(req->req.buf + req->req.length));
dma_sync_single_for_cpu((unsigned long)req->req.buf, req->req.length,
DMA_BIDIRECTIONAL);
if (status && (status != -ESHUTDOWN))
VDBG("complete %s req %p stat %d len %u/%u",
@ -1251,8 +1251,8 @@ fsl_ep_queue(struct usb_ep *_ep, struct usb_request *_req)
req->ep = ep;
dma_flush_range((unsigned long)req->req.buf,
(unsigned long)(req->req.buf + req->req.length));
dma_sync_single_for_device((unsigned long)req->req.buf, req->req.length,
DMA_BIDIRECTIONAL);
req->req.status = -EINPROGRESS;
req->req.actual = 0;