summaryrefslogtreecommitdiffstats
path: root/arch/xtensa/include/asm/io.h
diff options
context:
space:
mode:
authorJohannes Weiner <jw@emlix.com>2009-03-04 16:21:31 +0100
committerChris Zankel <chris@zankel.net>2009-04-02 23:41:50 -0700
commite5083a63b6a8546c5fe1e571fe529e3939787ec2 (patch)
tree5c11db5b0a924f8bcfc404c202630d37ccfd7c3c /arch/xtensa/include/asm/io.h
parent7789f89af9e8e426d7a7f173cf465a4fcadba7dd (diff)
downloadkernel-crypto-e5083a63b6a8546c5fe1e571fe529e3939787ec2.tar.gz
kernel-crypto-e5083a63b6a8546c5fe1e571fe529e3939787ec2.tar.xz
kernel-crypto-e5083a63b6a8546c5fe1e571fe529e3939787ec2.zip
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.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/xtensa/include/asm/io.h b/arch/xtensa/include/asm/io.h
index 07b7299dab2..d04cd3a625f 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)
static inline void *ioremap(unsigned long offset, unsigned long size)
{
+#ifdef CONFIG_MMU
if (offset >= XCHAL_KIO_PADDR
&& offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE)
return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_BYPASS_VADDR);
-
else
BUG();
+#else
+ return (void *)offset;
+#endif
}
static inline void *ioremap_nocache(unsigned long offset, unsigned long size)
{
+#ifdef CONFIG_MMU
if (offset >= XCHAL_KIO_PADDR
&& offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE)
return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_CACHED_VADDR);
else
BUG();
+#else
+ return (void *)offset;
+#endif
}
static inline void iounmap(void *addr)