From 6ce61519dbb587c654c96e896f1210299ad76e63 Mon Sep 17 00:00:00 2001 From: Siva Durga Prasad Paladugu Date: Fri, 26 Jun 2015 15:03:50 +0530 Subject: [PATCH] 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 --- drivers/usb/dwc3/io.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) -- 2.47.3