diff options
27 files changed, 196 insertions, 157 deletions
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index bbbaeb0abcd3..06808434ea04 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -71,7 +71,7 @@ static inline void omap_init_rtc(void) {} | |||
71 | # define INT_DSP_MAILBOX1 INT_1610_DSP_MAILBOX1 | 71 | # define INT_DSP_MAILBOX1 INT_1610_DSP_MAILBOX1 |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | #define OMAP1_MBOX_BASE IO_ADDRESS(OMAP16XX_MAILBOX_BASE) | 74 | #define OMAP1_MBOX_BASE OMAP1_IO_ADDRESS(OMAP16XX_MAILBOX_BASE) |
75 | 75 | ||
76 | static struct resource mbox_resources[] = { | 76 | static struct resource mbox_resources[] = { |
77 | { | 77 | { |
diff --git a/arch/arm/mach-omap1/pm.h b/arch/arm/mach-omap1/pm.h index 9ed5e2c1de4d..c4f05bdcf8a6 100644 --- a/arch/arm/mach-omap1/pm.h +++ b/arch/arm/mach-omap1/pm.h | |||
@@ -39,11 +39,11 @@ | |||
39 | * Register and offset definitions to be used in PM assembler code | 39 | * Register and offset definitions to be used in PM assembler code |
40 | * ---------------------------------------------------------------------------- | 40 | * ---------------------------------------------------------------------------- |
41 | */ | 41 | */ |
42 | #define CLKGEN_REG_ASM_BASE IO_ADDRESS(0xfffece00) | 42 | #define CLKGEN_REG_ASM_BASE OMAP1_IO_ADDRESS(0xfffece00) |
43 | #define ARM_IDLECT1_ASM_OFFSET 0x04 | 43 | #define ARM_IDLECT1_ASM_OFFSET 0x04 |
44 | #define ARM_IDLECT2_ASM_OFFSET 0x08 | 44 | #define ARM_IDLECT2_ASM_OFFSET 0x08 |
45 | 45 | ||
46 | #define TCMIF_ASM_BASE IO_ADDRESS(0xfffecc00) | 46 | #define TCMIF_ASM_BASE OMAP1_IO_ADDRESS(0xfffecc00) |
47 | #define EMIFS_CONFIG_ASM_OFFSET 0x0c | 47 | #define EMIFS_CONFIG_ASM_OFFSET 0x0c |
48 | #define EMIFF_SDRAM_CONFIG_ASM_OFFSET 0x20 | 48 | #define EMIFF_SDRAM_CONFIG_ASM_OFFSET 0x20 |
49 | 49 | ||
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c index f754cee4f3c3..6f54b2c591cf 100644 --- a/arch/arm/mach-omap1/serial.c +++ b/arch/arm/mach-omap1/serial.c | |||
@@ -64,7 +64,7 @@ static void __init omap_serial_reset(struct plat_serial8250_port *p) | |||
64 | 64 | ||
65 | static struct plat_serial8250_port serial_platform_data[] = { | 65 | static struct plat_serial8250_port serial_platform_data[] = { |
66 | { | 66 | { |
67 | .membase = IO_ADDRESS(OMAP_UART1_BASE), | 67 | .membase = OMAP1_IO_ADDRESS(OMAP_UART1_BASE), |
68 | .mapbase = OMAP_UART1_BASE, | 68 | .mapbase = OMAP_UART1_BASE, |
69 | .irq = INT_UART1, | 69 | .irq = INT_UART1, |
70 | .flags = UPF_BOOT_AUTOCONF, | 70 | .flags = UPF_BOOT_AUTOCONF, |
@@ -73,7 +73,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
73 | .uartclk = OMAP16XX_BASE_BAUD * 16, | 73 | .uartclk = OMAP16XX_BASE_BAUD * 16, |
74 | }, | 74 | }, |
75 | { | 75 | { |
76 | .membase = IO_ADDRESS(OMAP_UART2_BASE), | 76 | .membase = OMAP1_IO_ADDRESS(OMAP_UART2_BASE), |
77 | .mapbase = OMAP_UART2_BASE, | 77 | .mapbase = OMAP_UART2_BASE, |
78 | .irq = INT_UART2, | 78 | .irq = INT_UART2, |
79 | .flags = UPF_BOOT_AUTOCONF, | 79 | .flags = UPF_BOOT_AUTOCONF, |
@@ -82,7 +82,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
82 | .uartclk = OMAP16XX_BASE_BAUD * 16, | 82 | .uartclk = OMAP16XX_BASE_BAUD * 16, |
83 | }, | 83 | }, |
84 | { | 84 | { |
85 | .membase = IO_ADDRESS(OMAP_UART3_BASE), | 85 | .membase = OMAP1_IO_ADDRESS(OMAP_UART3_BASE), |
86 | .mapbase = OMAP_UART3_BASE, | 86 | .mapbase = OMAP_UART3_BASE, |
87 | .irq = INT_UART3, | 87 | .irq = INT_UART3, |
88 | .flags = UPF_BOOT_AUTOCONF, | 88 | .flags = UPF_BOOT_AUTOCONF, |
diff --git a/arch/arm/mach-omap1/sram.S b/arch/arm/mach-omap1/sram.S index 261cdc48228b..7724e520d07c 100644 --- a/arch/arm/mach-omap1/sram.S +++ b/arch/arm/mach-omap1/sram.S | |||
@@ -21,13 +21,13 @@ | |||
21 | ENTRY(omap1_sram_reprogram_clock) | 21 | ENTRY(omap1_sram_reprogram_clock) |
22 | stmfd sp!, {r0 - r12, lr} @ save registers on stack | 22 | stmfd sp!, {r0 - r12, lr} @ save registers on stack |
23 | 23 | ||
24 | mov r2, #IO_ADDRESS(DPLL_CTL) & 0xff000000 | 24 | mov r2, #OMAP1_IO_ADDRESS(DPLL_CTL) & 0xff000000 |
25 | orr r2, r2, #IO_ADDRESS(DPLL_CTL) & 0x00ff0000 | 25 | orr r2, r2, #OMAP1_IO_ADDRESS(DPLL_CTL) & 0x00ff0000 |
26 | orr r2, r2, #IO_ADDRESS(DPLL_CTL) & 0x0000ff00 | 26 | orr r2, r2, #OMAP1_IO_ADDRESS(DPLL_CTL) & 0x0000ff00 |
27 | 27 | ||
28 | mov r3, #IO_ADDRESS(ARM_CKCTL) & 0xff000000 | 28 | mov r3, #OMAP1_IO_ADDRESS(ARM_CKCTL) & 0xff000000 |
29 | orr r3, r3, #IO_ADDRESS(ARM_CKCTL) & 0x00ff0000 | 29 | orr r3, r3, #OMAP1_IO_ADDRESS(ARM_CKCTL) & 0x00ff0000 |
30 | orr r3, r3, #IO_ADDRESS(ARM_CKCTL) & 0x0000ff00 | 30 | orr r3, r3, #OMAP1_IO_ADDRESS(ARM_CKCTL) & 0x0000ff00 |
31 | 31 | ||
32 | tst r0, #1 << 4 @ want lock mode? | 32 | tst r0, #1 << 4 @ want lock mode? |
33 | beq newck @ nope | 33 | beq newck @ nope |
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index 4d56408d3cff..1be6a214d88d 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c | |||
@@ -62,8 +62,8 @@ typedef struct { | |||
62 | u32 read_tim; /* READ_TIM, R */ | 62 | u32 read_tim; /* READ_TIM, R */ |
63 | } omap_mpu_timer_regs_t; | 63 | } omap_mpu_timer_regs_t; |
64 | 64 | ||
65 | #define omap_mpu_timer_base(n) \ | 65 | #define omap_mpu_timer_base(n) \ |
66 | ((volatile omap_mpu_timer_regs_t*)IO_ADDRESS(OMAP_MPU_TIMER_BASE + \ | 66 | ((volatile omap_mpu_timer_regs_t*)OMAP1_IO_ADDRESS(OMAP_MPU_TIMER_BASE + \ |
67 | (n)*OMAP_MPU_TIMER_OFFSET)) | 67 | (n)*OMAP_MPU_TIMER_OFFSET)) |
68 | 68 | ||
69 | static inline unsigned long omap_mpu_timer_read(int nr) | 69 | static inline unsigned long omap_mpu_timer_read(int nr) |
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index b0c7402248f7..bdfda36d8aa8 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -53,8 +53,8 @@ static struct omap_board_config_kernel sdp4430_config[] __initdata = { | |||
53 | 53 | ||
54 | static void __init gic_init_irq(void) | 54 | static void __init gic_init_irq(void) |
55 | { | 55 | { |
56 | gic_dist_init(0, IO_ADDRESS(OMAP44XX_GIC_DIST_BASE), 29); | 56 | gic_dist_init(0, OMAP2_IO_ADDRESS(OMAP44XX_GIC_DIST_BASE), 29); |
57 | gic_cpu_init(0, IO_ADDRESS(OMAP44XX_GIC_CPU_BASE)); | 57 | gic_cpu_init(0, OMAP2_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE)); |
58 | } | 58 | } |
59 | 59 | ||
60 | static void __init omap_4430sdp_init_irq(void) | 60 | static void __init omap_4430sdp_init_irq(void) |
diff --git a/arch/arm/mach-omap2/cm.h b/arch/arm/mach-omap2/cm.h index f3c91a1ca391..18d9a121aa7a 100644 --- a/arch/arm/mach-omap2/cm.h +++ b/arch/arm/mach-omap2/cm.h | |||
@@ -17,11 +17,11 @@ | |||
17 | #include "prcm-common.h" | 17 | #include "prcm-common.h" |
18 | 18 | ||
19 | #define OMAP2420_CM_REGADDR(module, reg) \ | 19 | #define OMAP2420_CM_REGADDR(module, reg) \ |
20 | IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg)) | 20 | OMAP2_IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg)) |
21 | #define OMAP2430_CM_REGADDR(module, reg) \ | 21 | #define OMAP2430_CM_REGADDR(module, reg) \ |
22 | IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg)) | 22 | OMAP2_IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg)) |
23 | #define OMAP34XX_CM_REGADDR(module, reg) \ | 23 | #define OMAP34XX_CM_REGADDR(module, reg) \ |
24 | IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg)) | 24 | OMAP2_IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg)) |
25 | 25 | ||
26 | /* | 26 | /* |
27 | * Architecture-specific global CM registers | 27 | * Architecture-specific global CM registers |
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c index 8fe8d230f21b..48ee295db275 100644 --- a/arch/arm/mach-omap2/omap-smp.c +++ b/arch/arm/mach-omap2/omap-smp.c | |||
@@ -54,7 +54,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu) | |||
54 | * for us: do so | 54 | * for us: do so |
55 | */ | 55 | */ |
56 | 56 | ||
57 | gic_cpu_init(0, IO_ADDRESS(OMAP44XX_GIC_CPU_BASE)); | 57 | gic_cpu_init(0, OMAP2_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE)); |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * Synchronise with the boot thread. | 60 | * Synchronise with the boot thread. |
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 6cc375a275be..da3a53f8ccc8 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c | |||
@@ -48,7 +48,7 @@ int omap2_pm_debug; | |||
48 | regs[reg_count++].val = __raw_readl(reg) | 48 | regs[reg_count++].val = __raw_readl(reg) |
49 | #define DUMP_INTC_REG(reg, off) \ | 49 | #define DUMP_INTC_REG(reg, off) \ |
50 | regs[reg_count].name = #reg; \ | 50 | regs[reg_count].name = #reg; \ |
51 | regs[reg_count++].val = __raw_readl(IO_ADDRESS(0x480fe000 + (off))) | 51 | regs[reg_count++].val = __raw_readl(OMAP2_IO_ADDRESS(0x480fe000 + (off))) |
52 | 52 | ||
53 | void omap2_pm_dump(int mode, int resume, unsigned int us) | 53 | void omap2_pm_dump(int mode, int resume, unsigned int us) |
54 | { | 54 | { |
diff --git a/arch/arm/mach-omap2/prm.h b/arch/arm/mach-omap2/prm.h index 9937e2814696..03c467c35f54 100644 --- a/arch/arm/mach-omap2/prm.h +++ b/arch/arm/mach-omap2/prm.h | |||
@@ -17,11 +17,11 @@ | |||
17 | #include "prcm-common.h" | 17 | #include "prcm-common.h" |
18 | 18 | ||
19 | #define OMAP2420_PRM_REGADDR(module, reg) \ | 19 | #define OMAP2420_PRM_REGADDR(module, reg) \ |
20 | IO_ADDRESS(OMAP2420_PRM_BASE + (module) + (reg)) | 20 | OMAP2_IO_ADDRESS(OMAP2420_PRM_BASE + (module) + (reg)) |
21 | #define OMAP2430_PRM_REGADDR(module, reg) \ | 21 | #define OMAP2430_PRM_REGADDR(module, reg) \ |
22 | IO_ADDRESS(OMAP2430_PRM_BASE + (module) + (reg)) | 22 | OMAP2_IO_ADDRESS(OMAP2430_PRM_BASE + (module) + (reg)) |
23 | #define OMAP34XX_PRM_REGADDR(module, reg) \ | 23 | #define OMAP34XX_PRM_REGADDR(module, reg) \ |
24 | IO_ADDRESS(OMAP3430_PRM_BASE + (module) + (reg)) | 24 | OMAP2_IO_ADDRESS(OMAP3430_PRM_BASE + (module) + (reg)) |
25 | 25 | ||
26 | /* | 26 | /* |
27 | * Architecture-specific global PRM registers | 27 | * Architecture-specific global PRM registers |
diff --git a/arch/arm/mach-omap2/sdrc.h b/arch/arm/mach-omap2/sdrc.h index 1a8bbd094066..0837eda5f2b6 100644 --- a/arch/arm/mach-omap2/sdrc.h +++ b/arch/arm/mach-omap2/sdrc.h | |||
@@ -48,9 +48,9 @@ static inline u32 sms_read_reg(u16 reg) | |||
48 | return __raw_readl(OMAP_SMS_REGADDR(reg)); | 48 | return __raw_readl(OMAP_SMS_REGADDR(reg)); |
49 | } | 49 | } |
50 | #else | 50 | #else |
51 | #define OMAP242X_SDRC_REGADDR(reg) IO_ADDRESS(OMAP2420_SDRC_BASE + (reg)) | 51 | #define OMAP242X_SDRC_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP2420_SDRC_BASE + (reg)) |
52 | #define OMAP243X_SDRC_REGADDR(reg) IO_ADDRESS(OMAP243X_SDRC_BASE + (reg)) | 52 | #define OMAP243X_SDRC_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP243X_SDRC_BASE + (reg)) |
53 | #define OMAP34XX_SDRC_REGADDR(reg) IO_ADDRESS(OMAP343X_SDRC_BASE + (reg)) | 53 | #define OMAP34XX_SDRC_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP343X_SDRC_BASE + (reg)) |
54 | #endif /* __ASSEMBLER__ */ | 54 | #endif /* __ASSEMBLER__ */ |
55 | 55 | ||
56 | #endif | 56 | #endif |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index a7421a50410b..42449002f60d 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -73,7 +73,7 @@ static LIST_HEAD(uart_list); | |||
73 | 73 | ||
74 | static struct plat_serial8250_port serial_platform_data0[] = { | 74 | static struct plat_serial8250_port serial_platform_data0[] = { |
75 | { | 75 | { |
76 | .membase = IO_ADDRESS(OMAP_UART1_BASE), | 76 | .membase = OMAP2_IO_ADDRESS(OMAP_UART1_BASE), |
77 | .mapbase = OMAP_UART1_BASE, | 77 | .mapbase = OMAP_UART1_BASE, |
78 | .irq = 72, | 78 | .irq = 72, |
79 | .flags = UPF_BOOT_AUTOCONF, | 79 | .flags = UPF_BOOT_AUTOCONF, |
@@ -87,7 +87,7 @@ static struct plat_serial8250_port serial_platform_data0[] = { | |||
87 | 87 | ||
88 | static struct plat_serial8250_port serial_platform_data1[] = { | 88 | static struct plat_serial8250_port serial_platform_data1[] = { |
89 | { | 89 | { |
90 | .membase = IO_ADDRESS(OMAP_UART2_BASE), | 90 | .membase = OMAP2_IO_ADDRESS(OMAP_UART2_BASE), |
91 | .mapbase = OMAP_UART2_BASE, | 91 | .mapbase = OMAP_UART2_BASE, |
92 | .irq = 73, | 92 | .irq = 73, |
93 | .flags = UPF_BOOT_AUTOCONF, | 93 | .flags = UPF_BOOT_AUTOCONF, |
@@ -101,7 +101,7 @@ static struct plat_serial8250_port serial_platform_data1[] = { | |||
101 | 101 | ||
102 | static struct plat_serial8250_port serial_platform_data2[] = { | 102 | static struct plat_serial8250_port serial_platform_data2[] = { |
103 | { | 103 | { |
104 | .membase = IO_ADDRESS(OMAP_UART3_BASE), | 104 | .membase = OMAP2_IO_ADDRESS(OMAP_UART3_BASE), |
105 | .mapbase = OMAP_UART3_BASE, | 105 | .mapbase = OMAP_UART3_BASE, |
106 | .irq = 74, | 106 | .irq = 74, |
107 | .flags = UPF_BOOT_AUTOCONF, | 107 | .flags = UPF_BOOT_AUTOCONF, |
diff --git a/arch/arm/mach-omap2/sram242x.S b/arch/arm/mach-omap2/sram242x.S index bb299851116d..9b62208658bc 100644 --- a/arch/arm/mach-omap2/sram242x.S +++ b/arch/arm/mach-omap2/sram242x.S | |||
@@ -128,7 +128,7 @@ omap242x_sdi_prcm_voltctrl: | |||
128 | prcm_mask_val: | 128 | prcm_mask_val: |
129 | .word 0xFFFF3FFC | 129 | .word 0xFFFF3FFC |
130 | omap242x_sdi_timer_32ksynct_cr: | 130 | omap242x_sdi_timer_32ksynct_cr: |
131 | .word IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010) | 131 | .word OMAP2_IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010) |
132 | ENTRY(omap242x_sram_ddr_init_sz) | 132 | ENTRY(omap242x_sram_ddr_init_sz) |
133 | .word . - omap242x_sram_ddr_init | 133 | .word . - omap242x_sram_ddr_init |
134 | 134 | ||
@@ -224,7 +224,7 @@ omap242x_srs_prcm_voltctrl: | |||
224 | ddr_prcm_mask_val: | 224 | ddr_prcm_mask_val: |
225 | .word 0xFFFF3FFC | 225 | .word 0xFFFF3FFC |
226 | omap242x_srs_timer_32ksynct: | 226 | omap242x_srs_timer_32ksynct: |
227 | .word IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010) | 227 | .word OMAP2_IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010) |
228 | 228 | ||
229 | ENTRY(omap242x_sram_reprogram_sdrc_sz) | 229 | ENTRY(omap242x_sram_reprogram_sdrc_sz) |
230 | .word . - omap242x_sram_reprogram_sdrc | 230 | .word . - omap242x_sram_reprogram_sdrc |
diff --git a/arch/arm/mach-omap2/sram243x.S b/arch/arm/mach-omap2/sram243x.S index 9955abcaeb31..df2cd9277c00 100644 --- a/arch/arm/mach-omap2/sram243x.S +++ b/arch/arm/mach-omap2/sram243x.S | |||
@@ -128,7 +128,7 @@ omap243x_sdi_prcm_voltctrl: | |||
128 | prcm_mask_val: | 128 | prcm_mask_val: |
129 | .word 0xFFFF3FFC | 129 | .word 0xFFFF3FFC |
130 | omap243x_sdi_timer_32ksynct_cr: | 130 | omap243x_sdi_timer_32ksynct_cr: |
131 | .word IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010) | 131 | .word OMAP2_IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010) |
132 | ENTRY(omap243x_sram_ddr_init_sz) | 132 | ENTRY(omap243x_sram_ddr_init_sz) |
133 | .word . - omap243x_sram_ddr_init | 133 | .word . - omap243x_sram_ddr_init |
134 | 134 | ||
@@ -224,7 +224,7 @@ omap243x_srs_prcm_voltctrl: | |||
224 | ddr_prcm_mask_val: | 224 | ddr_prcm_mask_val: |
225 | .word 0xFFFF3FFC | 225 | .word 0xFFFF3FFC |
226 | omap243x_srs_timer_32ksynct: | 226 | omap243x_srs_timer_32ksynct: |
227 | .word IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010) | 227 | .word OMAP2_IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010) |
228 | 228 | ||
229 | ENTRY(omap243x_sram_reprogram_sdrc_sz) | 229 | ENTRY(omap243x_sram_reprogram_sdrc_sz) |
230 | .word . - omap243x_sram_reprogram_sdrc | 230 | .word . - omap243x_sram_reprogram_sdrc |
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 97eeeebcb066..e2338c0aebcf 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c | |||
@@ -231,7 +231,7 @@ static void __init omap2_gp_clocksource_init(void) | |||
231 | static void __init omap2_gp_timer_init(void) | 231 | static void __init omap2_gp_timer_init(void) |
232 | { | 232 | { |
233 | #ifdef CONFIG_LOCAL_TIMERS | 233 | #ifdef CONFIG_LOCAL_TIMERS |
234 | twd_base = IO_ADDRESS(OMAP44XX_LOCAL_TWD_BASE); | 234 | twd_base = OMAP2_IO_ADDRESS(OMAP44XX_LOCAL_TWD_BASE); |
235 | #endif | 235 | #endif |
236 | omap_dm_timer_init(); | 236 | omap_dm_timer_init(); |
237 | 237 | ||
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index e3ac94f09006..bf0863462101 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -2337,16 +2337,16 @@ static int __init omap_init_dma(void) | |||
2337 | int ch, r; | 2337 | int ch, r; |
2338 | 2338 | ||
2339 | if (cpu_class_is_omap1()) { | 2339 | if (cpu_class_is_omap1()) { |
2340 | omap_dma_base = IO_ADDRESS(OMAP1_DMA_BASE); | 2340 | omap_dma_base = OMAP1_IO_ADDRESS(OMAP1_DMA_BASE); |
2341 | dma_lch_count = OMAP1_LOGICAL_DMA_CH_COUNT; | 2341 | dma_lch_count = OMAP1_LOGICAL_DMA_CH_COUNT; |
2342 | } else if (cpu_is_omap24xx()) { | 2342 | } else if (cpu_is_omap24xx()) { |
2343 | omap_dma_base = IO_ADDRESS(OMAP24XX_DMA4_BASE); | 2343 | omap_dma_base = OMAP2_IO_ADDRESS(OMAP24XX_DMA4_BASE); |
2344 | dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT; | 2344 | dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT; |
2345 | } else if (cpu_is_omap34xx()) { | 2345 | } else if (cpu_is_omap34xx()) { |
2346 | omap_dma_base = IO_ADDRESS(OMAP34XX_DMA4_BASE); | 2346 | omap_dma_base = OMAP2_IO_ADDRESS(OMAP34XX_DMA4_BASE); |
2347 | dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT; | 2347 | dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT; |
2348 | } else if (cpu_is_omap44xx()) { | 2348 | } else if (cpu_is_omap44xx()) { |
2349 | omap_dma_base = IO_ADDRESS(OMAP44XX_DMA4_BASE); | 2349 | omap_dma_base = OMAP2_IO_ADDRESS(OMAP44XX_DMA4_BASE); |
2350 | dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT; | 2350 | dma_lch_count = OMAP_DMA4_LOGICAL_DMA_CH_COUNT; |
2351 | } else { | 2351 | } else { |
2352 | pr_err("DMA init failed for unsupported omap\n"); | 2352 | pr_err("DMA init failed for unsupported omap\n"); |
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 7f50b6103dee..d325b54daeb5 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -774,7 +774,10 @@ int __init omap_dm_timer_init(void) | |||
774 | 774 | ||
775 | for (i = 0; i < dm_timer_count; i++) { | 775 | for (i = 0; i < dm_timer_count; i++) { |
776 | timer = &dm_timers[i]; | 776 | timer = &dm_timers[i]; |
777 | timer->io_base = IO_ADDRESS(timer->phys_base); | 777 | if (cpu_class_is_omap1()) |
778 | timer->io_base = OMAP1_IO_ADDRESS(timer->phys_base); | ||
779 | else | ||
780 | timer->io_base = OMAP2_IO_ADDRESS(timer->phys_base); | ||
778 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ | 781 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ |
779 | defined(CONFIG_ARCH_OMAP4) | 782 | defined(CONFIG_ARCH_OMAP4) |
780 | if (cpu_class_is_omap2()) { | 783 | if (cpu_class_is_omap2()) { |
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 9298bc0ab171..fd63dd3bf4cd 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -31,7 +31,7 @@ | |||
31 | /* | 31 | /* |
32 | * OMAP1510 GPIO registers | 32 | * OMAP1510 GPIO registers |
33 | */ | 33 | */ |
34 | #define OMAP1510_GPIO_BASE IO_ADDRESS(0xfffce000) | 34 | #define OMAP1510_GPIO_BASE OMAP1_IO_ADDRESS(0xfffce000) |
35 | #define OMAP1510_GPIO_DATA_INPUT 0x00 | 35 | #define OMAP1510_GPIO_DATA_INPUT 0x00 |
36 | #define OMAP1510_GPIO_DATA_OUTPUT 0x04 | 36 | #define OMAP1510_GPIO_DATA_OUTPUT 0x04 |
37 | #define OMAP1510_GPIO_DIR_CONTROL 0x08 | 37 | #define OMAP1510_GPIO_DIR_CONTROL 0x08 |
@@ -45,10 +45,10 @@ | |||
45 | /* | 45 | /* |
46 | * OMAP1610 specific GPIO registers | 46 | * OMAP1610 specific GPIO registers |
47 | */ | 47 | */ |
48 | #define OMAP1610_GPIO1_BASE IO_ADDRESS(0xfffbe400) | 48 | #define OMAP1610_GPIO1_BASE OMAP1_IO_ADDRESS(0xfffbe400) |
49 | #define OMAP1610_GPIO2_BASE IO_ADDRESS(0xfffbec00) | 49 | #define OMAP1610_GPIO2_BASE OMAP1_IO_ADDRESS(0xfffbec00) |
50 | #define OMAP1610_GPIO3_BASE IO_ADDRESS(0xfffbb400) | 50 | #define OMAP1610_GPIO3_BASE OMAP1_IO_ADDRESS(0xfffbb400) |
51 | #define OMAP1610_GPIO4_BASE IO_ADDRESS(0xfffbbc00) | 51 | #define OMAP1610_GPIO4_BASE OMAP1_IO_ADDRESS(0xfffbbc00) |
52 | #define OMAP1610_GPIO_REVISION 0x0000 | 52 | #define OMAP1610_GPIO_REVISION 0x0000 |
53 | #define OMAP1610_GPIO_SYSCONFIG 0x0010 | 53 | #define OMAP1610_GPIO_SYSCONFIG 0x0010 |
54 | #define OMAP1610_GPIO_SYSSTATUS 0x0014 | 54 | #define OMAP1610_GPIO_SYSSTATUS 0x0014 |
@@ -70,12 +70,12 @@ | |||
70 | /* | 70 | /* |
71 | * OMAP730 specific GPIO registers | 71 | * OMAP730 specific GPIO registers |
72 | */ | 72 | */ |
73 | #define OMAP730_GPIO1_BASE IO_ADDRESS(0xfffbc000) | 73 | #define OMAP730_GPIO1_BASE OMAP1_IO_ADDRESS(0xfffbc000) |
74 | #define OMAP730_GPIO2_BASE IO_ADDRESS(0xfffbc800) | 74 | #define OMAP730_GPIO2_BASE OMAP1_IO_ADDRESS(0xfffbc800) |
75 | #define OMAP730_GPIO3_BASE IO_ADDRESS(0xfffbd000) | 75 | #define OMAP730_GPIO3_BASE OMAP1_IO_ADDRESS(0xfffbd000) |
76 | #define OMAP730_GPIO4_BASE IO_ADDRESS(0xfffbd800) | 76 | #define OMAP730_GPIO4_BASE OMAP1_IO_ADDRESS(0xfffbd800) |
77 | #define OMAP730_GPIO5_BASE IO_ADDRESS(0xfffbe000) | 77 | #define OMAP730_GPIO5_BASE OMAP1_IO_ADDRESS(0xfffbe000) |
78 | #define OMAP730_GPIO6_BASE IO_ADDRESS(0xfffbe800) | 78 | #define OMAP730_GPIO6_BASE OMAP1_IO_ADDRESS(0xfffbe800) |
79 | #define OMAP730_GPIO_DATA_INPUT 0x00 | 79 | #define OMAP730_GPIO_DATA_INPUT 0x00 |
80 | #define OMAP730_GPIO_DATA_OUTPUT 0x04 | 80 | #define OMAP730_GPIO_DATA_OUTPUT 0x04 |
81 | #define OMAP730_GPIO_DIR_CONTROL 0x08 | 81 | #define OMAP730_GPIO_DIR_CONTROL 0x08 |
@@ -86,12 +86,12 @@ | |||
86 | /* | 86 | /* |
87 | * OMAP850 specific GPIO registers | 87 | * OMAP850 specific GPIO registers |
88 | */ | 88 | */ |
89 | #define OMAP850_GPIO1_BASE IO_ADDRESS(0xfffbc000) | 89 | #define OMAP850_GPIO1_BASE OMAP1_IO_ADDRESS(0xfffbc000) |
90 | #define OMAP850_GPIO2_BASE IO_ADDRESS(0xfffbc800) | 90 | #define OMAP850_GPIO2_BASE OMAP1_IO_ADDRESS(0xfffbc800) |
91 | #define OMAP850_GPIO3_BASE IO_ADDRESS(0xfffbd000) | 91 | #define OMAP850_GPIO3_BASE OMAP1_IO_ADDRESS(0xfffbd000) |
92 | #define OMAP850_GPIO4_BASE IO_ADDRESS(0xfffbd800) | 92 | #define OMAP850_GPIO4_BASE OMAP1_IO_ADDRESS(0xfffbd800) |
93 | #define OMAP850_GPIO5_BASE IO_ADDRESS(0xfffbe000) | 93 | #define OMAP850_GPIO5_BASE OMAP1_IO_ADDRESS(0xfffbe000) |
94 | #define OMAP850_GPIO6_BASE IO_ADDRESS(0xfffbe800) | 94 | #define OMAP850_GPIO6_BASE OMAP1_IO_ADDRESS(0xfffbe800) |
95 | #define OMAP850_GPIO_DATA_INPUT 0x00 | 95 | #define OMAP850_GPIO_DATA_INPUT 0x00 |
96 | #define OMAP850_GPIO_DATA_OUTPUT 0x04 | 96 | #define OMAP850_GPIO_DATA_OUTPUT 0x04 |
97 | #define OMAP850_GPIO_DIR_CONTROL 0x08 | 97 | #define OMAP850_GPIO_DIR_CONTROL 0x08 |
@@ -99,19 +99,21 @@ | |||
99 | #define OMAP850_GPIO_INT_MASK 0x10 | 99 | #define OMAP850_GPIO_INT_MASK 0x10 |
100 | #define OMAP850_GPIO_INT_STATUS 0x14 | 100 | #define OMAP850_GPIO_INT_STATUS 0x14 |
101 | 101 | ||
102 | #define OMAP1_MPUIO_VBASE OMAP1_IO_ADDRESS(OMAP_MPUIO_BASE) | ||
103 | |||
102 | /* | 104 | /* |
103 | * omap24xx specific GPIO registers | 105 | * omap24xx specific GPIO registers |
104 | */ | 106 | */ |
105 | #define OMAP242X_GPIO1_BASE IO_ADDRESS(0x48018000) | 107 | #define OMAP242X_GPIO1_BASE OMAP2_IO_ADDRESS(0x48018000) |
106 | #define OMAP242X_GPIO2_BASE IO_ADDRESS(0x4801a000) | 108 | #define OMAP242X_GPIO2_BASE OMAP2_IO_ADDRESS(0x4801a000) |
107 | #define OMAP242X_GPIO3_BASE IO_ADDRESS(0x4801c000) | 109 | #define OMAP242X_GPIO3_BASE OMAP2_IO_ADDRESS(0x4801c000) |
108 | #define OMAP242X_GPIO4_BASE IO_ADDRESS(0x4801e000) | 110 | #define OMAP242X_GPIO4_BASE OMAP2_IO_ADDRESS(0x4801e000) |
109 | 111 | ||
110 | #define OMAP243X_GPIO1_BASE IO_ADDRESS(0x4900C000) | 112 | #define OMAP243X_GPIO1_BASE OMAP2_IO_ADDRESS(0x4900C000) |
111 | #define OMAP243X_GPIO2_BASE IO_ADDRESS(0x4900E000) | 113 | #define OMAP243X_GPIO2_BASE OMAP2_IO_ADDRESS(0x4900E000) |
112 | #define OMAP243X_GPIO3_BASE IO_ADDRESS(0x49010000) | 114 | #define OMAP243X_GPIO3_BASE OMAP2_IO_ADDRESS(0x49010000) |
113 | #define OMAP243X_GPIO4_BASE IO_ADDRESS(0x49012000) | 115 | #define OMAP243X_GPIO4_BASE OMAP2_IO_ADDRESS(0x49012000) |
114 | #define OMAP243X_GPIO5_BASE IO_ADDRESS(0x480B6000) | 116 | #define OMAP243X_GPIO5_BASE OMAP2_IO_ADDRESS(0x480B6000) |
115 | 117 | ||
116 | #define OMAP24XX_GPIO_REVISION 0x0000 | 118 | #define OMAP24XX_GPIO_REVISION 0x0000 |
117 | #define OMAP24XX_GPIO_SYSCONFIG 0x0010 | 119 | #define OMAP24XX_GPIO_SYSCONFIG 0x0010 |
@@ -142,24 +144,22 @@ | |||
142 | * omap34xx specific GPIO registers | 144 | * omap34xx specific GPIO registers |
143 | */ | 145 | */ |
144 | 146 | ||
145 | #define OMAP34XX_GPIO1_BASE IO_ADDRESS(0x48310000) | 147 | #define OMAP34XX_GPIO1_BASE OMAP2_IO_ADDRESS(0x48310000) |
146 | #define OMAP34XX_GPIO2_BASE IO_ADDRESS(0x49050000) | 148 | #define OMAP34XX_GPIO2_BASE OMAP2_IO_ADDRESS(0x49050000) |
147 | #define OMAP34XX_GPIO3_BASE IO_ADDRESS(0x49052000) | 149 | #define OMAP34XX_GPIO3_BASE OMAP2_IO_ADDRESS(0x49052000) |
148 | #define OMAP34XX_GPIO4_BASE IO_ADDRESS(0x49054000) | 150 | #define OMAP34XX_GPIO4_BASE OMAP2_IO_ADDRESS(0x49054000) |
149 | #define OMAP34XX_GPIO5_BASE IO_ADDRESS(0x49056000) | 151 | #define OMAP34XX_GPIO5_BASE OMAP2_IO_ADDRESS(0x49056000) |
150 | #define OMAP34XX_GPIO6_BASE IO_ADDRESS(0x49058000) | 152 | #define OMAP34XX_GPIO6_BASE OMAP2_IO_ADDRESS(0x49058000) |
151 | 153 | ||
152 | /* | 154 | /* |
153 | * OMAP44XX specific GPIO registers | 155 | * OMAP44XX specific GPIO registers |
154 | */ | 156 | */ |
155 | #define OMAP44XX_GPIO1_BASE IO_ADDRESS(0x4a310000) | 157 | #define OMAP44XX_GPIO1_BASE OMAP2_IO_ADDRESS(0x4a310000) |
156 | #define OMAP44XX_GPIO2_BASE IO_ADDRESS(0x48055000) | 158 | #define OMAP44XX_GPIO2_BASE OMAP2_IO_ADDRESS(0x48055000) |
157 | #define OMAP44XX_GPIO3_BASE IO_ADDRESS(0x48057000) | 159 | #define OMAP44XX_GPIO3_BASE OMAP2_IO_ADDRESS(0x48057000) |
158 | #define OMAP44XX_GPIO4_BASE IO_ADDRESS(0x48059000) | 160 | #define OMAP44XX_GPIO4_BASE OMAP2_IO_ADDRESS(0x48059000) |
159 | #define OMAP44XX_GPIO5_BASE IO_ADDRESS(0x4805B000) | 161 | #define OMAP44XX_GPIO5_BASE OMAP2_IO_ADDRESS(0x4805B000) |
160 | #define OMAP44XX_GPIO6_BASE IO_ADDRESS(0x4805D000) | 162 | #define OMAP44XX_GPIO6_BASE OMAP2_IO_ADDRESS(0x4805D000) |
161 | |||
162 | #define OMAP_MPUIO_VBASE IO_ADDRESS(OMAP_MPUIO_BASE) | ||
163 | 163 | ||
164 | struct gpio_bank { | 164 | struct gpio_bank { |
165 | void __iomem *base; | 165 | void __iomem *base; |
@@ -195,7 +195,7 @@ struct gpio_bank { | |||
195 | 195 | ||
196 | #ifdef CONFIG_ARCH_OMAP16XX | 196 | #ifdef CONFIG_ARCH_OMAP16XX |
197 | static struct gpio_bank gpio_bank_1610[5] = { | 197 | static struct gpio_bank gpio_bank_1610[5] = { |
198 | { OMAP_MPUIO_VBASE, INT_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO}, | 198 | { OMAP1_MPUIO_VBASE, INT_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO}, |
199 | { OMAP1610_GPIO1_BASE, INT_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_1610 }, | 199 | { OMAP1610_GPIO1_BASE, INT_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_1610 }, |
200 | { OMAP1610_GPIO2_BASE, INT_1610_GPIO_BANK2, IH_GPIO_BASE + 16, METHOD_GPIO_1610 }, | 200 | { OMAP1610_GPIO2_BASE, INT_1610_GPIO_BANK2, IH_GPIO_BASE + 16, METHOD_GPIO_1610 }, |
201 | { OMAP1610_GPIO3_BASE, INT_1610_GPIO_BANK3, IH_GPIO_BASE + 32, METHOD_GPIO_1610 }, | 201 | { OMAP1610_GPIO3_BASE, INT_1610_GPIO_BANK3, IH_GPIO_BASE + 32, METHOD_GPIO_1610 }, |
@@ -205,14 +205,14 @@ static struct gpio_bank gpio_bank_1610[5] = { | |||
205 | 205 | ||
206 | #ifdef CONFIG_ARCH_OMAP15XX | 206 | #ifdef CONFIG_ARCH_OMAP15XX |
207 | static struct gpio_bank gpio_bank_1510[2] = { | 207 | static struct gpio_bank gpio_bank_1510[2] = { |
208 | { OMAP_MPUIO_VBASE, INT_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO }, | 208 | { OMAP1_MPUIO_VBASE, INT_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO }, |
209 | { OMAP1510_GPIO_BASE, INT_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_1510 } | 209 | { OMAP1510_GPIO_BASE, INT_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_1510 } |
210 | }; | 210 | }; |
211 | #endif | 211 | #endif |
212 | 212 | ||
213 | #ifdef CONFIG_ARCH_OMAP730 | 213 | #ifdef CONFIG_ARCH_OMAP730 |
214 | static struct gpio_bank gpio_bank_730[7] = { | 214 | static struct gpio_bank gpio_bank_730[7] = { |
215 | { OMAP_MPUIO_VBASE, INT_730_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO }, | 215 | { OMAP1_MPUIO_VBASE, INT_730_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO }, |
216 | { OMAP730_GPIO1_BASE, INT_730_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_730 }, | 216 | { OMAP730_GPIO1_BASE, INT_730_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_730 }, |
217 | { OMAP730_GPIO2_BASE, INT_730_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_730 }, | 217 | { OMAP730_GPIO2_BASE, INT_730_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_730 }, |
218 | { OMAP730_GPIO3_BASE, INT_730_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_730 }, | 218 | { OMAP730_GPIO3_BASE, INT_730_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_730 }, |
diff --git a/arch/arm/plat-omap/include/mach/control.h b/arch/arm/plat-omap/include/mach/control.h index 8140dbccb7bc..826d317cdbec 100644 --- a/arch/arm/plat-omap/include/mach/control.h +++ b/arch/arm/plat-omap/include/mach/control.h | |||
@@ -20,15 +20,15 @@ | |||
20 | 20 | ||
21 | #ifndef __ASSEMBLY__ | 21 | #ifndef __ASSEMBLY__ |
22 | #define OMAP242X_CTRL_REGADDR(reg) \ | 22 | #define OMAP242X_CTRL_REGADDR(reg) \ |
23 | IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) | 23 | OMAP2_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) |
24 | #define OMAP243X_CTRL_REGADDR(reg) \ | 24 | #define OMAP243X_CTRL_REGADDR(reg) \ |
25 | IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) | 25 | OMAP2_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) |
26 | #define OMAP343X_CTRL_REGADDR(reg) \ | 26 | #define OMAP343X_CTRL_REGADDR(reg) \ |
27 | IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) | 27 | OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) |
28 | #else | 28 | #else |
29 | #define OMAP242X_CTRL_REGADDR(reg) IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) | 29 | #define OMAP242X_CTRL_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) |
30 | #define OMAP243X_CTRL_REGADDR(reg) IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) | 30 | #define OMAP243X_CTRL_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) |
31 | #define OMAP343X_CTRL_REGADDR(reg) IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) | 31 | #define OMAP343X_CTRL_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) |
32 | #endif /* __ASSEMBLY__ */ | 32 | #endif /* __ASSEMBLY__ */ |
33 | 33 | ||
34 | /* | 34 | /* |
diff --git a/arch/arm/plat-omap/include/mach/entry-macro.S b/arch/arm/plat-omap/include/mach/entry-macro.S index 56426ed45ef4..a5592991634d 100644 --- a/arch/arm/plat-omap/include/mach/entry-macro.S +++ b/arch/arm/plat-omap/include/mach/entry-macro.S | |||
@@ -41,7 +41,7 @@ | |||
41 | .endm | 41 | .endm |
42 | 42 | ||
43 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 43 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
44 | ldr \base, =IO_ADDRESS(OMAP_IH1_BASE) | 44 | ldr \base, =OMAP1_IO_ADDRESS(OMAP_IH1_BASE) |
45 | ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET] | 45 | ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET] |
46 | ldr \tmp, [\base, #IRQ_MIR_REG_OFFSET] | 46 | ldr \tmp, [\base, #IRQ_MIR_REG_OFFSET] |
47 | mov \irqstat, #0xffffffff | 47 | mov \irqstat, #0xffffffff |
@@ -53,7 +53,7 @@ | |||
53 | cmp \irqnr, #0 | 53 | cmp \irqnr, #0 |
54 | ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] | 54 | ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] |
55 | cmpeq \irqnr, #INT_IH2_IRQ | 55 | cmpeq \irqnr, #INT_IH2_IRQ |
56 | ldreq \base, =IO_ADDRESS(OMAP_IH2_BASE) | 56 | ldreq \base, =OMAP1_IO_ADDRESS(OMAP_IH2_BASE) |
57 | ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] | 57 | ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] |
58 | addeqs \irqnr, \irqnr, #32 | 58 | addeqs \irqnr, \irqnr, #32 |
59 | 1510: | 59 | 1510: |
@@ -68,9 +68,9 @@ | |||
68 | 68 | ||
69 | /* REVISIT: This should be set dynamically if CONFIG_MULTI_OMAP2 is selected */ | 69 | /* REVISIT: This should be set dynamically if CONFIG_MULTI_OMAP2 is selected */ |
70 | #if defined(CONFIG_ARCH_OMAP2420) || defined(CONFIG_ARCH_OMAP2430) | 70 | #if defined(CONFIG_ARCH_OMAP2420) || defined(CONFIG_ARCH_OMAP2430) |
71 | #define OMAP2_VA_IC_BASE IO_ADDRESS(OMAP24XX_IC_BASE) | 71 | #define OMAP2_VA_IC_BASE OMAP2_IO_ADDRESS(OMAP24XX_IC_BASE) |
72 | #elif defined(CONFIG_ARCH_OMAP34XX) | 72 | #elif defined(CONFIG_ARCH_OMAP34XX) |
73 | #define OMAP2_VA_IC_BASE IO_ADDRESS(OMAP34XX_IC_BASE) | 73 | #define OMAP2_VA_IC_BASE OMAP2_IO_ADDRESS(OMAP34XX_IC_BASE) |
74 | #endif | 74 | #endif |
75 | #if defined(CONFIG_ARCH_OMAP4) | 75 | #if defined(CONFIG_ARCH_OMAP4) |
76 | #include <mach/omap44xx.h> | 76 | #include <mach/omap44xx.h> |
diff --git a/arch/arm/plat-omap/include/mach/io.h b/arch/arm/plat-omap/include/mach/io.h index 21fb0efdda86..55659809478e 100644 --- a/arch/arm/plat-omap/include/mach/io.h +++ b/arch/arm/plat-omap/include/mach/io.h | |||
@@ -54,15 +54,23 @@ | |||
54 | * ---------------------------------------------------------------------------- | 54 | * ---------------------------------------------------------------------------- |
55 | */ | 55 | */ |
56 | 56 | ||
57 | #ifdef __ASSEMBLER__ | ||
58 | #define IOMEM(x) (x) | ||
59 | #else | ||
60 | #define IOMEM(x) ((void __force __iomem *)(x)) | ||
61 | #endif | ||
62 | |||
63 | #define OMAP1_IO_OFFSET 0x01000000 /* Virtual IO = 0xfefb0000 */ | ||
64 | #define OMAP1_IO_ADDRESS(pa) IOMEM((pa) - OMAP1_IO_OFFSET) | ||
65 | |||
66 | #define OMAP2_IO_OFFSET 0x90000000 | ||
67 | #define OMAP2_IO_ADDRESS(pa) IOMEM((pa) + OMAP2_IO_OFFSET) /* L3 and L4 */ | ||
68 | |||
57 | #if defined(CONFIG_ARCH_OMAP1) | 69 | #if defined(CONFIG_ARCH_OMAP1) |
58 | 70 | ||
59 | #define IO_PHYS 0xFFFB0000 | 71 | #define IO_PHYS 0xFFFB0000 |
60 | #define IO_OFFSET 0x01000000 /* Virtual IO = 0xfefb0000 */ | ||
61 | #define IO_SIZE 0x40000 | 72 | #define IO_SIZE 0x40000 |
62 | #define IO_VIRT (IO_PHYS - IO_OFFSET) | 73 | #define IO_VIRT (IO_PHYS - OMAP1_IO_OFFSET) |
63 | #define __IO_ADDRESS(pa) ((pa) - IO_OFFSET) | ||
64 | #define __OMAP1_IO_ADDRESS(pa) ((pa) - IO_OFFSET) | ||
65 | #define io_v2p(va) ((va) + IO_OFFSET) | ||
66 | 74 | ||
67 | #elif defined(CONFIG_ARCH_OMAP2) | 75 | #elif defined(CONFIG_ARCH_OMAP2) |
68 | 76 | ||
@@ -87,11 +95,6 @@ | |||
87 | #define OMAP243X_SMS_VIRT 0xFC000000 | 95 | #define OMAP243X_SMS_VIRT 0xFC000000 |
88 | #define OMAP243X_SMS_SIZE SZ_1M | 96 | #define OMAP243X_SMS_SIZE SZ_1M |
89 | 97 | ||
90 | #define IO_OFFSET 0x90000000 | ||
91 | #define __IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */ | ||
92 | #define __OMAP2_IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */ | ||
93 | #define io_v2p(va) ((va) - IO_OFFSET) /* Works for L3 and L4 */ | ||
94 | |||
95 | /* DSP */ | 98 | /* DSP */ |
96 | #define DSP_MEM_24XX_PHYS OMAP2420_DSP_MEM_BASE /* 0x58000000 */ | 99 | #define DSP_MEM_24XX_PHYS OMAP2420_DSP_MEM_BASE /* 0x58000000 */ |
97 | #define DSP_MEM_24XX_VIRT 0xe0000000 | 100 | #define DSP_MEM_24XX_VIRT 0xe0000000 |
@@ -143,12 +146,6 @@ | |||
143 | #define OMAP343X_SDRC_VIRT 0xFD000000 | 146 | #define OMAP343X_SDRC_VIRT 0xFD000000 |
144 | #define OMAP343X_SDRC_SIZE SZ_1M | 147 | #define OMAP343X_SDRC_SIZE SZ_1M |
145 | 148 | ||
146 | |||
147 | #define IO_OFFSET 0x90000000 | ||
148 | #define __IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */ | ||
149 | #define __OMAP2_IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */ | ||
150 | #define io_v2p(va) ((va) - IO_OFFSET)/* Works for L3 and L4 */ | ||
151 | |||
152 | /* DSP */ | 149 | /* DSP */ |
153 | #define DSP_MEM_34XX_PHYS OMAP34XX_DSP_MEM_BASE /* 0x58000000 */ | 150 | #define DSP_MEM_34XX_PHYS OMAP34XX_DSP_MEM_BASE /* 0x58000000 */ |
154 | #define DSP_MEM_34XX_VIRT 0xe0000000 | 151 | #define DSP_MEM_34XX_VIRT 0xe0000000 |
@@ -188,39 +185,20 @@ | |||
188 | #define OMAP44XX_GPMC_VIRT 0xe0000000 | 185 | #define OMAP44XX_GPMC_VIRT 0xe0000000 |
189 | #define OMAP44XX_GPMC_SIZE SZ_1M | 186 | #define OMAP44XX_GPMC_SIZE SZ_1M |
190 | 187 | ||
191 | |||
192 | #define IO_OFFSET 0x90000000 | ||
193 | #define __IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */ | ||
194 | #define __OMAP2_IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */ | ||
195 | #define io_v2p(va) ((va) - IO_OFFSET)/* Works for L3 and L4 */ | ||
196 | |||
197 | #endif | 188 | #endif |
198 | 189 | ||
199 | #define IO_ADDRESS(pa) IOMEM(__IO_ADDRESS(pa)) | 190 | #ifndef __ASSEMBLER__ |
200 | #define OMAP1_IO_ADDRESS(pa) IOMEM(__OMAP1_IO_ADDRESS(pa)) | ||
201 | #define OMAP2_IO_ADDRESS(pa) IOMEM(__OMAP2_IO_ADDRESS(pa)) | ||
202 | |||
203 | #ifdef __ASSEMBLER__ | ||
204 | #define IOMEM(x) (x) | ||
205 | #else | ||
206 | #define IOMEM(x) ((void __force __iomem *)(x)) | ||
207 | 191 | ||
208 | /* | 192 | /* |
209 | * Functions to access the OMAP IO region | 193 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these |
210 | * | ||
211 | * NOTE: - Use omap_read/write[bwl] for physical register addresses | ||
212 | * - Use __raw_read/write[bwl]() for virtual register addresses | ||
213 | * - Use IO_ADDRESS(phys_addr) to convert registers to virtual addresses | ||
214 | * - DO NOT use hardcoded virtual addresses to allow changing the | ||
215 | * IO address space again if needed | ||
216 | */ | 194 | */ |
217 | #define omap_readb(a) __raw_readb(IO_ADDRESS(a)) | ||
218 | #define omap_readw(a) __raw_readw(IO_ADDRESS(a)) | ||
219 | #define omap_readl(a) __raw_readl(IO_ADDRESS(a)) | ||
220 | 195 | ||
221 | #define omap_writeb(v,a) __raw_writeb(v, IO_ADDRESS(a)) | 196 | extern u8 omap_readb(u32 pa); |
222 | #define omap_writew(v,a) __raw_writew(v, IO_ADDRESS(a)) | 197 | extern u16 omap_readw(u32 pa); |
223 | #define omap_writel(v,a) __raw_writel(v, IO_ADDRESS(a)) | 198 | extern u32 omap_readl(u32 pa); |
199 | extern void omap_writeb(u8 v, u32 pa); | ||
200 | extern void omap_writew(u16 v, u32 pa); | ||
201 | extern void omap_writel(u32 v, u32 pa); | ||
224 | 202 | ||
225 | struct omap_sdrc_params; | 203 | struct omap_sdrc_params; |
226 | 204 | ||
diff --git a/arch/arm/plat-omap/include/mach/mtd-xip.h b/arch/arm/plat-omap/include/mach/mtd-xip.h index 39b591ff54bb..f82a8dcaad94 100644 --- a/arch/arm/plat-omap/include/mach/mtd-xip.h +++ b/arch/arm/plat-omap/include/mach/mtd-xip.h | |||
@@ -25,7 +25,7 @@ typedef struct { | |||
25 | } xip_omap_mpu_timer_regs_t; | 25 | } xip_omap_mpu_timer_regs_t; |
26 | 26 | ||
27 | #define xip_omap_mpu_timer_base(n) \ | 27 | #define xip_omap_mpu_timer_base(n) \ |
28 | ((volatile xip_omap_mpu_timer_regs_t*)IO_ADDRESS(OMAP_MPU_TIMER_BASE + \ | 28 | ((volatile xip_omap_mpu_timer_regs_t*)OMAP1_IO_ADDRESS(OMAP_MPU_TIMER_BASE + \ |
29 | (n)*OMAP_MPU_TIMER_OFFSET)) | 29 | (n)*OMAP_MPU_TIMER_OFFSET)) |
30 | 30 | ||
31 | static inline unsigned long xip_omap_mpu_timer_read(int nr) | 31 | static inline unsigned long xip_omap_mpu_timer_read(int nr) |
diff --git a/arch/arm/plat-omap/include/mach/omap44xx.h b/arch/arm/plat-omap/include/mach/omap44xx.h index 15dec7f1c7c0..b3ba5ac7b4a4 100644 --- a/arch/arm/plat-omap/include/mach/omap44xx.h +++ b/arch/arm/plat-omap/include/mach/omap44xx.h | |||
@@ -33,14 +33,14 @@ | |||
33 | #define IRQ_SIR_IRQ 0x0040 | 33 | #define IRQ_SIR_IRQ 0x0040 |
34 | #define OMAP44XX_GIC_DIST_BASE 0x48241000 | 34 | #define OMAP44XX_GIC_DIST_BASE 0x48241000 |
35 | #define OMAP44XX_GIC_CPU_BASE 0x48240100 | 35 | #define OMAP44XX_GIC_CPU_BASE 0x48240100 |
36 | #define OMAP44XX_VA_GIC_CPU_BASE IO_ADDRESS(OMAP44XX_GIC_CPU_BASE) | 36 | #define OMAP44XX_VA_GIC_CPU_BASE OMAP2_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE) |
37 | #define OMAP44XX_SCU_BASE 0x48240000 | 37 | #define OMAP44XX_SCU_BASE 0x48240000 |
38 | #define OMAP44XX_VA_SCU_BASE IO_ADDRESS(OMAP44XX_SCU_BASE) | 38 | #define OMAP44XX_VA_SCU_BASE OMAP2_IO_ADDRESS(OMAP44XX_SCU_BASE) |
39 | #define OMAP44XX_LOCAL_TWD_BASE 0x48240600 | 39 | #define OMAP44XX_LOCAL_TWD_BASE 0x48240600 |
40 | #define OMAP44XX_VA_LOCAL_TWD_BASE IO_ADDRESS(OMAP44XX_LOCAL_TWD_BASE) | 40 | #define OMAP44XX_VA_LOCAL_TWD_BASE OMAP2_IO_ADDRESS(OMAP44XX_LOCAL_TWD_BASE) |
41 | #define OMAP44XX_LOCAL_TWD_SIZE 0x00000100 | 41 | #define OMAP44XX_LOCAL_TWD_SIZE 0x00000100 |
42 | #define OMAP44XX_WKUPGEN_BASE 0x48281000 | 42 | #define OMAP44XX_WKUPGEN_BASE 0x48281000 |
43 | #define OMAP44XX_VA_WKUPGEN_BASE IO_ADDRESS(OMAP44XX_WKUPGEN_BASE) | 43 | #define OMAP44XX_VA_WKUPGEN_BASE OMAP2_IO_ADDRESS(OMAP44XX_WKUPGEN_BASE) |
44 | 44 | ||
45 | #endif /* __ASM_ARCH_OMAP44XX_H */ | 45 | #endif /* __ASM_ARCH_OMAP44XX_H */ |
46 | 46 | ||
diff --git a/arch/arm/plat-omap/include/mach/sdrc.h b/arch/arm/plat-omap/include/mach/sdrc.h index 0be18e4ff182..93f70d2cbce1 100644 --- a/arch/arm/plat-omap/include/mach/sdrc.h +++ b/arch/arm/plat-omap/include/mach/sdrc.h | |||
@@ -71,11 +71,11 @@ | |||
71 | */ | 71 | */ |
72 | 72 | ||
73 | #define OMAP242X_SMS_REGADDR(reg) \ | 73 | #define OMAP242X_SMS_REGADDR(reg) \ |
74 | (void __iomem *)IO_ADDRESS(OMAP2420_SMS_BASE + reg) | 74 | (void __iomem *)OMAP2_IO_ADDRESS(OMAP2420_SMS_BASE + reg) |
75 | #define OMAP243X_SMS_REGADDR(reg) \ | 75 | #define OMAP243X_SMS_REGADDR(reg) \ |
76 | (void __iomem *)IO_ADDRESS(OMAP243X_SMS_BASE + reg) | 76 | (void __iomem *)OMAP2_IO_ADDRESS(OMAP243X_SMS_BASE + reg) |
77 | #define OMAP343X_SMS_REGADDR(reg) \ | 77 | #define OMAP343X_SMS_REGADDR(reg) \ |
78 | (void __iomem *)IO_ADDRESS(OMAP343X_SMS_BASE + reg) | 78 | (void __iomem *)OMAP2_IO_ADDRESS(OMAP343X_SMS_BASE + reg) |
79 | 79 | ||
80 | /* SMS register offsets - read/write with sms_{read,write}_reg() */ | 80 | /* SMS register offsets - read/write with sms_{read,write}_reg() */ |
81 | 81 | ||
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c index 9b42d72d96cf..d491ad15f198 100644 --- a/arch/arm/plat-omap/io.c +++ b/arch/arm/plat-omap/io.c | |||
@@ -132,3 +132,61 @@ void omap_iounmap(volatile void __iomem *addr) | |||
132 | __iounmap(addr); | 132 | __iounmap(addr); |
133 | } | 133 | } |
134 | EXPORT_SYMBOL(omap_iounmap); | 134 | EXPORT_SYMBOL(omap_iounmap); |
135 | |||
136 | /* | ||
137 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these | ||
138 | */ | ||
139 | |||
140 | u8 omap_readb(u32 pa) | ||
141 | { | ||
142 | if (cpu_class_is_omap1()) | ||
143 | return __raw_readb(OMAP1_IO_ADDRESS(pa)); | ||
144 | else | ||
145 | return __raw_readb(OMAP2_IO_ADDRESS(pa)); | ||
146 | } | ||
147 | EXPORT_SYMBOL(omap_readb); | ||
148 | |||
149 | u16 omap_readw(u32 pa) | ||
150 | { | ||
151 | if (cpu_class_is_omap1()) | ||
152 | return __raw_readw(OMAP1_IO_ADDRESS(pa)); | ||
153 | else | ||
154 | return __raw_readw(OMAP2_IO_ADDRESS(pa)); | ||
155 | } | ||
156 | EXPORT_SYMBOL(omap_readw); | ||
157 | |||
158 | u32 omap_readl(u32 pa) | ||
159 | { | ||
160 | if (cpu_class_is_omap1()) | ||
161 | return __raw_readl(OMAP1_IO_ADDRESS(pa)); | ||
162 | else | ||
163 | return __raw_readl(OMAP2_IO_ADDRESS(pa)); | ||
164 | } | ||
165 | EXPORT_SYMBOL(omap_readl); | ||
166 | |||
167 | void omap_writeb(u8 v, u32 pa) | ||
168 | { | ||
169 | if (cpu_class_is_omap1()) | ||
170 | __raw_writeb(v, OMAP1_IO_ADDRESS(pa)); | ||
171 | else | ||
172 | __raw_writeb(v, OMAP2_IO_ADDRESS(pa)); | ||
173 | } | ||
174 | EXPORT_SYMBOL(omap_writeb); | ||
175 | |||
176 | void omap_writew(u16 v, u32 pa) | ||
177 | { | ||
178 | if (cpu_class_is_omap1()) | ||
179 | __raw_writew(v, OMAP1_IO_ADDRESS(pa)); | ||
180 | else | ||
181 | __raw_writew(v, OMAP2_IO_ADDRESS(pa)); | ||
182 | } | ||
183 | EXPORT_SYMBOL(omap_writew); | ||
184 | |||
185 | void omap_writel(u32 v, u32 pa) | ||
186 | { | ||
187 | if (cpu_class_is_omap1()) | ||
188 | __raw_writel(v, OMAP1_IO_ADDRESS(pa)); | ||
189 | else | ||
190 | __raw_writel(v, OMAP2_IO_ADDRESS(pa)); | ||
191 | } | ||
192 | EXPORT_SYMBOL(omap_writel); | ||
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index 5eae7876979c..925f64711c37 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -56,16 +56,16 @@ | |||
56 | #define SRAM_BOOTLOADER_SZ 0x80 | 56 | #define SRAM_BOOTLOADER_SZ 0x80 |
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | #define OMAP24XX_VA_REQINFOPERM0 IO_ADDRESS(0x68005048) | 59 | #define OMAP24XX_VA_REQINFOPERM0 OMAP2_IO_ADDRESS(0x68005048) |
60 | #define OMAP24XX_VA_READPERM0 IO_ADDRESS(0x68005050) | 60 | #define OMAP24XX_VA_READPERM0 OMAP2_IO_ADDRESS(0x68005050) |
61 | #define OMAP24XX_VA_WRITEPERM0 IO_ADDRESS(0x68005058) | 61 | #define OMAP24XX_VA_WRITEPERM0 OMAP2_IO_ADDRESS(0x68005058) |
62 | 62 | ||
63 | #define OMAP34XX_VA_REQINFOPERM0 IO_ADDRESS(0x68012848) | 63 | #define OMAP34XX_VA_REQINFOPERM0 OMAP2_IO_ADDRESS(0x68012848) |
64 | #define OMAP34XX_VA_READPERM0 IO_ADDRESS(0x68012850) | 64 | #define OMAP34XX_VA_READPERM0 OMAP2_IO_ADDRESS(0x68012850) |
65 | #define OMAP34XX_VA_WRITEPERM0 IO_ADDRESS(0x68012858) | 65 | #define OMAP34XX_VA_WRITEPERM0 OMAP2_IO_ADDRESS(0x68012858) |
66 | #define OMAP34XX_VA_ADDR_MATCH2 IO_ADDRESS(0x68012880) | 66 | #define OMAP34XX_VA_ADDR_MATCH2 OMAP2_IO_ADDRESS(0x68012880) |
67 | #define OMAP34XX_VA_SMS_RG_ATT0 IO_ADDRESS(0x6C000048) | 67 | #define OMAP34XX_VA_SMS_RG_ATT0 OMAP2_IO_ADDRESS(0x6C000048) |
68 | #define OMAP34XX_VA_CONTROL_STAT IO_ADDRESS(0x480022F0) | 68 | #define OMAP34XX_VA_CONTROL_STAT OMAP2_IO_ADDRESS(0x480022F0) |
69 | 69 | ||
70 | #define GP_DEVICE 0x300 | 70 | #define GP_DEVICE 0x300 |
71 | 71 | ||
diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c index 148cbcc39602..915439dc05a0 100644 --- a/drivers/video/omap/dispc.c +++ b/drivers/video/omap/dispc.c | |||
@@ -212,9 +212,9 @@ static void enable_rfbi_mode(int enable) | |||
212 | dispc_write_reg(DISPC_CONTROL, l); | 212 | dispc_write_reg(DISPC_CONTROL, l); |
213 | 213 | ||
214 | /* Set bypass mode in RFBI module */ | 214 | /* Set bypass mode in RFBI module */ |
215 | l = __raw_readl(IO_ADDRESS(RFBI_CONTROL)); | 215 | l = __raw_readl(OMAP2_IO_ADDRESS(RFBI_CONTROL)); |
216 | l |= enable ? 0 : (1 << 1); | 216 | l |= enable ? 0 : (1 << 1); |
217 | __raw_writel(l, IO_ADDRESS(RFBI_CONTROL)); | 217 | __raw_writel(l, OMAP2_IO_ADDRESS(RFBI_CONTROL)); |
218 | } | 218 | } |
219 | 219 | ||
220 | static void set_lcd_data_lines(int data_lines) | 220 | static void set_lcd_data_lines(int data_lines) |
@@ -1421,7 +1421,7 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode, | |||
1421 | } | 1421 | } |
1422 | 1422 | ||
1423 | /* L3 firewall setting: enable access to OCM RAM */ | 1423 | /* L3 firewall setting: enable access to OCM RAM */ |
1424 | __raw_writel(0x402000b0, IO_ADDRESS(0x680050a0)); | 1424 | __raw_writel(0x402000b0, OMAP2_IO_ADDRESS(0x680050a0)); |
1425 | 1425 | ||
1426 | if ((r = alloc_palette_ram()) < 0) | 1426 | if ((r = alloc_palette_ram()) < 0) |
1427 | goto fail2; | 1427 | goto fail2; |