[PATCH v2 23/27] usb: gadget: fsl_udc: convert to streaming DMA ops
Lucas Stach
dev at lynxeye.de
Thu Mar 5 13:50:17 PST 2015
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 at lynxeye.de>
---
drivers/usb/gadget/fsl_udc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/gadget/fsl_udc.c b/drivers/usb/gadget/fsl_udc.c
index f6004b4..19f3da6 100644
--- a/drivers/usb/gadget/fsl_udc.c
+++ b/drivers/usb/gadget/fsl_udc.c
@@ -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;
--
2.1.0
More information about the barebox
mailing list