From 5c0beb5c58c86d2a6d12dee6330dc85554de5c60 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Tue, 24 Mar 2015 20:07:35 -0600 Subject: [PATCH] usb: dwc2: use phys_to_bus/bus_to_phys 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 --- drivers/usb/host/dwc2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c index 5f4ca7abf7..8f7c269dd1 100644 --- a/drivers/usb/host/dwc2.c +++ b/drivers/usb/host/dwc2.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -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 |