]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
usb: dwc2: use phys_to_bus/bus_to_phys
authorStephen Warren <swarren@wwwdotorg.org>
Wed, 25 Mar 2015 02:07:35 +0000 (20:07 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 19:47:08 +0000 (21:47 +0200)
Use of these APIs is required on the Raspberry Pi. With this change, USB
on RPi1 should be more reliable, and USB on the RPi2 will start working.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
drivers/usb/host/dwc2.c

index 5f4ca7abf7bf76f282b992639f09779eb629c924..8f7c269dd1a5f5085278f232beb797a52be116de 100644 (file)
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <usb.h>
 #include <malloc.h>
+#include <phys2bus.h>
 #include <usbroothubdes.h>
 #include <asm/io.h>
 
@@ -795,7 +796,8 @@ int chunk_msg(struct usb_device *dev, unsigned long pipe, int *pid, int in,
                if (!in)
                        memcpy(aligned_buffer, (char *)buffer + done, len);
 
-               writel((uint32_t)aligned_buffer, &hc_regs->hcdma);
+               writel(phys_to_bus((unsigned long)aligned_buffer),
+                      &hc_regs->hcdma);
 
                /* Set host channel enable after all other setup is complete. */
                clrsetbits_le32(&hc_regs->hcchar, DWC2_HCCHAR_MULTICNT_MASK |