aboutsummaryrefslogtreecommitdiff
path: root/include/asm-sh/io.h
diff options
context:
space:
mode:
authorYoshinori Sato <ysato@users.sourceforge.jp>2006-09-27 17:25:07 +0900
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 17:25:07 +0900
commita2d1a5fae6296c2a3ac1aaa982c95464c46c0585 (patch)
treefa704906d368f6ab0f03b164d5071992a4029a9a /include/asm-sh/io.h
parent0b8929354cdeddb17e81bfda903812c9adfd0b67 (diff)
sh: __addr_ok() and other misc nommu fixups.
A few more outstanding nommu fixups.. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/io.h')
-rw-r--r--include/asm-sh/io.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h
index 27dba653cbe..377160b8629 100644
--- a/include/asm-sh/io.h
+++ b/include/asm-sh/io.h
@@ -216,6 +216,7 @@ static inline void ctrl_delay(void)
#define IO_SPACE_LIMIT 0xffffffff
+#ifdef CONFIG_MMU
/*
* Change virtual addresses to physical addresses and vv.
* These are trivial on the 1:1 Linux/SuperH mapping
@@ -229,6 +230,10 @@ static inline void *phys_to_virt(unsigned long address)
{
return (void *)P1SEGADDR(address);
}
+#else
+#define phys_to_virt(address) ((void *)(address))
+#define virt_to_phys(address) ((unsigned long)(address))
+#endif
#define virt_to_bus virt_to_phys
#define bus_to_virt phys_to_virt