diff options
Diffstat (limited to 'include/asm-sh/io.h')
-rw-r--r-- | include/asm-sh/io.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h index 27dba653cbe7..377160b86295 100644 --- a/include/asm-sh/io.h +++ b/include/asm-sh/io.h | |||
@@ -216,6 +216,7 @@ static inline void ctrl_delay(void) | |||
216 | 216 | ||
217 | #define IO_SPACE_LIMIT 0xffffffff | 217 | #define IO_SPACE_LIMIT 0xffffffff |
218 | 218 | ||
219 | #ifdef CONFIG_MMU | ||
219 | /* | 220 | /* |
220 | * Change virtual addresses to physical addresses and vv. | 221 | * Change virtual addresses to physical addresses and vv. |
221 | * These are trivial on the 1:1 Linux/SuperH mapping | 222 | * These are trivial on the 1:1 Linux/SuperH mapping |
@@ -229,6 +230,10 @@ static inline void *phys_to_virt(unsigned long address) | |||
229 | { | 230 | { |
230 | return (void *)P1SEGADDR(address); | 231 | return (void *)P1SEGADDR(address); |
231 | } | 232 | } |
233 | #else | ||
234 | #define phys_to_virt(address) ((void *)(address)) | ||
235 | #define virt_to_phys(address) ((unsigned long)(address)) | ||
236 | #endif | ||
232 | 237 | ||
233 | #define virt_to_bus virt_to_phys | 238 | #define virt_to_bus virt_to_phys |
234 | #define bus_to_virt phys_to_virt | 239 | #define bus_to_virt phys_to_virt |