diff options
Diffstat (limited to 'include/asm-mips/io.h')
-rw-r--r-- | include/asm-mips/io.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index 92ec2618560c..12bcc1f9fba9 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h | |||
@@ -178,6 +178,11 @@ extern void __iounmap(const volatile void __iomem *addr); | |||
178 | static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size, | 178 | static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size, |
179 | unsigned long flags) | 179 | unsigned long flags) |
180 | { | 180 | { |
181 | void __iomem *addr = plat_ioremap(offset, size, flags); | ||
182 | |||
183 | if (addr) | ||
184 | return addr; | ||
185 | |||
181 | #define __IS_LOW512(addr) (!((phys_t)(addr) & (phys_t) ~0x1fffffffULL)) | 186 | #define __IS_LOW512(addr) (!((phys_t)(addr) & (phys_t) ~0x1fffffffULL)) |
182 | 187 | ||
183 | if (cpu_has_64bit_addresses) { | 188 | if (cpu_has_64bit_addresses) { |
@@ -282,6 +287,9 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size, | |||
282 | 287 | ||
283 | static inline void iounmap(const volatile void __iomem *addr) | 288 | static inline void iounmap(const volatile void __iomem *addr) |
284 | { | 289 | { |
290 | if (plat_iounmap(addr)) | ||
291 | return; | ||
292 | |||
285 | #define __IS_KSEG1(addr) (((unsigned long)(addr) & ~0x1fffffffUL) == CKSEG1) | 293 | #define __IS_KSEG1(addr) (((unsigned long)(addr) & ~0x1fffffffUL) == CKSEG1) |
286 | 294 | ||
287 | if (cpu_has_64bit_addresses || | 295 | if (cpu_has_64bit_addresses || |