]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
usb: dwc3: Fix issue with dwc3_readl and dwc3_writel
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Fri, 6 Nov 2015 10:16:26 +0000 (15:46 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 6 Nov 2015 10:48:48 +0000 (11:48 +0100)
This patch fixes the issue with dwc3_readl and dwc3_writel
The issue was not rootcaused yet and hence adding temporary
hack by reverting the part of the patch with below commit ID
"b2f6b30ab757cf84f03d577cad936f0d2fb25091"

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 eef2b2ca10c512db513c2ea3bb4b29367885f67b..ddbfb68ce089920a3bddbad5839fc2ae7e0acbc9 100644 (file)
@@ -23,7 +23,7 @@
 #define        CACHELINE_SIZE          CONFIG_SYS_CACHELINE_SIZE
 static inline u32 dwc3_readl(void __iomem *base, u32 offset)
 {
-       unsigned long offs = offset - DWC3_GLOBALS_REGS_START;
+       u32 offs = offset - DWC3_GLOBALS_REGS_START;
        u32 value;
 
        /*
@@ -31,7 +31,7 @@ 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.
         */
-       offs += (unsigned long)base;
+       offs += base;
        value = readl(offs);
 
        return value;
@@ -39,14 +39,14 @@ static inline u32 dwc3_readl(void __iomem *base, u32 offset)
 
 static inline void dwc3_writel(void __iomem *base, u32 offset, u32 value)
 {
-       unsigned long offs = offset - DWC3_GLOBALS_REGS_START;
+       u32 offs = offset - DWC3_GLOBALS_REGS_START;
 
        /*
         * We requested the mem region starting from the Globals address
         * space, see dwc3_probe in core.c.
         * However, the offsets are given starting from xHCI address space.
         */
-       offs += (unsigned long)base;
+       offs += base;
        writel(value, offs);
 }