diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-12-04 21:12:28 -0500 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2012-07-01 09:57:16 -0400 |
commit | 438196c371cb32f0eacaf2a44166d9a0cf37c4a8 (patch) | |
tree | 8e502f38302ba1226444c73aaa84aae86464583f /arch/arm/mach-imx/pcm970-baseboard.c | |
parent | ed175343b4b53d686e30b1e37fb94e142f56fa2f (diff) |
ARM: imx: eliminate macro IRQ_GPIOx()
This patch changes all the static gpio irq number assigning with
IRQ_GPIOA() ... IRQ_GPIOF() to run-time assigning with gpio_to_irq
call, and in turn eliminates these macros.
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/pcm970-baseboard.c')
-rw-r--r-- | arch/arm/mach-imx/pcm970-baseboard.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/arm/mach-imx/pcm970-baseboard.c b/arch/arm/mach-imx/pcm970-baseboard.c index 99afbc3f43a3..9917e2ff51da 100644 --- a/arch/arm/mach-imx/pcm970-baseboard.c +++ b/arch/arm/mach-imx/pcm970-baseboard.c | |||
@@ -95,14 +95,14 @@ static int pcm970_sdhc2_init(struct device *dev, irq_handler_t detect_irq, void | |||
95 | { | 95 | { |
96 | int ret; | 96 | int ret; |
97 | 97 | ||
98 | ret = request_irq(IRQ_GPIOC(29), detect_irq, IRQF_TRIGGER_FALLING, | 98 | ret = request_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), detect_irq, |
99 | "imx-mmc-detect", data); | 99 | IRQF_TRIGGER_FALLING, "imx-mmc-detect", data); |
100 | if (ret) | 100 | if (ret) |
101 | return ret; | 101 | return ret; |
102 | 102 | ||
103 | ret = gpio_request(GPIO_PORTC + 28, "imx-mmc-ro"); | 103 | ret = gpio_request(GPIO_PORTC + 28, "imx-mmc-ro"); |
104 | if (ret) { | 104 | if (ret) { |
105 | free_irq(IRQ_GPIOC(29), data); | 105 | free_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), data); |
106 | return ret; | 106 | return ret; |
107 | } | 107 | } |
108 | 108 | ||
@@ -113,7 +113,7 @@ static int pcm970_sdhc2_init(struct device *dev, irq_handler_t detect_irq, void | |||
113 | 113 | ||
114 | static void pcm970_sdhc2_exit(struct device *dev, void *data) | 114 | static void pcm970_sdhc2_exit(struct device *dev, void *data) |
115 | { | 115 | { |
116 | free_irq(IRQ_GPIOC(29), data); | 116 | free_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), data); |
117 | gpio_free(GPIO_PORTC + 28); | 117 | gpio_free(GPIO_PORTC + 28); |
118 | } | 118 | } |
119 | 119 | ||
@@ -192,8 +192,7 @@ static struct resource pcm970_sja1000_resources[] = { | |||
192 | .end = MX27_CS4_BASE_ADDR + 0x100 - 1, | 192 | .end = MX27_CS4_BASE_ADDR + 0x100 - 1, |
193 | .flags = IORESOURCE_MEM, | 193 | .flags = IORESOURCE_MEM, |
194 | }, { | 194 | }, { |
195 | .start = IRQ_GPIOE(19), | 195 | /* irq number is run-time assigned */ |
196 | .end = IRQ_GPIOE(19), | ||
197 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, | 196 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, |
198 | }, | 197 | }, |
199 | }; | 198 | }; |
@@ -227,5 +226,7 @@ void __init pcm970_baseboard_init(void) | |||
227 | imx27_add_imx_fb(&pcm038_fb_data); | 226 | imx27_add_imx_fb(&pcm038_fb_data); |
228 | mxc_gpio_mode(GPIO_PORTC | 28 | GPIO_GPIO | GPIO_IN); | 227 | mxc_gpio_mode(GPIO_PORTC | 28 | GPIO_GPIO | GPIO_IN); |
229 | imx27_add_mxc_mmc(1, &sdhc_pdata); | 228 | imx27_add_mxc_mmc(1, &sdhc_pdata); |
229 | pcm970_sja1000_resources[1].start = gpio_to_irq(IMX_GPIO_NR(5, 19)); | ||
230 | pcm970_sja1000_resources[1].end = gpio_to_irq(IMX_GPIO_NR(5, 19)); | ||
230 | platform_device_register(&pcm970_sja1000); | 231 | platform_device_register(&pcm970_sja1000); |
231 | } | 232 | } |