From: Siva Durga Prasad Paladugu Date: Fri, 6 Nov 2015 10:16:26 +0000 (+0530) Subject: usb: dwc3: Fix issue with dwc3_readl and dwc3_writel X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e6e658699abff045efedcbecf9feb13379a49109;p=thirdparty%2Fu-boot.git usb: dwc3: Fix issue with dwc3_readl and dwc3_writel 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 Signed-off-by: Michal Simek --- diff --git a/drivers/usb/dwc3/io.h b/drivers/usb/dwc3/io.h index eef2b2ca10c..ddbfb68ce08 100644 --- a/drivers/usb/dwc3/io.h +++ b/drivers/usb/dwc3/io.h @@ -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); }