From: Siva Durga Prasad Paladugu Date: Fri, 26 Jun 2015 09:33:50 +0000 (+0530) Subject: usb: dwc3: Modify the dwc3_readl and dwc3_writel X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6ce61519dbb587c654c96e896f1210299ad76e63;p=thirdparty%2Fu-boot.git usb: dwc3: Modify the dwc3_readl and dwc3_writel Modify the dwc3_readl and dwc3_writel to calculate the register offsets before invking the readl. This patch is just a workaround to fix the issue of raising an exception in the previous invokation method. Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- diff --git a/drivers/usb/dwc3/io.h b/drivers/usb/dwc3/io.h index 5042a241936..ddbfb68ce08 100644 --- a/drivers/usb/dwc3/io.h +++ b/drivers/usb/dwc3/io.h @@ -31,7 +31,8 @@ static inline u32 dwc3_readl(void __iomem *base, u32 offset) * space, see dwc3_probe in core.c. * However, the offsets are given starting from xHCI address space. */ - value = readl(base + offs); + offs += base; + value = readl(offs); return value; } @@ -45,7 +46,8 @@ static inline void dwc3_writel(void __iomem *base, u32 offset, u32 value) * space, see dwc3_probe in core.c. * However, the offsets are given starting from xHCI address space. */ - writel(value, base + offs); + offs += base; + writel(value, offs); } static inline void dwc3_flush_cache(int addr, int length)