[PATCH v2 24/27] usb: host: ehci: convert to streaming DMA ops
Lucas Stach
dev at lynxeye.de
Thu Mar 5 13:50:18 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/host/ehci-hcd.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 89a8ffb..abaeaf2 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -30,7 +30,6 @@
#include <errno.h>
#include <of.h>
#include <usb/ehci.h>
-#include <asm/mmu.h>
#include <linux/err.h>
#include "ehci.h"
@@ -331,7 +330,9 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer,
struct qTD *qtd = &ehci->td[i];
if (!qtd->qtd_dma)
continue;
- dma_flush_range(qtd->qtd_dma, qtd->qtd_dma + qtd->length);
+ dma_sync_single_for_device((unsigned long)qtd->qtd_dma,
+ qtd->length,
+ DMA_BIDIRECTIONAL);
}
}
@@ -372,7 +373,8 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer,
struct qTD *qtd = &ehci->td[i];
if (!qtd->qtd_dma)
continue;
- dma_inv_range(qtd->qtd_dma, qtd->qtd_dma + qtd->length);
+ dma_sync_single_for_cpu((unsigned long)qtd->qtd_dma,
+ qtd->length, DMA_BIDIRECTIONAL);
}
}
--
2.1.0
More information about the barebox
mailing list