mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ohci-hcd: use dma_flush/inv_range to allow using the driver with enabled MMU
@ 2012-05-14  8:39 Jan Luebbe
  0 siblings, 0 replies; only message in thread
From: Jan Luebbe @ 2012-05-14  8:39 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
---
 drivers/usb/host/ohci-hcd.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index f103101..05e4094 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -859,6 +859,8 @@ static void td_fill(struct ohci *ohci, unsigned int info,
 
 	td->hwNextTD = virt_to_phys((void *)m32_swap((unsigned long)td_pt));
 
+	dma_flush_range((unsigned long)data, (unsigned long)(data + len));
+
 	/* append to queue */
 	td->ed->hwTailP = td->hwNextTD;
 }
@@ -1555,6 +1557,8 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
 	dev->status = stat;
 	dev->act_len = urb->actual_length;
 
+	dma_inv_range((unsigned long)buffer, (unsigned long)(buffer + transfer_len));
+
 	pkt_print(urb, dev, pipe, buffer, transfer_len,
 		  setup, "RET(ctlr)", usb_pipein(pipe));
 
-- 
1.7.9.5


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-14  8:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-14  8:39 [PATCH] ohci-hcd: use dma_flush/inv_range to allow using the driver with enabled MMU Jan Luebbe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox