diff options
author | Johannes Weiner <jw@emlix.com> | 2009-03-04 10:21:31 -0500 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2009-04-03 02:41:50 -0400 |
commit | e5083a63b6a8546c5fe1e571fe529e3939787ec2 (patch) | |
tree | 5c11db5b0a924f8bcfc404c202630d37ccfd7c3c /arch/xtensa/include/asm/io.h | |
parent | 7789f89af9e8e426d7a7f173cf465a4fcadba7dd (diff) |
xtensa: nommu support
Add support for !CONFIG_MMU setups.
Signed-off-by: Johannes Weiner <jw@emlix.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa/include/asm/io.h')
-rw-r--r-- | arch/xtensa/include/asm/io.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/xtensa/include/asm/io.h b/arch/xtensa/include/asm/io.h index 07b7299dab20..d04cd3a625fa 100644 --- a/arch/xtensa/include/asm/io.h +++ b/arch/xtensa/include/asm/io.h | |||
@@ -69,21 +69,28 @@ static inline void * phys_to_virt(unsigned long address) | |||
69 | 69 | ||
70 | static inline void *ioremap(unsigned long offset, unsigned long size) | 70 | static inline void *ioremap(unsigned long offset, unsigned long size) |
71 | { | 71 | { |
72 | #ifdef CONFIG_MMU | ||
72 | if (offset >= XCHAL_KIO_PADDR | 73 | if (offset >= XCHAL_KIO_PADDR |
73 | && offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE) | 74 | && offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE) |
74 | return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_BYPASS_VADDR); | 75 | return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_BYPASS_VADDR); |
75 | |||
76 | else | 76 | else |
77 | BUG(); | 77 | BUG(); |
78 | #else | ||
79 | return (void *)offset; | ||
80 | #endif | ||
78 | } | 81 | } |
79 | 82 | ||
80 | static inline void *ioremap_nocache(unsigned long offset, unsigned long size) | 83 | static inline void *ioremap_nocache(unsigned long offset, unsigned long size) |
81 | { | 84 | { |
85 | #ifdef CONFIG_MMU | ||
82 | if (offset >= XCHAL_KIO_PADDR | 86 | if (offset >= XCHAL_KIO_PADDR |
83 | && offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE) | 87 | && offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE) |
84 | return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_CACHED_VADDR); | 88 | return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_CACHED_VADDR); |
85 | else | 89 | else |
86 | BUG(); | 90 | BUG(); |
91 | #else | ||
92 | return (void *)offset; | ||
93 | #endif | ||
87 | } | 94 | } |
88 | 95 | ||
89 | static inline void iounmap(void *addr) | 96 | static inline void iounmap(void *addr) |