diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-12-02 07:00:33 -0500 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2012-07-01 09:57:06 -0400 |
commit | ed175343b4b53d686e30b1e37fb94e142f56fa2f (patch) | |
tree | c7d8c37edafa9d6f9c06034bbb6a9c7bf00dfe7f /arch/arm/mach-imx/mach-mx31_3ds.c | |
parent | 84715dd6c19e058557ab173d327ea65eac0ccb02 (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-mx31_3ds.c')
-rw-r--r-- | arch/arm/mach-imx/mach-mx31_3ds.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index 4eafdf275ea..ecdba0497e7 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c | |||
@@ -44,9 +44,6 @@ | |||
44 | 44 | ||
45 | #include "devices-imx31.h" | 45 | #include "devices-imx31.h" |
46 | 46 | ||
47 | /* CPLD IRQ line for external uart, external ethernet etc */ | ||
48 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_1) | ||
49 | |||
50 | static int mx31_3ds_pins[] = { | 47 | static int mx31_3ds_pins[] = { |
51 | /* UART1 */ | 48 | /* UART1 */ |
52 | MX31_PIN_CTS1__CTS1, | 49 | MX31_PIN_CTS1__CTS1, |
@@ -317,7 +314,7 @@ static int mx31_3ds_sdhc1_init(struct device *dev, | |||
317 | return ret; | 314 | return ret; |
318 | } | 315 | } |
319 | 316 | ||
320 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), | 317 | ret = request_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)), |
321 | detect_irq, IRQF_DISABLED | | 318 | detect_irq, IRQF_DISABLED | |
322 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, | 319 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, |
323 | "sdhc1-detect", data); | 320 | "sdhc1-detect", data); |
@@ -336,7 +333,7 @@ gpio_free: | |||
336 | 333 | ||
337 | static void mx31_3ds_sdhc1_exit(struct device *dev, void *data) | 334 | static void mx31_3ds_sdhc1_exit(struct device *dev, void *data) |
338 | { | 335 | { |
339 | free_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), data); | 336 | free_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)), data); |
340 | gpio_free_array(mx31_3ds_sdhc1_gpios, | 337 | gpio_free_array(mx31_3ds_sdhc1_gpios, |
341 | ARRAY_SIZE(mx31_3ds_sdhc1_gpios)); | 338 | ARRAY_SIZE(mx31_3ds_sdhc1_gpios)); |
342 | } | 339 | } |
@@ -539,7 +536,7 @@ static struct spi_board_info mx31_3ds_spi_devs[] __initdata = { | |||
539 | .bus_num = 1, | 536 | .bus_num = 1, |
540 | .chip_select = 1, /* SS2 */ | 537 | .chip_select = 1, /* SS2 */ |
541 | .platform_data = &mc13783_pdata, | 538 | .platform_data = &mc13783_pdata, |
542 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3), | 539 | /* irq number is run-time assigned */ |
543 | .mode = SPI_CS_HIGH, | 540 | .mode = SPI_CS_HIGH, |
544 | }, { | 541 | }, { |
545 | .modalias = "l4f00242t03", | 542 | .modalias = "l4f00242t03", |
@@ -714,6 +711,7 @@ static void __init mx31_3ds_init(void) | |||
714 | imx31_add_mxc_nand(&mx31_3ds_nand_board_info); | 711 | imx31_add_mxc_nand(&mx31_3ds_nand_board_info); |
715 | 712 | ||
716 | imx31_add_spi_imx1(&spi1_pdata); | 713 | imx31_add_spi_imx1(&spi1_pdata); |
714 | mx31_3ds_spi_devs[0].irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | ||
717 | spi_register_board_info(mx31_3ds_spi_devs, | 715 | spi_register_board_info(mx31_3ds_spi_devs, |
718 | ARRAY_SIZE(mx31_3ds_spi_devs)); | 716 | ARRAY_SIZE(mx31_3ds_spi_devs)); |
719 | 717 | ||
@@ -736,7 +734,8 @@ static void __init mx31_3ds_init(void) | |||
736 | if (!otg_mode_host) | 734 | if (!otg_mode_host) |
737 | imx31_add_fsl_usb2_udc(&usbotg_pdata); | 735 | imx31_add_fsl_usb2_udc(&usbotg_pdata); |
738 | 736 | ||
739 | if (mxc_expio_init(MX31_CS5_BASE_ADDR, EXPIO_PARENT_INT)) | 737 | if (mxc_expio_init(MX31_CS5_BASE_ADDR, |
738 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1)))) | ||
740 | printk(KERN_WARNING "Init of the debug board failed, all " | 739 | printk(KERN_WARNING "Init of the debug board failed, all " |
741 | "devices on the debug board are unusable.\n"); | 740 | "devices on the debug board are unusable.\n"); |
742 | imx31_add_imx2_wdt(NULL); | 741 | imx31_add_imx2_wdt(NULL); |