aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-10-25 09:54:58 -0400
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-11-17 02:58:10 -0500
commitcf3a6aba2f8402d4e45f7f263a0e69f779cd1bdc (patch)
treeb5b08375df395aff49d74810fc4b581d6a57cea6
parent08ff97b5214143c3bd47add6ec49097cb848120a (diff)
ARM: imx: remove last explicit users of virtual base address defines
This allows changing the mapping without the need to adapt all users. While at it remove some unneeded casts to void __iomem *, this is already taken care for in the IO_ADDRESS macros Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-rw-r--r--arch/arm/mach-imx/devices.c8
-rw-r--r--arch/arm/mach-mx25/devices.c8
-rw-r--r--arch/arm/mach-mx25/mm.c2
-rw-r--r--arch/arm/plat-mxc/include/mach/mx25.h9
4 files changed, 13 insertions, 14 deletions
diff --git a/arch/arm/mach-imx/devices.c b/arch/arm/mach-imx/devices.c
index fba5047de8b1..e69e46eac45d 100644
--- a/arch/arm/mach-imx/devices.c
+++ b/arch/arm/mach-imx/devices.c
@@ -159,22 +159,22 @@ struct platform_device imx_usb_device = {
159static struct mxc_gpio_port imx_gpio_ports[] = { 159static struct mxc_gpio_port imx_gpio_ports[] = {
160 { 160 {
161 .chip.label = "gpio-0", 161 .chip.label = "gpio-0",
162 .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR), 162 .base = MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR),
163 .irq = MX1_GPIO_INT_PORTA, 163 .irq = MX1_GPIO_INT_PORTA,
164 .virtual_irq_start = MXC_GPIO_IRQ_START, 164 .virtual_irq_start = MXC_GPIO_IRQ_START,
165 }, { 165 }, {
166 .chip.label = "gpio-1", 166 .chip.label = "gpio-1",
167 .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x100), 167 .base = MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x100),
168 .irq = MX1_GPIO_INT_PORTB, 168 .irq = MX1_GPIO_INT_PORTB,
169 .virtual_irq_start = MXC_GPIO_IRQ_START + 32, 169 .virtual_irq_start = MXC_GPIO_IRQ_START + 32,
170 }, { 170 }, {
171 .chip.label = "gpio-2", 171 .chip.label = "gpio-2",
172 .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x200), 172 .base = MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x200),
173 .irq = MX1_GPIO_INT_PORTC, 173 .irq = MX1_GPIO_INT_PORTC,
174 .virtual_irq_start = MXC_GPIO_IRQ_START + 64, 174 .virtual_irq_start = MXC_GPIO_IRQ_START + 64,
175 }, { 175 }, {
176 .chip.label = "gpio-3", 176 .chip.label = "gpio-3",
177 .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x300), 177 .base = MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x300),
178 .irq = MX1_GPIO_INT_PORTD, 178 .irq = MX1_GPIO_INT_PORTD,
179 .virtual_irq_start = MXC_GPIO_IRQ_START + 96, 179 .virtual_irq_start = MXC_GPIO_IRQ_START + 96,
180 } 180 }
diff --git a/arch/arm/mach-mx25/devices.c b/arch/arm/mach-mx25/devices.c
index 1d0eb3e85941..92eb1a90b52c 100644
--- a/arch/arm/mach-mx25/devices.c
+++ b/arch/arm/mach-mx25/devices.c
@@ -182,22 +182,22 @@ struct platform_device mxc_pwm_device3 = {
182static struct mxc_gpio_port imx_gpio_ports[] = { 182static struct mxc_gpio_port imx_gpio_ports[] = {
183 { 183 {
184 .chip.label = "gpio-0", 184 .chip.label = "gpio-0",
185 .base = (void __iomem *)MX25_GPIO1_BASE_ADDR_VIRT, 185 .base = MX25_IO_ADDRESS(MX25_GPIO1_BASE_ADDR),
186 .irq = 52, 186 .irq = 52,
187 .virtual_irq_start = MXC_GPIO_IRQ_START, 187 .virtual_irq_start = MXC_GPIO_IRQ_START,
188 }, { 188 }, {
189 .chip.label = "gpio-1", 189 .chip.label = "gpio-1",
190 .base = (void __iomem *)MX25_GPIO2_BASE_ADDR_VIRT, 190 .base = MX25_IO_ADDRESS(MX25_GPIO2_BASE_ADDR),
191 .irq = 51, 191 .irq = 51,
192 .virtual_irq_start = MXC_GPIO_IRQ_START + 32, 192 .virtual_irq_start = MXC_GPIO_IRQ_START + 32,
193 }, { 193 }, {
194 .chip.label = "gpio-2", 194 .chip.label = "gpio-2",
195 .base = (void __iomem *)MX25_GPIO3_BASE_ADDR_VIRT, 195 .base = MX25_IO_ADDRESS(MX25_GPIO3_BASE_ADDR),
196 .irq = 16, 196 .irq = 16,
197 .virtual_irq_start = MXC_GPIO_IRQ_START + 64, 197 .virtual_irq_start = MXC_GPIO_IRQ_START + 64,
198 }, { 198 }, {
199 .chip.label = "gpio-3", 199 .chip.label = "gpio-3",
200 .base = (void __iomem *)MX25_GPIO4_BASE_ADDR_VIRT, 200 .base = MX25_IO_ADDRESS(MX25_GPIO4_BASE_ADDR),
201 .irq = 23, 201 .irq = 23,
202 .virtual_irq_start = MXC_GPIO_IRQ_START + 96, 202 .virtual_irq_start = MXC_GPIO_IRQ_START + 96,
203 } 203 }
diff --git a/arch/arm/mach-mx25/mm.c b/arch/arm/mach-mx25/mm.c
index 11cd33599bd8..2edec6ce8fe7 100644
--- a/arch/arm/mach-mx25/mm.c
+++ b/arch/arm/mach-mx25/mm.c
@@ -56,7 +56,7 @@ int imx25_register_gpios(void);
56 56
57void __init mx25_init_irq(void) 57void __init mx25_init_irq(void)
58{ 58{
59 mxc_init_irq((void __iomem *)MX25_AVIC_BASE_ADDR_VIRT); 59 mxc_init_irq(MX25_IO_ADDRESS(MX25_AVIC_BASE_ADDR));
60 imx25_register_gpios(); 60 imx25_register_gpios();
61} 61}
62 62
diff --git a/arch/arm/plat-mxc/include/mach/mx25.h b/arch/arm/plat-mxc/include/mach/mx25.h
index 6f9e1d401ce8..08b5a3af9432 100644
--- a/arch/arm/plat-mxc/include/mach/mx25.h
+++ b/arch/arm/plat-mxc/include/mach/mx25.h
@@ -21,13 +21,12 @@
21 21
22#define MX25_CRM_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0x80000) 22#define MX25_CRM_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0x80000)
23#define MX25_GPT1_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0x90000) 23#define MX25_GPT1_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0x90000)
24#define MX25_GPIO4_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0x9c000)
25#define MX25_GPIO3_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xa4000)
26#define MX25_GPIO1_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xcc000)
27#define MX25_GPIO2_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xd0000)
24#define MX25_WDOG_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xdc000) 28#define MX25_WDOG_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xdc000)
25 29
26#define MX25_GPIO1_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0xcc000)
27#define MX25_GPIO2_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0xd0000)
28#define MX25_GPIO3_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0xa4000)
29#define MX25_GPIO4_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0x9c000)
30
31#define MX25_IO_P2V(x) ( \ 30#define MX25_IO_P2V(x) ( \
32 IMX_IO_P2V_MODULE(x, MX25_AIPS1) ?: \ 31 IMX_IO_P2V_MODULE(x, MX25_AIPS1) ?: \
33 IMX_IO_P2V_MODULE(x, MX25_AIPS2) ?: \ 32 IMX_IO_P2V_MODULE(x, MX25_AIPS2) ?: \