[PATCH 22/36] m68k: use ColdFire V4e MMU flags when ioremapping()

gerg
2011-10-25T07:21:12Z

Different flags needed when mapping pages for the ColdFire V4e MMU case.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/m68k/mm/kmap.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c
index 6934584..eed39e6 100644
--- a/arch/m68k/mm/kmap.c
+++ b/arch/m68k/mm/kmap.c
@@ -50,7 +50,11 @@ static inline void free_io_area(void *addr)

#else

+#ifdef CONFIG_COLDFIRE
+#define IO_SIZE PAGE_SIZE
+#else
#define IO_SIZE (256*1024)
+#endif

static struct vm_struct *iolist;

@@ -171,7 +175,12 @@ void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cachefla
break;
}
} else {
+#ifdef CONFIG_COLDFIRE
+ physaddr |= (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_DIRTY |
+ _PAGE_READWRITE);
+#else
physaddr |= (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_DIRTY);
+#endif
switch (cacheflag) {
case IOMAP_NOCACHE_SER:
case IOMAP_NOCACHE_NONSER:
--
1.7.0.4