summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-06-20 18:08:46 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-06-30 12:46:25 +0200
commit0128d993522ae67a84cb2760b5609eaab5e3224d (patch)
tree182e2b51222f598c72440dcf3d3d04922f05d55a /drivers
parent0c35d2210e2020cd8684b86fb4f2cfea663b223f (diff)
downloadbarebox-0128d993522ae67a84cb2760b5609eaab5e3224d.tar.gz
barebox-0128d993522ae67a84cb2760b5609eaab5e3224d.tar.xz
USB ehci: Use dma coherent buffers for qh/qtd
There's no point in syncing them manually. Instead, use dma_alloc_coherent and skip the manual flushing/invalidating. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/ehci-hcd.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index a2473a9141..425406d443 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;