1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-25 01:44:39 +02:00
openwrt-xburst/target/linux/coldfire/patches/014-m5445x_ioremap_xf0000000.patch

62 lines
2.0 KiB
Diff
Raw Normal View History

From ed9d4b88136173a4e17701d9c1162ddfecf902e4 Mon Sep 17 00:00:00 2001
From: Kurt Mahan <kmahan@freescale.com>
Date: Mon, 19 Nov 2007 15:24:30 -0700
Subject: [PATCH] Short circuit IOREMAP calls in the 0xF0000000 range.
LTIBName: m5445x-ioremap-xf0000000
Signed-off-by: Kurt Mahan <kmahan@freescale.com>
---
arch/m68k/coldfire/head.S | 4 ++--
arch/m68k/mm/kmap.c | 14 ++++++++++++--
2 files changed, 14 insertions(+), 4 deletions(-)
--- a/arch/m68k/coldfire/head.S
+++ b/arch/m68k/coldfire/head.S
@@ -56,13 +56,13 @@
* Setup ACR mappings to provide the following memory map:
* Data
* 0xA0000000 -> 0xAFFFFFFF [0] NO CACHE / PRECISE / SUPER ONLY
- * 0xFC000000 -> 0xFCFFFFFF [1] NO CACHE / PRECISE / SUPER ONLY
+ * 0xF0000000 -> 0xFFFFFFFF [1] NO CACHE / PRECISE / SUPER ONLY
* Code
* None currently (mapped via TLBs)
*/
#define ACR0_DEFAULT #0xA00FA048 /* ACR0 default value */
-#define ACR1_DEFAULT #0xFC00A040 /* ACR1 default value */
+#define ACR1_DEFAULT #0xF00FA040 /* ACR1 default value */
#define ACR2_DEFAULT #0x00000000 /* ACR2 default value */
#define ACR3_DEFAULT #0x00000000 /* ACR3 default value */
--- a/arch/m68k/mm/kmap.c
+++ b/arch/m68k/mm/kmap.c
@@ -133,8 +133,18 @@ void __iomem *__ioremap(unsigned long ph
}
#endif
+#ifdef CONFIG_M54455
+ if (physaddr >= 0xf0000000) {
+ /* short circuit mappings for xf0000000 */
#ifdef DEBUG
- printk("ioremap: 0x%lx,0x%lx(%d) - ", physaddr, size, cacheflag);
+ printk(KERN_INFO "ioremap: short circuiting 0x%lx mapping\n", physaddr);
+#endif
+ return (void __iomem *)physaddr;
+ }
+#endif
+
+#ifdef DEBUG
+ printk("ioremap: paddr=0x%lx,size=0x%lx(%d) - ", physaddr, size, cacheflag);
#endif
/*
* Mappings have to be aligned
@@ -153,7 +163,7 @@ void __iomem *__ioremap(unsigned long ph
virtaddr = (unsigned long)area->addr;
retaddr = virtaddr + offset;
#ifdef DEBUG
- printk("0x%lx,0x%lx,0x%lx", physaddr, virtaddr, retaddr);
+ printk(" paddr=0x%lx,vaddr=0x%lx,retaddr=0x%lx", physaddr, virtaddr, retaddr);
#endif
/*