diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-08 08:57:48 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-08 08:58:24 -0500 |
commit | 28257f7fdee0facc3b7f934e82c2485f27120d41 (patch) | |
tree | 6b018506ca7fe825619f36f52922d83baf1bfde4 /arch | |
parent | a0b7bd0829194c03921915a68ee4a331ee394223 (diff) |
ARM: io: simplify ioremap* and iounmap definitions
We don't need to repeat the same definitions of the ioremap*(),
once in terms of __arch_ioremap() and again in terms of __arm_ioremap().
Instead, if the platform hasn't provided an __arch_ioremap, define
this to be __arm_ioremap, and only define the ioremap*() set using
__arch_ioremap.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/io.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 91be1f8c2d25..20e0f7c9e03e 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h | |||
@@ -241,18 +241,15 @@ extern void _memset_io(volatile void __iomem *, int, size_t); | |||
241 | * | 241 | * |
242 | */ | 242 | */ |
243 | #ifndef __arch_ioremap | 243 | #ifndef __arch_ioremap |
244 | #define ioremap(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE) | 244 | #define __arch_ioremap __arm_ioremap |
245 | #define ioremap_nocache(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE) | 245 | #define __arch_iounmap __iounmap |
246 | #define ioremap_cached(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE_CACHED) | 246 | #endif |
247 | #define ioremap_wc(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE_WC) | 247 | |
248 | #define iounmap __iounmap | ||
249 | #else | ||
250 | #define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE) | 248 | #define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE) |
251 | #define ioremap_nocache(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE) | 249 | #define ioremap_nocache(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE) |
252 | #define ioremap_cached(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_CACHED) | 250 | #define ioremap_cached(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_CACHED) |
253 | #define ioremap_wc(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_WC) | 251 | #define ioremap_wc(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_WC) |
254 | #define iounmap __arch_iounmap | 252 | #define iounmap __arch_iounmap |
255 | #endif | ||
256 | 253 | ||
257 | /* | 254 | /* |
258 | * io{read,write}{8,16,32} macros | 255 | * io{read,write}{8,16,32} macros |