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-armadillo5x0.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-armadillo5x0.c')
-rw-r--r-- | arch/arm/mach-imx/mach-armadillo5x0.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c index c650145d1646..f83c5c683575 100644 --- a/arch/arm/mach-imx/mach-armadillo5x0.c +++ b/arch/arm/mach-imx/mach-armadillo5x0.c | |||
@@ -408,7 +408,8 @@ static int armadillo5x0_sdhc1_init(struct device *dev, | |||
408 | gpio_direction_input(gpio_wp); | 408 | gpio_direction_input(gpio_wp); |
409 | 409 | ||
410 | /* When supported the trigger type have to be BOTH */ | 410 | /* When supported the trigger type have to be BOTH */ |
411 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_ATA_DMACK), detect_irq, | 411 | ret = request_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_ATA_DMACK)), |
412 | detect_irq, | ||
412 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, | 413 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, |
413 | "sdhc-detect", data); | 414 | "sdhc-detect", data); |
414 | 415 | ||
@@ -429,7 +430,7 @@ err_gpio_free: | |||
429 | 430 | ||
430 | static void armadillo5x0_sdhc1_exit(struct device *dev, void *data) | 431 | static void armadillo5x0_sdhc1_exit(struct device *dev, void *data) |
431 | { | 432 | { |
432 | free_irq(IOMUX_TO_IRQ(MX31_PIN_ATA_DMACK), data); | 433 | free_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_ATA_DMACK)), data); |
433 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_DMACK)); | 434 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_DMACK)); |
434 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_RESET_B)); | 435 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_RESET_B)); |
435 | } | 436 | } |
@@ -450,8 +451,7 @@ static struct resource armadillo5x0_smc911x_resources[] = { | |||
450 | .end = MX31_CS3_BASE_ADDR + SZ_32M - 1, | 451 | .end = MX31_CS3_BASE_ADDR + SZ_32M - 1, |
451 | .flags = IORESOURCE_MEM, | 452 | .flags = IORESOURCE_MEM, |
452 | }, { | 453 | }, { |
453 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), | 454 | /* irq number is run-time assigned */ |
454 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), | ||
455 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | 455 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
456 | }, | 456 | }, |
457 | }; | 457 | }; |
@@ -498,6 +498,10 @@ static void __init armadillo5x0_init(void) | |||
498 | 498 | ||
499 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | 499 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); |
500 | 500 | ||
501 | armadillo5x0_smc911x_resources[1].start = | ||
502 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_0)); | ||
503 | armadillo5x0_smc911x_resources[1].end = | ||
504 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_0)); | ||
501 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 505 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
502 | imx_add_gpio_keys(&armadillo5x0_button_data); | 506 | imx_add_gpio_keys(&armadillo5x0_button_data); |
503 | imx31_add_imx_i2c1(NULL); | 507 | imx31_add_imx_i2c1(NULL); |