]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Changed omap2 to map both L3 and L4 IO space
authorTony Lindgren <tony@atomide.com>
Tue, 20 Sep 2005 14:30:44 +0000 (17:30 +0300)
committerTony Lindgren <tony@atomide.com>
Tue, 20 Sep 2005 14:30:44 +0000 (17:30 +0300)
By mapping two 1MB sections we save some 4k table entries
and decrease TLB pressure. Recommended by Richard Woodruff.

arch/arm/mach-omap2/io.c
include/asm-arm/arch-omap/io.h

index 6f32b617d148a228a5a2c968681ad4b67ce5784f..4f8d3986402a6c61978f63a5882654a6cabefda4 100644 (file)
@@ -25,7 +25,8 @@
  * default mapping provided here.
  */
 static struct map_desc omap2_io_desc[] __initdata = {
-       { IO_VIRT,      IO_PHYS,        IO_SIZE,        MT_DEVICE },
+       { L3_VIRT,      L3_PHYS,        L3_SIZE,        MT_DEVICE },
+       { L4_VIRT,      L4_PHYS,        L4_SIZE,        MT_DEVICE },
 };
 
 void __init omap_map_common_io(void)
index 11fbf629bf755410a10efee0b52f1711b584b931..ebba025b83d5617111876238fb23f36197064f14 100644 (file)
  * ----------------------------------------------------------------------------
  */
 
+#define PCIO_BASE      0
+
 #if defined(CONFIG_ARCH_OMAP1)
+
 #define IO_PHYS                0xFFFB0000
-#define IO_OFFSET      -0x01000000     /* Virtual IO = 0xfefb0000 */
+#define IO_OFFSET      0x01000000      /* Virtual IO = 0xfefb0000 */
 #define IO_SIZE                0x40000
+#define IO_VIRT                (IO_PHYS - IO_OFFSET)
+#define IO_ADDRESS(pa) ((pa) - IO_OFFSET)
+#define io_p2v(pa)     ((pa) - IO_OFFSET)
+#define io_v2p(va)     ((va) + IO_OFFSET)
 
 #elif defined(CONFIG_ARCH_OMAP2)
-#define IO_PHYS                0x48000000      /* L4 peripherals; other stuff has to be mapped *
-                                        * manually. */
-#define IO_OFFSET      0x90000000      /* Virtual IO = 0xd8000000 */
-#define IO_SIZE                0x08000000
-#endif
 
-#define IO_VIRT                (IO_PHYS + IO_OFFSET)
-#define IO_ADDRESS(x)  ((x) + IO_OFFSET)
-#define PCIO_BASE      0
-#define io_p2v(x)      ((x) + IO_OFFSET)
-#define io_v2p(x)      ((x) - IO_OFFSET)
+/* We map both L3 and L4 on OMAP2 */
+#define L3_PHYS                0x68000000
+#define L3_VIRT                0xf8000000
+#define L3_SIZE                SZ_1M           /* 44kB of 128MB used, want 1MB sect */
+#define L4_PHYS                0x48000000
+#define L4_VIRT                0xd8000000
+#define L4_SIZE                SZ_1M           /* 1MB of 128MB used, want 1MB sect */
+#define IO_OFFSET      0x90000000
+#define IO_ADDRESS(pa) ((pa) + IO_OFFSET)      /* Works for L3 and L4 */
+#define io_p2v(pa)     ((pa) + IO_OFFSET)      /* Works for L3 and L4 */
+#define io_v2p(va)     ((va) - IO_OFFSET)      /* Works for L3 and L4 */
+
+#endif
 
 #ifndef __ASSEMBLER__