[PATCH RFT 20/24] usb: gadget: fsl_udc: convert to streaming DMA ops
Lucas Stach
dev at lynxeye.de
Thu Feb 12 13:39:56 PST 2015
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 f9e58bb..9aa313a 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, 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",
@@ -1250,8 +1250,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