Commit df38b24fa87ba4c386e50b83befd93d0518b7ea8
1 parent
c72ecbec19
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
ARM: lpc32xx: use __iomem pointers for MMIO
ARM is moving to stricter checks on readl/write functions, so we need to use the correct types everywhere. Cc: Roland Stigge <stigge@antcom.de> Cc: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Showing 2 changed files with 5 additions and 5 deletions Side-by-side Diff
arch/arm/mach-lpc32xx/common.c
... | ... | @@ -177,25 +177,25 @@ |
177 | 177 | |
178 | 178 | static struct map_desc lpc32xx_io_desc[] __initdata = { |
179 | 179 | { |
180 | - .virtual = IO_ADDRESS(LPC32XX_AHB0_START), | |
180 | + .virtual = (unsigned long)IO_ADDRESS(LPC32XX_AHB0_START), | |
181 | 181 | .pfn = __phys_to_pfn(LPC32XX_AHB0_START), |
182 | 182 | .length = LPC32XX_AHB0_SIZE, |
183 | 183 | .type = MT_DEVICE |
184 | 184 | }, |
185 | 185 | { |
186 | - .virtual = IO_ADDRESS(LPC32XX_AHB1_START), | |
186 | + .virtual = (unsigned long)IO_ADDRESS(LPC32XX_AHB1_START), | |
187 | 187 | .pfn = __phys_to_pfn(LPC32XX_AHB1_START), |
188 | 188 | .length = LPC32XX_AHB1_SIZE, |
189 | 189 | .type = MT_DEVICE |
190 | 190 | }, |
191 | 191 | { |
192 | - .virtual = IO_ADDRESS(LPC32XX_FABAPB_START), | |
192 | + .virtual = (unsigned long)IO_ADDRESS(LPC32XX_FABAPB_START), | |
193 | 193 | .pfn = __phys_to_pfn(LPC32XX_FABAPB_START), |
194 | 194 | .length = LPC32XX_FABAPB_SIZE, |
195 | 195 | .type = MT_DEVICE |
196 | 196 | }, |
197 | 197 | { |
198 | - .virtual = IO_ADDRESS(LPC32XX_IRAM_BASE), | |
198 | + .virtual = (unsigned long)IO_ADDRESS(LPC32XX_IRAM_BASE), | |
199 | 199 | .pfn = __phys_to_pfn(LPC32XX_IRAM_BASE), |
200 | 200 | .length = (LPC32XX_IRAM_BANK_SIZE * 2), |
201 | 201 | .type = MT_DEVICE |
arch/arm/mach-lpc32xx/include/mach/hardware.h
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 | /* |
26 | 26 | * This macro relies on fact that for all HW i/o addresses bits 20-23 are 0 |
27 | 27 | */ |
28 | -#define IO_ADDRESS(x) (((((x) & 0xff000000) >> 4) | ((x) & 0xfffff)) |\ | |
28 | +#define IO_ADDRESS(x) IOMEM(((((x) & 0xff000000) >> 4) | ((x) & 0xfffff)) |\ | |
29 | 29 | IO_BASE) |
30 | 30 | |
31 | 31 | #define io_p2v(x) ((void __iomem *) (unsigned long) IO_ADDRESS(x)) |