aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/mach-mx31lite.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-12-02 07:00:33 -0500
committerShawn Guo <shawn.guo@linaro.org>2012-07-01 09:57:06 -0400
commited175343b4b53d686e30b1e37fb94e142f56fa2f (patch)
treec7d8c37edafa9d6f9c06034bbb6a9c7bf00dfe7f /arch/arm/mach-imx/mach-mx31lite.c
parent84715dd6c19e058557ab173d327ea65eac0ccb02 (diff)
ARM: imx: eliminate macro IOMUX_TO_IRQ()
This patch changes all the static gpio irq number assigning with IOMUX_TO_IRQ() to run-time assigning with gpio_to_irq call, and in turn eliminates the macro IOMUX_TO_IRQ(). Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/mach-mx31lite.c')
-rw-r--r--arch/arm/mach-imx/mach-mx31lite.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c
index 686c60587980..4977378d2f60 100644
--- a/arch/arm/mach-imx/mach-mx31lite.c
+++ b/arch/arm/mach-imx/mach-mx31lite.c
@@ -83,8 +83,7 @@ static struct resource smsc911x_resources[] = {
83 .end = MX31_CS4_BASE_ADDR + 0x100, 83 .end = MX31_CS4_BASE_ADDR + 0x100,
84 .flags = IORESOURCE_MEM, 84 .flags = IORESOURCE_MEM,
85 }, { 85 }, {
86 .start = IOMUX_TO_IRQ(MX31_PIN_SFS6), 86 /* irq number is run-time assigned */
87 .end = IOMUX_TO_IRQ(MX31_PIN_SFS6),
88 .flags = IORESOURCE_IRQ, 87 .flags = IORESOURCE_IRQ,
89 }, 88 },
90}; 89};
@@ -124,7 +123,7 @@ static struct spi_board_info mc13783_spi_dev __initdata = {
124 .bus_num = 1, 123 .bus_num = 1,
125 .chip_select = 0, 124 .chip_select = 0,
126 .platform_data = &mc13783_pdata, 125 .platform_data = &mc13783_pdata,
127 .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3), 126 /* irq number is run-time assigned */
128}; 127};
129 128
130/* 129/*
@@ -258,6 +257,7 @@ static void __init mx31lite_init(void)
258 imx31_add_mxc_nand(&mx31lite_nand_board_info); 257 imx31_add_mxc_nand(&mx31lite_nand_board_info);
259 258
260 imx31_add_spi_imx1(&spi1_pdata); 259 imx31_add_spi_imx1(&spi1_pdata);
260 mc13783_spi_dev.irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3));
261 spi_register_board_info(&mc13783_spi_dev, 1); 261 spi_register_board_info(&mc13783_spi_dev, 1);
262 262
263 /* USB */ 263 /* USB */
@@ -274,6 +274,10 @@ static void __init mx31lite_init(void)
274 pr_warning("could not get LAN irq gpio\n"); 274 pr_warning("could not get LAN irq gpio\n");
275 else { 275 else {
276 gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_SFS6)); 276 gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_SFS6));
277 smsc911x_resources[1].start =
278 gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_SFS6));
279 smsc911x_resources[1].end =
280 gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_SFS6));
277 platform_device_register(&smsc911x_device); 281 platform_device_register(&smsc911x_device);
278 } 282 }
279} 283}