]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
usb: dwc3: Modify the dwc3_readl and dwc3_writel
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Fri, 26 Jun 2015 09:33:50 +0000 (15:03 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 10 Aug 2015 05:31:57 +0000 (07:31 +0200)
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 <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/usb/dwc3/io.h

index 5042a2419369416db4abe8b6dca2a7b66c0885f9..ddbfb68ce089920a3bddbad5839fc2ae7e0acbc9 100644 (file)
@@ -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)