There's no point in syncing them manually. Instead, use
dma_alloc_coherent and skip the manual flushing/invalidating.

Signed-off-by: Sascha Hauer <[email protected]>
---
 drivers/usb/host/ehci-hcd.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index a2473a9..425406d 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -148,9 +148,6 @@ static void cache_qh(struct ehci_priv *ehci, int flush)
 {
        int i;
 
-       flush_invalidate(ehci->qh_list, sizeof(struct QH) * NUM_QH, flush);
-       flush_invalidate(ehci->td, sizeof(struct qTD) * NUM_TD, flush);
-
        for (i = 0; i < NUM_TD; i ++)
                cache_qtd(&ehci->td[i], flush);
 }
@@ -878,8 +875,8 @@ static int ehci_probe(struct device_d *dev)
        ehci->hccr = dev_request_mem_region(dev, 0);
        ehci->hcor = dev_request_mem_region(dev, 1);
 
-       ehci->qh_list = xmemalign(32, sizeof(struct QH) * NUM_QH);
-       ehci->td = xmemalign(32, sizeof(struct qTD) * NUM_TD);
+       ehci->qh_list = dma_alloc_coherent(sizeof(struct QH) * NUM_TD);
+       ehci->td = dma_alloc_coherent(sizeof(struct qTD) * NUM_TD);
 
        host->init = ehci_init;
        host->submit_int_msg = submit_int_msg;
-- 
1.7.10


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

Reply via email to