From 327556cc1841ca1159fb59b76a1a77151d6267c4 Mon Sep 17 00:00:00 2001 From: Jonas Bonn Date: Sat, 2 Jul 2011 17:17:35 +0200 Subject: [PATCH] --- yaml --- r: 258119 b: refs/heads/master c: f1ecc69838a2d7c8a3e1909f637d4083c071777d h: refs/heads/master i: 258117: e0f092aafb1b4ad7b237881db6662cbeb2efc333 258115: bd6bff1ab2fa4b43b8c34a9df2979dfe51cc5cc4 258111: c576178eafe453ed3fde40ab2cc9ec4f5e5566a5 v: v3 --- [refs] | 2 +- trunk/include/asm-generic/io.h | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index dadd005134d4..86ce084ff09c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a4e05276a10198a1540dd1a0001f759c10ce1cf1 +refs/heads/master: f1ecc69838a2d7c8a3e1909f637d4083c071777d diff --git a/trunk/include/asm-generic/io.h b/trunk/include/asm-generic/io.h index e0ffa3ddb02a..a1caf2d25d82 100644 --- a/trunk/include/asm-generic/io.h +++ b/trunk/include/asm-generic/io.h @@ -307,7 +307,11 @@ static inline void *phys_to_virt(unsigned long address) /* * Change "struct page" to physical address. + * + * This implementation is for the no-MMU case only... if you have an MMU + * you'll need to provide your own definitions. */ +#ifndef CONFIG_MMU static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size) { return (void __iomem*) (unsigned long)offset; @@ -326,6 +330,7 @@ static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size) static inline void iounmap(void *addr) { } +#endif /* CONFIG_MMU */ #ifndef CONFIG_GENERIC_IOMAP static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) @@ -342,7 +347,7 @@ extern void ioport_unmap(void __iomem *p); #endif /* CONFIG_GENERIC_IOMAP */ #define xlate_dev_kmem_ptr(p) p -#define xlate_dev_mem_ptr(p) ((void *) (p)) +#define xlate_dev_mem_ptr(p) __va(p) #ifndef virt_to_bus static inline unsigned long virt_to_bus(volatile void *address)