aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2009-08-28 13:50:37 -0400
committerTony Lindgren <tony@atomide.com>2009-08-28 13:50:37 -0400
commitdb326be1bca2ddbcac80161953956c8b8bc5b00b (patch)
tree2bc5a63d82e28c0d0956390e1b1432e0aeccf8e9 /arch/arm
parent6175556fdc0a66ce5f1831e22892fac6f28fc2ec (diff)
OMAP: Remove ifdefs for io.h
Remove ifdefs for io.h Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap1/io.c6
-rw-r--r--arch/arm/plat-omap/include/mach/io.h37
-rw-r--r--arch/arm/plat-omap/io.c4
3 files changed, 34 insertions, 13 deletions
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
index 3afe540149f7..7030f9281ea1 100644
--- a/arch/arm/mach-omap1/io.c
+++ b/arch/arm/mach-omap1/io.c
@@ -29,9 +29,9 @@ extern void omapfb_reserve_sdram(void);
29 */ 29 */
30static struct map_desc omap_io_desc[] __initdata = { 30static struct map_desc omap_io_desc[] __initdata = {
31 { 31 {
32 .virtual = IO_VIRT, 32 .virtual = OMAP1_IO_VIRT,
33 .pfn = __phys_to_pfn(IO_PHYS), 33 .pfn = __phys_to_pfn(OMAP1_IO_PHYS),
34 .length = IO_SIZE, 34 .length = OMAP1_IO_SIZE,
35 .type = MT_DEVICE 35 .type = MT_DEVICE
36 } 36 }
37}; 37};
diff --git a/arch/arm/plat-omap/include/mach/io.h b/arch/arm/plat-omap/include/mach/io.h
index 55659809478e..8d32df32b0b1 100644
--- a/arch/arm/plat-omap/include/mach/io.h
+++ b/arch/arm/plat-omap/include/mach/io.h
@@ -66,13 +66,21 @@
66#define OMAP2_IO_OFFSET 0x90000000 66#define OMAP2_IO_OFFSET 0x90000000
67#define OMAP2_IO_ADDRESS(pa) IOMEM((pa) + OMAP2_IO_OFFSET) /* L3 and L4 */ 67#define OMAP2_IO_ADDRESS(pa) IOMEM((pa) + OMAP2_IO_OFFSET) /* L3 and L4 */
68 68
69#if defined(CONFIG_ARCH_OMAP1) 69/*
70 * ----------------------------------------------------------------------------
71 * Omap1 specific IO mapping
72 * ----------------------------------------------------------------------------
73 */
70 74
71#define IO_PHYS 0xFFFB0000 75#define OMAP1_IO_PHYS 0xFFFB0000
72#define IO_SIZE 0x40000 76#define OMAP1_IO_SIZE 0x40000
73#define IO_VIRT (IO_PHYS - OMAP1_IO_OFFSET) 77#define OMAP1_IO_VIRT (OMAP1_IO_PHYS - OMAP1_IO_OFFSET)
74 78
75#elif defined(CONFIG_ARCH_OMAP2) 79/*
80 * ----------------------------------------------------------------------------
81 * Omap2 specific IO mapping
82 * ----------------------------------------------------------------------------
83 */
76 84
77/* We map both L3 and L4 on OMAP2 */ 85/* We map both L3 and L4 on OMAP2 */
78#define L3_24XX_PHYS L3_24XX_BASE /* 0x68000000 */ 86#define L3_24XX_PHYS L3_24XX_BASE /* 0x68000000 */
@@ -106,7 +114,11 @@
106#define DSP_MMU_24XX_VIRT 0xe2000000 114#define DSP_MMU_24XX_VIRT 0xe2000000
107#define DSP_MMU_24XX_SIZE SZ_4K 115#define DSP_MMU_24XX_SIZE SZ_4K
108 116
109#elif defined(CONFIG_ARCH_OMAP3) 117/*
118 * ----------------------------------------------------------------------------
119 * Omap3 specific IO mapping
120 * ----------------------------------------------------------------------------
121 */
110 122
111/* We map both L3 and L4 on OMAP3 */ 123/* We map both L3 and L4 on OMAP3 */
112#define L3_34XX_PHYS L3_34XX_BASE /* 0x68000000 */ 124#define L3_34XX_PHYS L3_34XX_BASE /* 0x68000000 */
@@ -157,8 +169,12 @@
157#define DSP_MMU_34XX_VIRT 0xe2000000 169#define DSP_MMU_34XX_VIRT 0xe2000000
158#define DSP_MMU_34XX_SIZE SZ_4K 170#define DSP_MMU_34XX_SIZE SZ_4K
159 171
172/*
173 * ----------------------------------------------------------------------------
174 * Omap4 specific IO mapping
175 * ----------------------------------------------------------------------------
176 */
160 177
161#elif defined(CONFIG_ARCH_OMAP4)
162/* We map both L3 and L4 on OMAP4 */ 178/* We map both L3 and L4 on OMAP4 */
163#define L3_44XX_PHYS L3_44XX_BASE 179#define L3_44XX_PHYS L3_44XX_BASE
164#define L3_44XX_VIRT 0xd4000000 180#define L3_44XX_VIRT 0xd4000000
@@ -185,7 +201,12 @@
185#define OMAP44XX_GPMC_VIRT 0xe0000000 201#define OMAP44XX_GPMC_VIRT 0xe0000000
186#define OMAP44XX_GPMC_SIZE SZ_1M 202#define OMAP44XX_GPMC_SIZE SZ_1M
187 203
188#endif 204
205/*
206 * ----------------------------------------------------------------------------
207 * Omap specific register access
208 * ----------------------------------------------------------------------------
209 */
189 210
190#ifndef __ASSEMBLER__ 211#ifndef __ASSEMBLER__
191 212
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c
index d491ad15f198..b6defa23e77e 100644
--- a/arch/arm/plat-omap/io.c
+++ b/arch/arm/plat-omap/io.c
@@ -30,8 +30,8 @@ void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type)
30{ 30{
31#ifdef CONFIG_ARCH_OMAP1 31#ifdef CONFIG_ARCH_OMAP1
32 if (cpu_class_is_omap1()) { 32 if (cpu_class_is_omap1()) {
33 if (BETWEEN(p, IO_PHYS, IO_SIZE)) 33 if (BETWEEN(p, OMAP1_IO_PHYS, OMAP1_IO_SIZE))
34 return XLATE(p, IO_PHYS, IO_VIRT); 34 return XLATE(p, OMAP1_IO_PHYS, OMAP1_IO_VIRT);
35 } 35 }
36 if (cpu_is_omap730()) { 36 if (cpu_is_omap730()) {
37 if (BETWEEN(p, OMAP730_DSP_BASE, OMAP730_DSP_SIZE)) 37 if (BETWEEN(p, OMAP730_DSP_BASE, OMAP730_DSP_SIZE))