diff options
-rw-r--r-- | include/asm-generic/io.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index e0ffa3ddb02a..a1caf2d25d82 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h | |||
@@ -307,7 +307,11 @@ static inline void *phys_to_virt(unsigned long address) | |||
307 | 307 | ||
308 | /* | 308 | /* |
309 | * Change "struct page" to physical address. | 309 | * Change "struct page" to physical address. |
310 | * | ||
311 | * This implementation is for the no-MMU case only... if you have an MMU | ||
312 | * you'll need to provide your own definitions. | ||
310 | */ | 313 | */ |
314 | #ifndef CONFIG_MMU | ||
311 | static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size) | 315 | static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size) |
312 | { | 316 | { |
313 | return (void __iomem*) (unsigned long)offset; | 317 | return (void __iomem*) (unsigned long)offset; |
@@ -326,6 +330,7 @@ static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size) | |||
326 | static inline void iounmap(void *addr) | 330 | static inline void iounmap(void *addr) |
327 | { | 331 | { |
328 | } | 332 | } |
333 | #endif /* CONFIG_MMU */ | ||
329 | 334 | ||
330 | #ifndef CONFIG_GENERIC_IOMAP | 335 | #ifndef CONFIG_GENERIC_IOMAP |
331 | static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) | 336 | static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) |
@@ -342,7 +347,7 @@ extern void ioport_unmap(void __iomem *p); | |||
342 | #endif /* CONFIG_GENERIC_IOMAP */ | 347 | #endif /* CONFIG_GENERIC_IOMAP */ |
343 | 348 | ||
344 | #define xlate_dev_kmem_ptr(p) p | 349 | #define xlate_dev_kmem_ptr(p) p |
345 | #define xlate_dev_mem_ptr(p) ((void *) (p)) | 350 | #define xlate_dev_mem_ptr(p) __va(p) |
346 | 351 | ||
347 | #ifndef virt_to_bus | 352 | #ifndef virt_to_bus |
348 | static inline unsigned long virt_to_bus(volatile void *address) | 353 | static inline unsigned long virt_to_bus(volatile void *address) |