diff options
author | Lucas Stach <dev@lynxeye.de> | 2015-03-05 22:50:18 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-03-06 07:53:48 +0100 |
commit | 602d399e63e6a42535f3208490ad1e63e6ca3470 (patch) | |
tree | e78ee2833cc115a7e6b1a2df65a1ab33c480d501 | |
parent | 3f1dee9c76ed8e878041bc1afb9c8db8f2c23b77 (diff) | |
download | barebox-602d399e63e6a42535f3208490ad1e63e6ca3470.tar.gz barebox-602d399e63e6a42535f3208490ad1e63e6ca3470.tar.xz |
usb: host: ehci: 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>
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 89a8ffb2a8..abaeaf2aa7 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); } } |