diff options
Diffstat (limited to 'include/asm-arm/io.h')
-rw-r--r-- | include/asm-arm/io.h | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index 5f60b4220906..8261ff9e7955 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h | |||
@@ -56,13 +56,22 @@ extern void __raw_readsl(const void __iomem *addr, void *data, int longlen); | |||
56 | 56 | ||
57 | /* | 57 | /* |
58 | * Architecture ioremap implementation. | 58 | * Architecture ioremap implementation. |
59 | * | ||
60 | * __ioremap takes CPU physical address. | ||
61 | * | ||
62 | * __ioremap_pfn takes a Page Frame Number and an offset into that page | ||
63 | */ | 59 | */ |
64 | extern void __iomem * __ioremap_pfn(unsigned long, unsigned long, size_t, unsigned long); | 60 | #define MT_DEVICE 0 |
65 | extern void __iomem * __ioremap(unsigned long, size_t, unsigned long); | 61 | #define MT_DEVICE_NONSHARED 1 |
62 | #define MT_DEVICE_CACHED 2 | ||
63 | #define MT_DEVICE_IXP2000 3 | ||
64 | /* | ||
65 | * types 4 onwards can be found in asm/mach/map.h and are undefined | ||
66 | * for ioremap | ||
67 | */ | ||
68 | |||
69 | /* | ||
70 | * __arm_ioremap takes CPU physical address. | ||
71 | * __arm_ioremap_pfn takes a Page Frame Number and an offset into that page | ||
72 | */ | ||
73 | extern void __iomem * __arm_ioremap_pfn(unsigned long, unsigned long, size_t, unsigned int); | ||
74 | extern void __iomem * __arm_ioremap(unsigned long, size_t, unsigned int); | ||
66 | extern void __iounmap(volatile void __iomem *addr); | 75 | extern void __iounmap(volatile void __iomem *addr); |
67 | 76 | ||
68 | /* | 77 | /* |
@@ -203,14 +212,14 @@ extern void _memset_io(volatile void __iomem *, int, size_t); | |||
203 | * | 212 | * |
204 | */ | 213 | */ |
205 | #ifndef __arch_ioremap | 214 | #ifndef __arch_ioremap |
206 | #define ioremap(cookie,size) __ioremap(cookie,size,0) | 215 | #define ioremap(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE) |
207 | #define ioremap_nocache(cookie,size) __ioremap(cookie,size,0) | 216 | #define ioremap_nocache(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE) |
208 | #define ioremap_cached(cookie,size) __ioremap(cookie,size,L_PTE_CACHEABLE) | 217 | #define ioremap_cached(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE_CACHED) |
209 | #define iounmap(cookie) __iounmap(cookie) | 218 | #define iounmap(cookie) __iounmap(cookie) |
210 | #else | 219 | #else |
211 | #define ioremap(cookie,size) __arch_ioremap((cookie),(size),0) | 220 | #define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE) |
212 | #define ioremap_nocache(cookie,size) __arch_ioremap((cookie),(size),0) | 221 | #define ioremap_nocache(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE) |
213 | #define ioremap_cached(cookie,size) __arch_ioremap((cookie),(size),L_PTE_CACHEABLE) | 222 | #define ioremap_cached(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_CACHED) |
214 | #define iounmap(cookie) __arch_iounmap(cookie) | 223 | #define iounmap(cookie) __arch_iounmap(cookie) |
215 | #endif | 224 | #endif |
216 | 225 | ||