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 <[email protected]>
---
 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


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to