[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] [PATCH] EHCI flush data cache



Commit message:

Flush data cache before filling buffer addresses in transfer descriptor.
Contributed by David Galvez.
diff -r 3cd8ce205219 -r f5c9b8a420d3 sys/usb/src.km/ucd/ehci/ehci-hcd.c
--- a/sys/usb/src.km/ucd/ehci/ehci-hcd.c	Fri Nov 21 18:01:40 2014 +0100
+++ b/sys/usb/src.km/ucd/ehci/ehci-hcd.c	Fri Nov 21 18:25:03 2014 +0100
@@ -354,6 +354,8 @@
 	if (addr & (M68K_CACHE_LINE_SIZE - 1))
 		DEBUG(("EHCI-HCD: Misaligned buffer address (0x%08lx)\n", buf));
 
+	cpush(buf, ALIGN((unsigned long)buf + sz, M68K_CACHE_LINE_SIZE));
+
 	idx = 0;
 	while(idx < 5)
 	{