diff options
author | Haojian Zhuang <haojian.zhuang@marvell.com> | 2011-10-10 04:03:51 -0400 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@marvell.com> | 2011-11-14 08:07:59 -0500 |
commit | 4929f5a8a99f64378659c5658621e45c90c2aaa9 (patch) | |
tree | 37887d8dafda515434896c467d304c04e276889f | |
parent | 87c49e20579c933d531a376596875b8fd5dcb04f (diff) |
ARM: pxa: rename gpio_to_irq and irq_to_gpio
Avoid to define gpio_to_irq() and irq_to_gpio() for potential name
confliction since multiple architecture will be built together.
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
39 files changed, 176 insertions, 98 deletions
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index 06b5ad774604..fb7dfc157a5c 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c | |||
@@ -120,8 +120,8 @@ static struct resource smc91x_resources[] = { | |||
120 | .flags = IORESOURCE_MEM, | 120 | .flags = IORESOURCE_MEM, |
121 | }, | 121 | }, |
122 | [1] = { | 122 | [1] = { |
123 | .start = gpio_to_irq(27), | 123 | .start = MMP_GPIO_TO_IRQ(27), |
124 | .end = gpio_to_irq(27), | 124 | .end = MMP_GPIO_TO_IRQ(27), |
125 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | 125 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
126 | } | 126 | } |
127 | }; | 127 | }; |
diff --git a/arch/arm/mach-mmp/flint.c b/arch/arm/mach-mmp/flint.c index c4fd806b15b4..a64c172082c4 100644 --- a/arch/arm/mach-mmp/flint.c +++ b/arch/arm/mach-mmp/flint.c | |||
@@ -87,8 +87,8 @@ static struct resource smc91x_resources[] = { | |||
87 | .flags = IORESOURCE_MEM, | 87 | .flags = IORESOURCE_MEM, |
88 | }, | 88 | }, |
89 | [1] = { | 89 | [1] = { |
90 | .start = gpio_to_irq(155), | 90 | .start = MMP_GPIO_TO_IRQ(155), |
91 | .end = gpio_to_irq(155), | 91 | .end = MMP_GPIO_TO_IRQ(155), |
92 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | 92 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
93 | } | 93 | } |
94 | }; | 94 | }; |
diff --git a/arch/arm/mach-mmp/include/mach/gpio-pxa.h b/arch/arm/mach-mmp/include/mach/gpio-pxa.h index d14eeaf16322..a462d1ca214e 100644 --- a/arch/arm/mach-mmp/include/mach/gpio-pxa.h +++ b/arch/arm/mach-mmp/include/mach/gpio-pxa.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __ASM_MACH_GPIO_PXA_H | 2 | #define __ASM_MACH_GPIO_PXA_H |
3 | 3 | ||
4 | #include <mach/addr-map.h> | 4 | #include <mach/addr-map.h> |
5 | #include <mach/cputype.h> | ||
5 | #include <mach/irqs.h> | 6 | #include <mach/irqs.h> |
6 | 7 | ||
7 | #define GPIO_REGS_VIRT (APB_VIRT_BASE + 0x19000) | 8 | #define GPIO_REGS_VIRT (APB_VIRT_BASE + 0x19000) |
diff --git a/arch/arm/mach-mmp/include/mach/gpio.h b/arch/arm/mach-mmp/include/mach/gpio.h index 681262359d1c..32b684aacea8 100644 --- a/arch/arm/mach-mmp/include/mach/gpio.h +++ b/arch/arm/mach-mmp/include/mach/gpio.h | |||
@@ -3,9 +3,6 @@ | |||
3 | 3 | ||
4 | #include <asm-generic/gpio.h> | 4 | #include <asm-generic/gpio.h> |
5 | 5 | ||
6 | #define gpio_to_irq(gpio) (IRQ_GPIO_START + (gpio)) | ||
7 | #define irq_to_gpio(irq) ((irq) - IRQ_GPIO_START) | ||
8 | |||
9 | #define __gpio_is_inverted(gpio) (0) | 6 | #define __gpio_is_inverted(gpio) (0) |
10 | #define __gpio_is_occupied(gpio) (0) | 7 | #define __gpio_is_occupied(gpio) (0) |
11 | 8 | ||
diff --git a/arch/arm/mach-mmp/include/mach/irqs.h b/arch/arm/mach-mmp/include/mach/irqs.h index a09d328e2ddd..ec95951f0983 100644 --- a/arch/arm/mach-mmp/include/mach/irqs.h +++ b/arch/arm/mach-mmp/include/mach/irqs.h | |||
@@ -221,6 +221,7 @@ | |||
221 | #define IRQ_GPIO_START 128 | 221 | #define IRQ_GPIO_START 128 |
222 | #define IRQ_GPIO_NUM 192 | 222 | #define IRQ_GPIO_NUM 192 |
223 | #define IRQ_GPIO(x) (IRQ_GPIO_START + (x)) | 223 | #define IRQ_GPIO(x) (IRQ_GPIO_START + (x)) |
224 | #define MMP_GPIO_TO_IRQ(gpio) (IRQ_GPIO_START + (gpio)) | ||
224 | 225 | ||
225 | #define IRQ_BOARD_START (IRQ_GPIO_START + IRQ_GPIO_NUM) | 226 | #define IRQ_BOARD_START (IRQ_GPIO_START + IRQ_GPIO_NUM) |
226 | 227 | ||
diff --git a/arch/arm/mach-mmp/tavorevb.c b/arch/arm/mach-mmp/tavorevb.c index eb5be879fd8c..0afe3a39982f 100644 --- a/arch/arm/mach-mmp/tavorevb.c +++ b/arch/arm/mach-mmp/tavorevb.c | |||
@@ -71,8 +71,8 @@ static struct resource smc91x_resources[] = { | |||
71 | .flags = IORESOURCE_MEM, | 71 | .flags = IORESOURCE_MEM, |
72 | }, | 72 | }, |
73 | [1] = { | 73 | [1] = { |
74 | .start = gpio_to_irq(80), | 74 | .start = MMP_GPIO_TO_IRQ(80), |
75 | .end = gpio_to_irq(80), | 75 | .end = MMP_GPIO_TO_IRQ(80), |
76 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | 76 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
77 | } | 77 | } |
78 | }; | 78 | }; |
diff --git a/arch/arm/mach-mmp/teton_bga.c b/arch/arm/mach-mmp/teton_bga.c index bbe4727b96cc..825a01cdcccd 100644 --- a/arch/arm/mach-mmp/teton_bga.c +++ b/arch/arm/mach-mmp/teton_bga.c | |||
@@ -66,7 +66,7 @@ static struct pxa27x_keypad_platform_data teton_bga_keypad_info __initdata = { | |||
66 | static struct i2c_board_info teton_bga_i2c_info[] __initdata = { | 66 | static struct i2c_board_info teton_bga_i2c_info[] __initdata = { |
67 | { | 67 | { |
68 | I2C_BOARD_INFO("ds1337", 0x68), | 68 | I2C_BOARD_INFO("ds1337", 0x68), |
69 | .irq = gpio_to_irq(RTC_INT_GPIO) | 69 | .irq = MMP_GPIO_TO_IRQ(RTC_INT_GPIO) |
70 | }, | 70 | }, |
71 | }; | 71 | }; |
72 | 72 | ||
diff --git a/arch/arm/mach-pxa/capc7117.c b/arch/arm/mach-pxa/capc7117.c index 4efc16d39c79..5516317b9e64 100644 --- a/arch/arm/mach-pxa/capc7117.c +++ b/arch/arm/mach-pxa/capc7117.c | |||
@@ -50,8 +50,8 @@ static struct resource capc7117_ide_resources[] = { | |||
50 | .flags = IORESOURCE_MEM | 50 | .flags = IORESOURCE_MEM |
51 | }, | 51 | }, |
52 | [2] = { | 52 | [2] = { |
53 | .start = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO76)), | 53 | .start = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO76)), |
54 | .end = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO76)), | 54 | .end = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO76)), |
55 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_RISING | 55 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_RISING |
56 | } | 56 | } |
57 | }; | 57 | }; |
@@ -80,7 +80,7 @@ static void __init capc7117_ide_init(void) | |||
80 | static struct plat_serial8250_port ti16c752_platform_data[] = { | 80 | static struct plat_serial8250_port ti16c752_platform_data[] = { |
81 | [0] = { | 81 | [0] = { |
82 | .mapbase = 0x14000000, | 82 | .mapbase = 0x14000000, |
83 | .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO78)), | 83 | .irq = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO78)), |
84 | .irqflags = IRQF_TRIGGER_RISING, | 84 | .irqflags = IRQF_TRIGGER_RISING, |
85 | .flags = TI16C752_FLAGS, | 85 | .flags = TI16C752_FLAGS, |
86 | .iotype = UPIO_MEM, | 86 | .iotype = UPIO_MEM, |
@@ -89,7 +89,7 @@ static struct plat_serial8250_port ti16c752_platform_data[] = { | |||
89 | }, | 89 | }, |
90 | [1] = { | 90 | [1] = { |
91 | .mapbase = 0x14000040, | 91 | .mapbase = 0x14000040, |
92 | .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO79)), | 92 | .irq = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO79)), |
93 | .irqflags = IRQF_TRIGGER_RISING, | 93 | .irqflags = IRQF_TRIGGER_RISING, |
94 | .flags = TI16C752_FLAGS, | 94 | .flags = TI16C752_FLAGS, |
95 | .iotype = UPIO_MEM, | 95 | .iotype = UPIO_MEM, |
@@ -98,7 +98,7 @@ static struct plat_serial8250_port ti16c752_platform_data[] = { | |||
98 | }, | 98 | }, |
99 | [2] = { | 99 | [2] = { |
100 | .mapbase = 0x14000080, | 100 | .mapbase = 0x14000080, |
101 | .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO80)), | 101 | .irq = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO80)), |
102 | .irqflags = IRQF_TRIGGER_RISING, | 102 | .irqflags = IRQF_TRIGGER_RISING, |
103 | .flags = TI16C752_FLAGS, | 103 | .flags = TI16C752_FLAGS, |
104 | .iotype = UPIO_MEM, | 104 | .iotype = UPIO_MEM, |
@@ -107,7 +107,7 @@ static struct plat_serial8250_port ti16c752_platform_data[] = { | |||
107 | }, | 107 | }, |
108 | [3] = { | 108 | [3] = { |
109 | .mapbase = 0x140000c0, | 109 | .mapbase = 0x140000c0, |
110 | .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO81)), | 110 | .irq = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO81)), |
111 | .irqflags = IRQF_TRIGGER_RISING, | 111 | .irqflags = IRQF_TRIGGER_RISING, |
112 | .flags = TI16C752_FLAGS, | 112 | .flags = TI16C752_FLAGS, |
113 | .iotype = UPIO_MEM, | 113 | .iotype = UPIO_MEM, |
diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c index 4ebcee5756b1..431ef56700c4 100644 --- a/arch/arm/mach-pxa/cm-x270.c +++ b/arch/arm/mach-pxa/cm-x270.c | |||
@@ -380,7 +380,7 @@ static struct spi_board_info cm_x270_spi_devices[] __initdata = { | |||
380 | .modalias = "libertas_spi", | 380 | .modalias = "libertas_spi", |
381 | .max_speed_hz = 13000000, | 381 | .max_speed_hz = 13000000, |
382 | .bus_num = 2, | 382 | .bus_num = 2, |
383 | .irq = gpio_to_irq(95), | 383 | .irq = PXA_GPIO_TO_IRQ(95), |
384 | .chip_select = 0, | 384 | .chip_select = 0, |
385 | .controller_data = &cm_x270_libertas_chip, | 385 | .controller_data = &cm_x270_libertas_chip, |
386 | .platform_data = &cm_x270_libertas_pdata, | 386 | .platform_data = &cm_x270_libertas_pdata, |
diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c index 05bfa1b1c001..f0fe9a51dfcc 100644 --- a/arch/arm/mach-pxa/colibri-pxa270.c +++ b/arch/arm/mach-pxa/colibri-pxa270.c | |||
@@ -218,8 +218,8 @@ static struct resource colibri_pxa270_dm9000_resources[] = { | |||
218 | .flags = IORESOURCE_MEM, | 218 | .flags = IORESOURCE_MEM, |
219 | }, | 219 | }, |
220 | { | 220 | { |
221 | .start = gpio_to_irq(GPIO114_COLIBRI_PXA270_ETH_IRQ), | 221 | .start = PXA_GPIO_TO_IRQ(GPIO114_COLIBRI_PXA270_ETH_IRQ), |
222 | .end = gpio_to_irq(GPIO114_COLIBRI_PXA270_ETH_IRQ), | 222 | .end = PXA_GPIO_TO_IRQ(GPIO114_COLIBRI_PXA270_ETH_IRQ), |
223 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_RISING, | 223 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_RISING, |
224 | }, | 224 | }, |
225 | }; | 225 | }; |
@@ -249,7 +249,7 @@ static pxa2xx_audio_ops_t colibri_pxa270_ac97_pdata = { | |||
249 | }; | 249 | }; |
250 | 250 | ||
251 | static struct ucb1400_pdata colibri_pxa270_ucb1400_pdata = { | 251 | static struct ucb1400_pdata colibri_pxa270_ucb1400_pdata = { |
252 | .irq = gpio_to_irq(GPIO113_COLIBRI_PXA270_TS_IRQ), | 252 | .irq = PXA_GPIO_TO_IRQ(GPIO113_COLIBRI_PXA270_TS_IRQ), |
253 | }; | 253 | }; |
254 | 254 | ||
255 | static struct platform_device colibri_pxa270_ucb1400_device = { | 255 | static struct platform_device colibri_pxa270_ucb1400_device = { |
diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c index c825e8bf2db1..0a6222e20f9b 100644 --- a/arch/arm/mach-pxa/colibri-pxa300.c +++ b/arch/arm/mach-pxa/colibri-pxa300.c | |||
@@ -78,8 +78,8 @@ static struct resource colibri_asix_resource[] = { | |||
78 | .flags = IORESOURCE_MEM, | 78 | .flags = IORESOURCE_MEM, |
79 | }, | 79 | }, |
80 | [1] = { | 80 | [1] = { |
81 | .start = gpio_to_irq(COLIBRI_ETH_IRQ_GPIO), | 81 | .start = PXA_GPIO_TO_IRQ(COLIBRI_ETH_IRQ_GPIO), |
82 | .end = gpio_to_irq(COLIBRI_ETH_IRQ_GPIO), | 82 | .end = PXA_GPIO_TO_IRQ(COLIBRI_ETH_IRQ_GPIO), |
83 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, | 83 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, |
84 | } | 84 | } |
85 | }; | 85 | }; |
diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c index 692e1ffc5586..8cbb2b43ed11 100644 --- a/arch/arm/mach-pxa/colibri-pxa320.c +++ b/arch/arm/mach-pxa/colibri-pxa320.c | |||
@@ -115,8 +115,8 @@ static struct resource colibri_asix_resource[] = { | |||
115 | .flags = IORESOURCE_MEM, | 115 | .flags = IORESOURCE_MEM, |
116 | }, | 116 | }, |
117 | [1] = { | 117 | [1] = { |
118 | .start = gpio_to_irq(COLIBRI_ETH_IRQ_GPIO), | 118 | .start = PXA_GPIO_TO_IRQ(COLIBRI_ETH_IRQ_GPIO), |
119 | .end = gpio_to_irq(COLIBRI_ETH_IRQ_GPIO), | 119 | .end = PXA_GPIO_TO_IRQ(COLIBRI_ETH_IRQ_GPIO), |
120 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, | 120 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, |
121 | } | 121 | } |
122 | }; | 122 | }; |
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 549468d088b9..3812ba0ff50c 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -531,7 +531,7 @@ static struct spi_board_info corgi_spi_devices[] = { | |||
531 | .chip_select = 0, | 531 | .chip_select = 0, |
532 | .platform_data = &corgi_ads7846_info, | 532 | .platform_data = &corgi_ads7846_info, |
533 | .controller_data= &corgi_ads7846_chip, | 533 | .controller_data= &corgi_ads7846_chip, |
534 | .irq = gpio_to_irq(CORGI_GPIO_TP_INT), | 534 | .irq = PXA_GPIO_TO_IRQ(CORGI_GPIO_TP_INT), |
535 | }, { | 535 | }, { |
536 | .modalias = "corgi-lcd", | 536 | .modalias = "corgi-lcd", |
537 | .max_speed_hz = 50000, | 537 | .max_speed_hz = 50000, |
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index 6f6368ece9bd..82e9976e5657 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c | |||
@@ -252,8 +252,8 @@ static struct resource asic3_resources[] = { | |||
252 | .flags = IORESOURCE_MEM, | 252 | .flags = IORESOURCE_MEM, |
253 | }, | 253 | }, |
254 | [1] = { | 254 | [1] = { |
255 | .start = gpio_to_irq(GPIO12_HX4700_ASIC3_IRQ), | 255 | .start = PXA_GPIO_TO_IRQ(GPIO12_HX4700_ASIC3_IRQ), |
256 | .end = gpio_to_irq(GPIO12_HX4700_ASIC3_IRQ), | 256 | .end = PXA_GPIO_TO_IRQ(GPIO12_HX4700_ASIC3_IRQ), |
257 | .flags = IORESOURCE_IRQ, | 257 | .flags = IORESOURCE_IRQ, |
258 | }, | 258 | }, |
259 | /* SD part */ | 259 | /* SD part */ |
@@ -263,8 +263,8 @@ static struct resource asic3_resources[] = { | |||
263 | .flags = IORESOURCE_MEM, | 263 | .flags = IORESOURCE_MEM, |
264 | }, | 264 | }, |
265 | [3] = { | 265 | [3] = { |
266 | .start = gpio_to_irq(GPIO66_HX4700_ASIC3_nSDIO_IRQ), | 266 | .start = PXA_GPIO_TO_IRQ(GPIO66_HX4700_ASIC3_nSDIO_IRQ), |
267 | .end = gpio_to_irq(GPIO66_HX4700_ASIC3_nSDIO_IRQ), | 267 | .end = PXA_GPIO_TO_IRQ(GPIO66_HX4700_ASIC3_nSDIO_IRQ), |
268 | .flags = IORESOURCE_IRQ, | 268 | .flags = IORESOURCE_IRQ, |
269 | }, | 269 | }, |
270 | }; | 270 | }; |
@@ -587,7 +587,7 @@ static struct spi_board_info tsc2046_board_info[] __initdata = { | |||
587 | .modalias = "ads7846", | 587 | .modalias = "ads7846", |
588 | .bus_num = 2, | 588 | .bus_num = 2, |
589 | .max_speed_hz = 2600000, /* 100 kHz sample rate */ | 589 | .max_speed_hz = 2600000, /* 100 kHz sample rate */ |
590 | .irq = gpio_to_irq(GPIO58_HX4700_TSC2046_nPENIRQ), | 590 | .irq = PXA_GPIO_TO_IRQ(GPIO58_HX4700_TSC2046_nPENIRQ), |
591 | .platform_data = &tsc2046_info, | 591 | .platform_data = &tsc2046_info, |
592 | .controller_data = &tsc2046_chip, | 592 | .controller_data = &tsc2046_chip, |
593 | }, | 593 | }, |
@@ -635,15 +635,15 @@ static struct resource power_supply_resources[] = { | |||
635 | .name = "ac", | 635 | .name = "ac", |
636 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | | 636 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | |
637 | IORESOURCE_IRQ_LOWEDGE, | 637 | IORESOURCE_IRQ_LOWEDGE, |
638 | .start = gpio_to_irq(GPIOD9_nAC_IN), | 638 | .start = PXA_GPIO_TO_IRQ(GPIOD9_nAC_IN), |
639 | .end = gpio_to_irq(GPIOD9_nAC_IN), | 639 | .end = PXA_GPIO_TO_IRQ(GPIOD9_nAC_IN), |
640 | }, | 640 | }, |
641 | [1] = { | 641 | [1] = { |
642 | .name = "usb", | 642 | .name = "usb", |
643 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | | 643 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | |
644 | IORESOURCE_IRQ_LOWEDGE, | 644 | IORESOURCE_IRQ_LOWEDGE, |
645 | .start = gpio_to_irq(GPIOD14_nUSBC_DETECT), | 645 | .start = PXA_GPIO_TO_IRQ(GPIOD14_nUSBC_DETECT), |
646 | .end = gpio_to_irq(GPIOD14_nUSBC_DETECT), | 646 | .end = PXA_GPIO_TO_IRQ(GPIOD14_nUSBC_DETECT), |
647 | }, | 647 | }, |
648 | }; | 648 | }; |
649 | 649 | ||
diff --git a/arch/arm/mach-pxa/icontrol.c b/arch/arm/mach-pxa/icontrol.c index f78d5db758da..33e81e87a9da 100644 --- a/arch/arm/mach-pxa/icontrol.c +++ b/arch/arm/mach-pxa/icontrol.c | |||
@@ -86,7 +86,7 @@ static struct spi_board_info mcp251x_board_info[] = { | |||
86 | .chip_select = 0, | 86 | .chip_select = 0, |
87 | .platform_data = &mcp251x_info, | 87 | .platform_data = &mcp251x_info, |
88 | .controller_data = &mcp251x_chip_info1, | 88 | .controller_data = &mcp251x_chip_info1, |
89 | .irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ1) | 89 | .irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ1) |
90 | }, | 90 | }, |
91 | { | 91 | { |
92 | .modalias = "mcp2515", | 92 | .modalias = "mcp2515", |
@@ -95,7 +95,7 @@ static struct spi_board_info mcp251x_board_info[] = { | |||
95 | .chip_select = 1, | 95 | .chip_select = 1, |
96 | .platform_data = &mcp251x_info, | 96 | .platform_data = &mcp251x_info, |
97 | .controller_data = &mcp251x_chip_info2, | 97 | .controller_data = &mcp251x_chip_info2, |
98 | .irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ2) | 98 | .irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ2) |
99 | }, | 99 | }, |
100 | { | 100 | { |
101 | .modalias = "mcp2515", | 101 | .modalias = "mcp2515", |
@@ -104,7 +104,7 @@ static struct spi_board_info mcp251x_board_info[] = { | |||
104 | .chip_select = 0, | 104 | .chip_select = 0, |
105 | .platform_data = &mcp251x_info, | 105 | .platform_data = &mcp251x_info, |
106 | .controller_data = &mcp251x_chip_info3, | 106 | .controller_data = &mcp251x_chip_info3, |
107 | .irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ3) | 107 | .irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ3) |
108 | }, | 108 | }, |
109 | { | 109 | { |
110 | .modalias = "mcp2515", | 110 | .modalias = "mcp2515", |
@@ -113,7 +113,7 @@ static struct spi_board_info mcp251x_board_info[] = { | |||
113 | .chip_select = 1, | 113 | .chip_select = 1, |
114 | .platform_data = &mcp251x_info, | 114 | .platform_data = &mcp251x_info, |
115 | .controller_data = &mcp251x_chip_info4, | 115 | .controller_data = &mcp251x_chip_info4, |
116 | .irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ4) | 116 | .irq = PXA_GPIO_TO_IRQ(ICONTROL_MCP251x_nIRQ4) |
117 | } | 117 | } |
118 | }; | 118 | }; |
119 | 119 | ||
diff --git a/arch/arm/mach-pxa/include/mach/csb726.h b/arch/arm/mach-pxa/include/mach/csb726.h index 747ab1a71f2f..2628e7b72116 100644 --- a/arch/arm/mach-pxa/include/mach/csb726.h +++ b/arch/arm/mach-pxa/include/mach/csb726.h | |||
@@ -19,8 +19,8 @@ | |||
19 | #define CSB726_FLASH_SIZE (64 * 1024 * 1024) | 19 | #define CSB726_FLASH_SIZE (64 * 1024 * 1024) |
20 | #define CSB726_FLASH_uMON (8 * 1024 * 1024) | 20 | #define CSB726_FLASH_uMON (8 * 1024 * 1024) |
21 | 21 | ||
22 | #define CSB726_IRQ_LAN gpio_to_irq(CSB726_GPIO_IRQ_LAN) | 22 | #define CSB726_IRQ_LAN PXA_GPIO_TO_IRQ(CSB726_GPIO_IRQ_LAN) |
23 | #define CSB726_IRQ_SM501 gpio_to_irq(CSB726_GPIO_IRQ_SM501) | 23 | #define CSB726_IRQ_SM501 PXA_GPIO_TO_IRQ(CSB726_GPIO_IRQ_SM501) |
24 | 24 | ||
25 | #endif | 25 | #endif |
26 | 26 | ||
diff --git a/arch/arm/mach-pxa/include/mach/gpio.h b/arch/arm/mach-pxa/include/mach/gpio.h index 13b903907087..5cf0137e64d9 100644 --- a/arch/arm/mach-pxa/include/mach/gpio.h +++ b/arch/arm/mach-pxa/include/mach/gpio.h | |||
@@ -28,8 +28,5 @@ | |||
28 | /* The defines for the driver are needed for the accelerated accessors */ | 28 | /* The defines for the driver are needed for the accelerated accessors */ |
29 | #include "gpio-pxa.h" | 29 | #include "gpio-pxa.h" |
30 | 30 | ||
31 | #define gpio_to_irq(gpio) PXA_GPIO_TO_IRQ(gpio) | ||
32 | #define irq_to_gpio(irq) (irq - PXA_GPIO_TO_IRQ(0)) | ||
33 | |||
34 | #include <plat/gpio.h> | 31 | #include <plat/gpio.h> |
35 | #endif | 32 | #endif |
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c index 9cd235698771..27147f6ff7cb 100644 --- a/arch/arm/mach-pxa/littleton.c +++ b/arch/arm/mach-pxa/littleton.c | |||
@@ -395,7 +395,7 @@ static struct i2c_board_info littleton_i2c_info[] = { | |||
395 | .type = "da9034", | 395 | .type = "da9034", |
396 | .addr = 0x34, | 396 | .addr = 0x34, |
397 | .platform_data = &littleton_da9034_info, | 397 | .platform_data = &littleton_da9034_info, |
398 | .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO18)), | 398 | .irq = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO18)), |
399 | }, | 399 | }, |
400 | [1] = { | 400 | [1] = { |
401 | .type = "max7320", | 401 | .type = "max7320", |
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index 4b796c37af3e..e340ea084248 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c | |||
@@ -184,8 +184,8 @@ static struct resource egpio_resources[] = { | |||
184 | .flags = IORESOURCE_MEM, | 184 | .flags = IORESOURCE_MEM, |
185 | }, | 185 | }, |
186 | [1] = { | 186 | [1] = { |
187 | .start = gpio_to_irq(GPIO13_MAGICIAN_CPLD_IRQ), | 187 | .start = PXA_GPIO_TO_IRQ(GPIO13_MAGICIAN_CPLD_IRQ), |
188 | .end = gpio_to_irq(GPIO13_MAGICIAN_CPLD_IRQ), | 188 | .end = PXA_GPIO_TO_IRQ(GPIO13_MAGICIAN_CPLD_IRQ), |
189 | .flags = IORESOURCE_IRQ, | 189 | .flags = IORESOURCE_IRQ, |
190 | }, | 190 | }, |
191 | }; | 191 | }; |
@@ -468,8 +468,8 @@ static struct resource pasic3_resources[] = { | |||
468 | }, | 468 | }, |
469 | /* No IRQ handler in the PASIC3, DS1WM needs an external IRQ */ | 469 | /* No IRQ handler in the PASIC3, DS1WM needs an external IRQ */ |
470 | [1] = { | 470 | [1] = { |
471 | .start = gpio_to_irq(GPIO107_MAGICIAN_DS1WM_IRQ), | 471 | .start = PXA_GPIO_TO_IRQ(GPIO107_MAGICIAN_DS1WM_IRQ), |
472 | .end = gpio_to_irq(GPIO107_MAGICIAN_DS1WM_IRQ), | 472 | .end = PXA_GPIO_TO_IRQ(GPIO107_MAGICIAN_DS1WM_IRQ), |
473 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | 473 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
474 | } | 474 | } |
475 | }; | 475 | }; |
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index b938fc2c316a..23f90c74c191 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
@@ -541,15 +541,15 @@ static struct pda_power_pdata power_pdata = { | |||
541 | static struct resource power_resources[] = { | 541 | static struct resource power_resources[] = { |
542 | [0] = { | 542 | [0] = { |
543 | .name = "ac", | 543 | .name = "ac", |
544 | .start = gpio_to_irq(GPIO96_AC_DETECT), | 544 | .start = PXA_GPIO_TO_IRQ(GPIO96_AC_DETECT), |
545 | .end = gpio_to_irq(GPIO96_AC_DETECT), | 545 | .end = PXA_GPIO_TO_IRQ(GPIO96_AC_DETECT), |
546 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | | 546 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | |
547 | IORESOURCE_IRQ_LOWEDGE, | 547 | IORESOURCE_IRQ_LOWEDGE, |
548 | }, | 548 | }, |
549 | [1] = { | 549 | [1] = { |
550 | .name = "usb", | 550 | .name = "usb", |
551 | .start = gpio_to_irq(GPIO13_nUSB_DETECT), | 551 | .start = PXA_GPIO_TO_IRQ(GPIO13_nUSB_DETECT), |
552 | .end = gpio_to_irq(GPIO13_nUSB_DETECT), | 552 | .end = PXA_GPIO_TO_IRQ(GPIO13_nUSB_DETECT), |
553 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | | 553 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | |
554 | IORESOURCE_IRQ_LOWEDGE, | 554 | IORESOURCE_IRQ_LOWEDGE, |
555 | }, | 555 | }, |
diff --git a/arch/arm/mach-pxa/mxm8x10.c b/arch/arm/mach-pxa/mxm8x10.c index b5a8fd3fce04..a13a1e365851 100644 --- a/arch/arm/mach-pxa/mxm8x10.c +++ b/arch/arm/mach-pxa/mxm8x10.c | |||
@@ -416,8 +416,8 @@ static struct resource dm9k_resources[] = { | |||
416 | .flags = IORESOURCE_MEM | 416 | .flags = IORESOURCE_MEM |
417 | }, | 417 | }, |
418 | [2] = { | 418 | [2] = { |
419 | .start = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO9)), | 419 | .start = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO9)), |
420 | .end = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO9)), | 420 | .end = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO9)), |
421 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | 421 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
422 | } | 422 | } |
423 | }; | 423 | }; |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 1e6d796829ac..8ee4b6cfa385 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -212,7 +212,7 @@ static struct spi_board_info poodle_spi_devices[] = { | |||
212 | .bus_num = 1, | 212 | .bus_num = 1, |
213 | .platform_data = &poodle_ads7846_info, | 213 | .platform_data = &poodle_ads7846_info, |
214 | .controller_data= &poodle_ads7846_chip, | 214 | .controller_data= &poodle_ads7846_chip, |
215 | .irq = gpio_to_irq(POODLE_GPIO_TP_INT), | 215 | .irq = PXA_GPIO_TO_IRQ(POODLE_GPIO_TP_INT), |
216 | }, | 216 | }, |
217 | }; | 217 | }; |
218 | 218 | ||
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index f05f9486b0cb..0f38cfce5c35 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -287,7 +287,7 @@ static inline void pxa25x_init_pm(void) {} | |||
287 | 287 | ||
288 | static int pxa25x_set_wake(struct irq_data *d, unsigned int on) | 288 | static int pxa25x_set_wake(struct irq_data *d, unsigned int on) |
289 | { | 289 | { |
290 | int gpio = irq_to_gpio(d->irq); | 290 | int gpio = pxa_irq_to_gpio(d->irq); |
291 | uint32_t mask = 0; | 291 | uint32_t mask = 0; |
292 | 292 | ||
293 | if (gpio >= 0 && gpio < 85) | 293 | if (gpio >= 0 && gpio < 85) |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index bc5a98ebaa72..44563a0997bd 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -355,7 +355,7 @@ static inline void pxa27x_init_pm(void) {} | |||
355 | */ | 355 | */ |
356 | static int pxa27x_set_wake(struct irq_data *d, unsigned int on) | 356 | static int pxa27x_set_wake(struct irq_data *d, unsigned int on) |
357 | { | 357 | { |
358 | int gpio = irq_to_gpio(d->irq); | 358 | int gpio = pxa_irq_to_gpio(d->irq); |
359 | uint32_t mask; | 359 | uint32_t mask; |
360 | 360 | ||
361 | if (gpio >= 0 && gpio < 128) | 361 | if (gpio >= 0 && gpio < 128) |
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index 6810cddec927..9c58e87f2b82 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c | |||
@@ -292,8 +292,8 @@ static struct resource smc91x_resources[] = { | |||
292 | .flags = IORESOURCE_MEM, | 292 | .flags = IORESOURCE_MEM, |
293 | }, | 293 | }, |
294 | { | 294 | { |
295 | .start = gpio_to_irq(GPIO_ETH_IRQ), | 295 | .start = PXA_GPIO_TO_IRQ(GPIO_ETH_IRQ), |
296 | .end = gpio_to_irq(GPIO_ETH_IRQ), | 296 | .end = PXA_GPIO_TO_IRQ(GPIO_ETH_IRQ), |
297 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, | 297 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, |
298 | } | 298 | } |
299 | }; | 299 | }; |
@@ -671,7 +671,7 @@ static struct lis3lv02d_platform_data lis3_pdata = { | |||
671 | .chip_select = 1, \ | 671 | .chip_select = 1, \ |
672 | .controller_data = (void *) GPIO_ACCEL_CS, \ | 672 | .controller_data = (void *) GPIO_ACCEL_CS, \ |
673 | .platform_data = &lis3_pdata, \ | 673 | .platform_data = &lis3_pdata, \ |
674 | .irq = gpio_to_irq(GPIO_ACCEL_IRQ), \ | 674 | .irq = PXA_GPIO_TO_IRQ(GPIO_ACCEL_IRQ), \ |
675 | } | 675 | } |
676 | 676 | ||
677 | #define SPI_DAC7512 \ | 677 | #define SPI_DAC7512 \ |
@@ -955,7 +955,7 @@ static struct eeti_ts_platform_data eeti_ts_pdata = { | |||
955 | static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = { | 955 | static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = { |
956 | .type = "eeti_ts", | 956 | .type = "eeti_ts", |
957 | .addr = 0x0a, | 957 | .addr = 0x0a, |
958 | .irq = gpio_to_irq(GPIO_TOUCH_IRQ), | 958 | .irq = PXA_GPIO_TO_IRQ(GPIO_TOUCH_IRQ), |
959 | .platform_data = &eeti_ts_pdata, | 959 | .platform_data = &eeti_ts_pdata, |
960 | }; | 960 | }; |
961 | 961 | ||
diff --git a/arch/arm/mach-pxa/saar.c b/arch/arm/mach-pxa/saar.c index fc2c1e05af9c..423ec899a8a8 100644 --- a/arch/arm/mach-pxa/saar.c +++ b/arch/arm/mach-pxa/saar.c | |||
@@ -96,8 +96,8 @@ static struct resource smc91x_resources[] = { | |||
96 | .flags = IORESOURCE_MEM, | 96 | .flags = IORESOURCE_MEM, |
97 | }, | 97 | }, |
98 | [1] = { | 98 | [1] = { |
99 | .start = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO97)), | 99 | .start = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO97)), |
100 | .end = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO97)), | 100 | .end = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO97)), |
101 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | 101 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
102 | } | 102 | } |
103 | }; | 103 | }; |
@@ -502,7 +502,7 @@ static struct i2c_board_info saar_i2c_info[] = { | |||
502 | .type = "da9034", | 502 | .type = "da9034", |
503 | .addr = 0x34, | 503 | .addr = 0x34, |
504 | .platform_data = &saar_da9034_info, | 504 | .platform_data = &saar_da9034_info, |
505 | .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO83)), | 505 | .irq = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO83)), |
506 | }, | 506 | }, |
507 | }; | 507 | }; |
508 | 508 | ||
diff --git a/arch/arm/mach-pxa/saarb.c b/arch/arm/mach-pxa/saarb.c index 3e999e308a2d..d1cdd6a081ed 100644 --- a/arch/arm/mach-pxa/saarb.c +++ b/arch/arm/mach-pxa/saarb.c | |||
@@ -92,7 +92,7 @@ static struct i2c_board_info saarb_i2c_info[] = { | |||
92 | .type = "88PM860x", | 92 | .type = "88PM860x", |
93 | .addr = 0x34, | 93 | .addr = 0x34, |
94 | .platform_data = &saarb_pm8607_info, | 94 | .platform_data = &saarb_pm8607_info, |
95 | .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO83)), | 95 | .irq = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO83)), |
96 | }, | 96 | }, |
97 | }; | 97 | }; |
98 | 98 | ||
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 953a9195f9e5..1b39cec03cce 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -552,7 +552,7 @@ static struct spi_board_info spitz_spi_devices[] = { | |||
552 | .chip_select = 0, | 552 | .chip_select = 0, |
553 | .platform_data = &spitz_ads7846_info, | 553 | .platform_data = &spitz_ads7846_info, |
554 | .controller_data = &spitz_ads7846_chip, | 554 | .controller_data = &spitz_ads7846_chip, |
555 | .irq = gpio_to_irq(SPITZ_GPIO_TP_INT), | 555 | .irq = PXA_GPIO_TO_IRQ(SPITZ_GPIO_TP_INT), |
556 | }, { | 556 | }, { |
557 | .modalias = "corgi-lcd", | 557 | .modalias = "corgi-lcd", |
558 | .max_speed_hz = 50000, | 558 | .max_speed_hz = 50000, |
diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c index bbf79d532d1e..940ca56b37f9 100644 --- a/arch/arm/mach-pxa/stargate2.c +++ b/arch/arm/mach-pxa/stargate2.c | |||
@@ -546,7 +546,7 @@ static struct i2c_board_info __initdata imote2_pwr_i2c_board_info[] = { | |||
546 | .type = "da9030", | 546 | .type = "da9030", |
547 | .addr = 0x49, | 547 | .addr = 0x49, |
548 | .platform_data = &imote2_da9030_pdata, | 548 | .platform_data = &imote2_da9030_pdata, |
549 | .irq = gpio_to_irq(1), | 549 | .irq = PXA_GPIO_TO_IRQ(1), |
550 | }, | 550 | }, |
551 | }; | 551 | }; |
552 | 552 | ||
@@ -913,7 +913,7 @@ static struct i2c_board_info __initdata stargate2_pwr_i2c_board_info[] = { | |||
913 | .type = "da9030", | 913 | .type = "da9030", |
914 | .addr = 0x49, | 914 | .addr = 0x49, |
915 | .platform_data = &stargate2_da9030_pdata, | 915 | .platform_data = &stargate2_da9030_pdata, |
916 | .irq = gpio_to_irq(1), | 916 | .irq = PXA_GPIO_TO_IRQ(1), |
917 | }, | 917 | }, |
918 | }; | 918 | }; |
919 | 919 | ||
diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c index ad47bb98f30d..43bdcb9761f2 100644 --- a/arch/arm/mach-pxa/tavorevb.c +++ b/arch/arm/mach-pxa/tavorevb.c | |||
@@ -85,8 +85,8 @@ static struct resource smc91x_resources[] = { | |||
85 | .flags = IORESOURCE_MEM, | 85 | .flags = IORESOURCE_MEM, |
86 | }, | 86 | }, |
87 | [1] = { | 87 | [1] = { |
88 | .start = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO47)), | 88 | .start = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO47)), |
89 | .end = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO47)), | 89 | .end = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO47)), |
90 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | 90 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
91 | } | 91 | } |
92 | }; | 92 | }; |
diff --git a/arch/arm/mach-pxa/tavorevb3.c b/arch/arm/mach-pxa/tavorevb3.c index fd569167302a..46c60b3cbe79 100644 --- a/arch/arm/mach-pxa/tavorevb3.c +++ b/arch/arm/mach-pxa/tavorevb3.c | |||
@@ -101,7 +101,7 @@ static struct i2c_board_info evb3_i2c_info[] = { | |||
101 | .type = "88PM860x", | 101 | .type = "88PM860x", |
102 | .addr = 0x34, | 102 | .addr = 0x34, |
103 | .platform_data = &evb3_pm8607_info, | 103 | .platform_data = &evb3_pm8607_info, |
104 | .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO83)), | 104 | .irq = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO83)), |
105 | }, | 105 | }, |
106 | }; | 106 | }; |
107 | 107 | ||
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 402b0c96613b..1ddb9826448a 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -404,8 +404,8 @@ static struct pda_power_pdata tosa_power_data = { | |||
404 | static struct resource tosa_power_resource[] = { | 404 | static struct resource tosa_power_resource[] = { |
405 | { | 405 | { |
406 | .name = "ac", | 406 | .name = "ac", |
407 | .start = gpio_to_irq(TOSA_GPIO_AC_IN), | 407 | .start = PXA_GPIO_TO_IRQ(TOSA_GPIO_AC_IN), |
408 | .end = gpio_to_irq(TOSA_GPIO_AC_IN), | 408 | .end = PXA_GPIO_TO_IRQ(TOSA_GPIO_AC_IN), |
409 | .flags = IORESOURCE_IRQ | | 409 | .flags = IORESOURCE_IRQ | |
410 | IORESOURCE_IRQ_HIGHEDGE | | 410 | IORESOURCE_IRQ_HIGHEDGE | |
411 | IORESOURCE_IRQ_LOWEDGE, | 411 | IORESOURCE_IRQ_LOWEDGE, |
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index 242ddae332d3..d9a653a77176 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c | |||
@@ -422,8 +422,8 @@ static struct resource smc91x_resources[] = { | |||
422 | .flags = IORESOURCE_MEM, | 422 | .flags = IORESOURCE_MEM, |
423 | }, | 423 | }, |
424 | [1] = { | 424 | [1] = { |
425 | .start = gpio_to_irq(VIPER_ETH_GPIO), | 425 | .start = PXA_GPIO_TO_IRQ(VIPER_ETH_GPIO), |
426 | .end = gpio_to_irq(VIPER_ETH_GPIO), | 426 | .end = PXA_GPIO_TO_IRQ(VIPER_ETH_GPIO), |
427 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | 427 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
428 | }, | 428 | }, |
429 | [2] = { | 429 | [2] = { |
@@ -546,7 +546,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
546 | /* External UARTs */ | 546 | /* External UARTs */ |
547 | { | 547 | { |
548 | .mapbase = VIPER_UARTA_PHYS, | 548 | .mapbase = VIPER_UARTA_PHYS, |
549 | .irq = gpio_to_irq(VIPER_UARTA_GPIO), | 549 | .irq = PXA_GPIO_TO_IRQ(VIPER_UARTA_GPIO), |
550 | .irqflags = IRQF_TRIGGER_RISING, | 550 | .irqflags = IRQF_TRIGGER_RISING, |
551 | .uartclk = 1843200, | 551 | .uartclk = 1843200, |
552 | .regshift = 1, | 552 | .regshift = 1, |
@@ -556,7 +556,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
556 | }, | 556 | }, |
557 | { | 557 | { |
558 | .mapbase = VIPER_UARTB_PHYS, | 558 | .mapbase = VIPER_UARTB_PHYS, |
559 | .irq = gpio_to_irq(VIPER_UARTB_GPIO), | 559 | .irq = PXA_GPIO_TO_IRQ(VIPER_UARTB_GPIO), |
560 | .irqflags = IRQF_TRIGGER_RISING, | 560 | .irqflags = IRQF_TRIGGER_RISING, |
561 | .uartclk = 1843200, | 561 | .uartclk = 1843200, |
562 | .regshift = 1, | 562 | .regshift = 1, |
@@ -596,8 +596,8 @@ static struct resource isp116x_resources[] = { | |||
596 | .flags = IORESOURCE_MEM, | 596 | .flags = IORESOURCE_MEM, |
597 | }, | 597 | }, |
598 | [2] = { | 598 | [2] = { |
599 | .start = gpio_to_irq(VIPER_USB_GPIO), | 599 | .start = PXA_GPIO_TO_IRQ(VIPER_USB_GPIO), |
600 | .end = gpio_to_irq(VIPER_USB_GPIO), | 600 | .end = PXA_GPIO_TO_IRQ(VIPER_USB_GPIO), |
601 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | 601 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
602 | }, | 602 | }, |
603 | }; | 603 | }; |
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c index 585e4f443e15..bf2403c424bf 100644 --- a/arch/arm/mach-pxa/vpac270.c +++ b/arch/arm/mach-pxa/vpac270.c | |||
@@ -610,8 +610,8 @@ static struct resource vpac270_ide_resources[] = { | |||
610 | .flags = IORESOURCE_DMA | 610 | .flags = IORESOURCE_DMA |
611 | }, | 611 | }, |
612 | [3] = { /* IDE IRQ pin */ | 612 | [3] = { /* IDE IRQ pin */ |
613 | .start = gpio_to_irq(GPIO36_VPAC270_IDE_IRQ), | 613 | .start = PXA_GPIO_TO_IRQ(GPIO36_VPAC270_IDE_IRQ), |
614 | .end = gpio_to_irq(GPIO36_VPAC270_IDE_IRQ), | 614 | .end = PXA_GPIO_TO_IRQ(GPIO36_VPAC270_IDE_IRQ), |
615 | .flags = IORESOURCE_IRQ | 615 | .flags = IORESOURCE_IRQ |
616 | } | 616 | } |
617 | }; | 617 | }; |
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index ead32c90fec1..424661833ce2 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c | |||
@@ -573,7 +573,7 @@ static struct spi_board_info spi_board_info[] __initdata = { | |||
573 | .modalias = "libertas_spi", | 573 | .modalias = "libertas_spi", |
574 | .platform_data = &z2_lbs_pdata, | 574 | .platform_data = &z2_lbs_pdata, |
575 | .controller_data = &z2_lbs_chip_info, | 575 | .controller_data = &z2_lbs_chip_info, |
576 | .irq = gpio_to_irq(GPIO36_ZIPITZ2_WIFI_IRQ), | 576 | .irq = PXA_GPIO_TO_IRQ(GPIO36_ZIPITZ2_WIFI_IRQ), |
577 | .max_speed_hz = 13000000, | 577 | .max_speed_hz = 13000000, |
578 | .bus_num = 1, | 578 | .bus_num = 1, |
579 | .chip_select = 0, | 579 | .chip_select = 0, |
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 498b83b089f3..68de9c17e4c5 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c | |||
@@ -233,7 +233,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
233 | /* FIXME: Shared IRQs on COM1-COM4 will not work properly on v1i1 hardware. */ | 233 | /* FIXME: Shared IRQs on COM1-COM4 will not work properly on v1i1 hardware. */ |
234 | { /* COM1 */ | 234 | { /* COM1 */ |
235 | .mapbase = 0x10000000, | 235 | .mapbase = 0x10000000, |
236 | .irq = gpio_to_irq(ZEUS_UARTA_GPIO), | 236 | .irq = PXA_GPIO_TO_IRQ(ZEUS_UARTA_GPIO), |
237 | .irqflags = IRQF_TRIGGER_RISING, | 237 | .irqflags = IRQF_TRIGGER_RISING, |
238 | .uartclk = 14745600, | 238 | .uartclk = 14745600, |
239 | .regshift = 1, | 239 | .regshift = 1, |
@@ -242,7 +242,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
242 | }, | 242 | }, |
243 | { /* COM2 */ | 243 | { /* COM2 */ |
244 | .mapbase = 0x10800000, | 244 | .mapbase = 0x10800000, |
245 | .irq = gpio_to_irq(ZEUS_UARTB_GPIO), | 245 | .irq = PXA_GPIO_TO_IRQ(ZEUS_UARTB_GPIO), |
246 | .irqflags = IRQF_TRIGGER_RISING, | 246 | .irqflags = IRQF_TRIGGER_RISING, |
247 | .uartclk = 14745600, | 247 | .uartclk = 14745600, |
248 | .regshift = 1, | 248 | .regshift = 1, |
@@ -251,7 +251,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
251 | }, | 251 | }, |
252 | { /* COM3 */ | 252 | { /* COM3 */ |
253 | .mapbase = 0x11000000, | 253 | .mapbase = 0x11000000, |
254 | .irq = gpio_to_irq(ZEUS_UARTC_GPIO), | 254 | .irq = PXA_GPIO_TO_IRQ(ZEUS_UARTC_GPIO), |
255 | .irqflags = IRQF_TRIGGER_RISING, | 255 | .irqflags = IRQF_TRIGGER_RISING, |
256 | .uartclk = 14745600, | 256 | .uartclk = 14745600, |
257 | .regshift = 1, | 257 | .regshift = 1, |
@@ -260,7 +260,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
260 | }, | 260 | }, |
261 | { /* COM4 */ | 261 | { /* COM4 */ |
262 | .mapbase = 0x11800000, | 262 | .mapbase = 0x11800000, |
263 | .irq = gpio_to_irq(ZEUS_UARTD_GPIO), | 263 | .irq = PXA_GPIO_TO_IRQ(ZEUS_UARTD_GPIO), |
264 | .irqflags = IRQF_TRIGGER_RISING, | 264 | .irqflags = IRQF_TRIGGER_RISING, |
265 | .uartclk = 14745600, | 265 | .uartclk = 14745600, |
266 | .regshift = 1, | 266 | .regshift = 1, |
@@ -321,8 +321,8 @@ static struct resource zeus_dm9k0_resource[] = { | |||
321 | .flags = IORESOURCE_MEM | 321 | .flags = IORESOURCE_MEM |
322 | }, | 322 | }, |
323 | [2] = { | 323 | [2] = { |
324 | .start = gpio_to_irq(ZEUS_ETH0_GPIO), | 324 | .start = PXA_GPIO_TO_IRQ(ZEUS_ETH0_GPIO), |
325 | .end = gpio_to_irq(ZEUS_ETH0_GPIO), | 325 | .end = PXA_GPIO_TO_IRQ(ZEUS_ETH0_GPIO), |
326 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, | 326 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, |
327 | }, | 327 | }, |
328 | }; | 328 | }; |
@@ -339,8 +339,8 @@ static struct resource zeus_dm9k1_resource[] = { | |||
339 | .flags = IORESOURCE_MEM, | 339 | .flags = IORESOURCE_MEM, |
340 | }, | 340 | }, |
341 | [2] = { | 341 | [2] = { |
342 | .start = gpio_to_irq(ZEUS_ETH1_GPIO), | 342 | .start = PXA_GPIO_TO_IRQ(ZEUS_ETH1_GPIO), |
343 | .end = gpio_to_irq(ZEUS_ETH1_GPIO), | 343 | .end = PXA_GPIO_TO_IRQ(ZEUS_ETH1_GPIO), |
344 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, | 344 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, |
345 | }, | 345 | }, |
346 | }; | 346 | }; |
@@ -423,7 +423,7 @@ static struct spi_board_info zeus_spi_board_info[] = { | |||
423 | [0] = { | 423 | [0] = { |
424 | .modalias = "mcp2515", | 424 | .modalias = "mcp2515", |
425 | .platform_data = &zeus_mcp2515_pdata, | 425 | .platform_data = &zeus_mcp2515_pdata, |
426 | .irq = gpio_to_irq(ZEUS_CAN_GPIO), | 426 | .irq = PXA_GPIO_TO_IRQ(ZEUS_CAN_GPIO), |
427 | .max_speed_hz = 1*1000*1000, | 427 | .max_speed_hz = 1*1000*1000, |
428 | .bus_num = 3, | 428 | .bus_num = 3, |
429 | .mode = SPI_MODE_0, | 429 | .mode = SPI_MODE_0, |
@@ -753,7 +753,7 @@ static struct i2c_board_info __initdata zeus_i2c_devices[] = { | |||
753 | { | 753 | { |
754 | I2C_BOARD_INFO("pca9535", 0x20), | 754 | I2C_BOARD_INFO("pca9535", 0x20), |
755 | .platform_data = &zeus_pca953x_pdata[2], | 755 | .platform_data = &zeus_pca953x_pdata[2], |
756 | .irq = gpio_to_irq(ZEUS_EXTGPIO_GPIO), | 756 | .irq = PXA_GPIO_TO_IRQ(ZEUS_EXTGPIO_GPIO), |
757 | }, | 757 | }, |
758 | { I2C_BOARD_INFO("lm75a", 0x48) }, | 758 | { I2C_BOARD_INFO("lm75a", 0x48) }, |
759 | { I2C_BOARD_INFO("24c01", 0x50) }, | 759 | { I2C_BOARD_INFO("24c01", 0x50) }, |
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c index 31d496891891..2406fd2727ef 100644 --- a/arch/arm/mach-pxa/zylonite.c +++ b/arch/arm/mach-pxa/zylonite.c | |||
@@ -407,8 +407,8 @@ static void __init zylonite_init(void) | |||
407 | * Note: We depend that the bootloader set | 407 | * Note: We depend that the bootloader set |
408 | * the correct value to MSC register for SMC91x. | 408 | * the correct value to MSC register for SMC91x. |
409 | */ | 409 | */ |
410 | smc91x_resources[1].start = gpio_to_irq(gpio_eth_irq); | 410 | smc91x_resources[1].start = PXA_GPIO_TO_IRQ(gpio_eth_irq); |
411 | smc91x_resources[1].end = gpio_to_irq(gpio_eth_irq); | 411 | smc91x_resources[1].end = PXA_GPIO_TO_IRQ(gpio_eth_irq); |
412 | platform_device_register(&smc91x_device); | 412 | platform_device_register(&smc91x_device); |
413 | 413 | ||
414 | pxa_set_ac97_info(NULL); | 414 | pxa_set_ac97_info(NULL); |
diff --git a/arch/arm/plat-pxa/include/plat/gpio-pxa.h b/arch/arm/plat-pxa/include/plat/gpio-pxa.h index b6390beff323..15bf9be051e8 100644 --- a/arch/arm/plat-pxa/include/plat/gpio-pxa.h +++ b/arch/arm/plat-pxa/include/plat/gpio-pxa.h | |||
@@ -40,5 +40,6 @@ extern int pxa_last_gpio; | |||
40 | typedef int (*set_wake_t)(struct irq_data *d, unsigned int on); | 40 | typedef int (*set_wake_t)(struct irq_data *d, unsigned int on); |
41 | 41 | ||
42 | extern void pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn); | 42 | extern void pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn); |
43 | extern int pxa_irq_to_gpio(int irq); | ||
43 | 44 | ||
44 | #endif /* __PLAT_PXA_GPIO_H */ | 45 | #endif /* __PLAT_PXA_GPIO_H */ |
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index a4121bb50cf2..3e76c588f080 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c | |||
@@ -39,8 +39,19 @@ struct pxa_gpio_chip { | |||
39 | #endif | 39 | #endif |
40 | }; | 40 | }; |
41 | 41 | ||
42 | enum { | ||
43 | PXA25X_GPIO = 0, | ||
44 | PXA26X_GPIO, | ||
45 | PXA27X_GPIO, | ||
46 | PXA3XX_GPIO, | ||
47 | PXA93X_GPIO, | ||
48 | MMP_GPIO = 0x10, | ||
49 | MMP2_GPIO, | ||
50 | }; | ||
51 | |||
42 | static DEFINE_SPINLOCK(gpio_lock); | 52 | static DEFINE_SPINLOCK(gpio_lock); |
43 | static struct pxa_gpio_chip *pxa_gpio_chips; | 53 | static struct pxa_gpio_chip *pxa_gpio_chips; |
54 | static int gpio_type; | ||
44 | 55 | ||
45 | #define for_each_gpio_chip(i, c) \ | 56 | #define for_each_gpio_chip(i, c) \ |
46 | for (i = 0, c = &pxa_gpio_chips[0]; i <= pxa_last_gpio; i += 32, c++) | 57 | for (i = 0, c = &pxa_gpio_chips[0]; i <= pxa_last_gpio; i += 32, c++) |
@@ -55,6 +66,75 @@ static inline struct pxa_gpio_chip *gpio_to_pxachip(unsigned gpio) | |||
55 | return &pxa_gpio_chips[gpio_to_bank(gpio)]; | 66 | return &pxa_gpio_chips[gpio_to_bank(gpio)]; |
56 | } | 67 | } |
57 | 68 | ||
69 | static inline int gpio_is_pxa_type(int type) | ||
70 | { | ||
71 | return (type & MMP_GPIO) == 0; | ||
72 | } | ||
73 | |||
74 | static inline int gpio_is_mmp_type(int type) | ||
75 | { | ||
76 | return (type & MMP_GPIO) != 0; | ||
77 | } | ||
78 | |||
79 | #ifdef CONFIG_ARCH_PXA | ||
80 | static inline int __pxa_gpio_to_irq(int gpio) | ||
81 | { | ||
82 | if (gpio_is_pxa_type(gpio_type)) | ||
83 | return PXA_GPIO_TO_IRQ(gpio); | ||
84 | return -1; | ||
85 | } | ||
86 | |||
87 | static inline int __pxa_irq_to_gpio(int irq) | ||
88 | { | ||
89 | if (gpio_is_pxa_type(gpio_type)) | ||
90 | return irq - PXA_GPIO_TO_IRQ(0); | ||
91 | return -1; | ||
92 | } | ||
93 | #else | ||
94 | static inline int __pxa_gpio_to_irq(int gpio) { return -1; } | ||
95 | static inline int __pxa_irq_to_gpio(int irq) { return -1; } | ||
96 | #endif | ||
97 | |||
98 | #ifdef CONFIG_ARCH_MMP | ||
99 | static inline int __mmp_gpio_to_irq(int gpio) | ||
100 | { | ||
101 | if (gpio_is_mmp_type(gpio_type)) | ||
102 | return MMP_GPIO_TO_IRQ(gpio); | ||
103 | return -1; | ||
104 | } | ||
105 | |||
106 | static inline int __mmp_irq_to_gpio(int irq) | ||
107 | { | ||
108 | if (gpio_is_mmp_type(gpio_type)) | ||
109 | return irq - MMP_GPIO_TO_IRQ(0); | ||
110 | return -1; | ||
111 | } | ||
112 | #else | ||
113 | static inline int __mmp_gpio_to_irq(int gpio) { return -1; } | ||
114 | static inline int __mmp_irq_to_gpio(int irq) { return -1; } | ||
115 | #endif | ||
116 | |||
117 | static int pxa_gpio_to_irq(struct gpio_chip *chip, unsigned offset) | ||
118 | { | ||
119 | int gpio, ret; | ||
120 | |||
121 | gpio = chip->base + offset; | ||
122 | ret = __pxa_gpio_to_irq(gpio); | ||
123 | if (ret >= 0) | ||
124 | return ret; | ||
125 | return __mmp_gpio_to_irq(gpio); | ||
126 | } | ||
127 | |||
128 | int pxa_irq_to_gpio(int irq) | ||
129 | { | ||
130 | int ret; | ||
131 | |||
132 | ret = __pxa_irq_to_gpio(irq); | ||
133 | if (ret >= 0) | ||
134 | return ret; | ||
135 | return __mmp_irq_to_gpio(irq); | ||
136 | } | ||
137 | |||
58 | static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset) | 138 | static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset) |
59 | { | 139 | { |
60 | void __iomem *base = gpio_chip_base(chip); | 140 | void __iomem *base = gpio_chip_base(chip); |
@@ -131,6 +211,7 @@ static int __init pxa_init_gpio_chip(int gpio_end) | |||
131 | c->direction_output = pxa_gpio_direction_output; | 211 | c->direction_output = pxa_gpio_direction_output; |
132 | c->get = pxa_gpio_get; | 212 | c->get = pxa_gpio_get; |
133 | c->set = pxa_gpio_set; | 213 | c->set = pxa_gpio_set; |
214 | c->to_irq = pxa_gpio_to_irq; | ||
134 | 215 | ||
135 | /* number of GPIOs on last bank may be less than 32 */ | 216 | /* number of GPIOs on last bank may be less than 32 */ |
136 | c->ngpio = (gpio + 31 > gpio_end) ? (gpio_end - gpio + 1) : 32; | 217 | c->ngpio = (gpio + 31 > gpio_end) ? (gpio_end - gpio + 1) : 32; |
@@ -158,7 +239,7 @@ static inline void update_edge_detect(struct pxa_gpio_chip *c) | |||
158 | static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type) | 239 | static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type) |
159 | { | 240 | { |
160 | struct pxa_gpio_chip *c; | 241 | struct pxa_gpio_chip *c; |
161 | int gpio = irq_to_gpio(d->irq); | 242 | int gpio = pxa_irq_to_gpio(d->irq); |
162 | unsigned long gpdr, mask = GPIO_bit(gpio); | 243 | unsigned long gpdr, mask = GPIO_bit(gpio); |
163 | 244 | ||
164 | c = gpio_to_pxachip(gpio); | 245 | c = gpio_to_pxachip(gpio); |
@@ -229,7 +310,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc) | |||
229 | 310 | ||
230 | static void pxa_ack_muxed_gpio(struct irq_data *d) | 311 | static void pxa_ack_muxed_gpio(struct irq_data *d) |
231 | { | 312 | { |
232 | int gpio = irq_to_gpio(d->irq); | 313 | int gpio = pxa_irq_to_gpio(d->irq); |
233 | struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); | 314 | struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); |
234 | 315 | ||
235 | __raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET); | 316 | __raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET); |
@@ -237,7 +318,7 @@ static void pxa_ack_muxed_gpio(struct irq_data *d) | |||
237 | 318 | ||
238 | static void pxa_mask_muxed_gpio(struct irq_data *d) | 319 | static void pxa_mask_muxed_gpio(struct irq_data *d) |
239 | { | 320 | { |
240 | int gpio = irq_to_gpio(d->irq); | 321 | int gpio = pxa_irq_to_gpio(d->irq); |
241 | struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); | 322 | struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); |
242 | uint32_t grer, gfer; | 323 | uint32_t grer, gfer; |
243 | 324 | ||
@@ -251,7 +332,7 @@ static void pxa_mask_muxed_gpio(struct irq_data *d) | |||
251 | 332 | ||
252 | static void pxa_unmask_muxed_gpio(struct irq_data *d) | 333 | static void pxa_unmask_muxed_gpio(struct irq_data *d) |
253 | { | 334 | { |
254 | int gpio = irq_to_gpio(d->irq); | 335 | int gpio = pxa_irq_to_gpio(d->irq); |
255 | struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); | 336 | struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); |
256 | 337 | ||
257 | c->irq_mask |= GPIO_bit(gpio); | 338 | c->irq_mask |= GPIO_bit(gpio); |