diff options
author | Haojian Zhuang <haojian.zhuang@linaro.org> | 2013-04-09 06:12:04 -0400 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@linaro.org> | 2013-04-10 22:00:05 -0400 |
commit | b8f649f1f531914a30ecb420e7565ee04dccc2ad (patch) | |
tree | 42b2bc905fce1c892511ff81a250d7330b33a4ed /arch/arm | |
parent | 2cab0292285ce3180224c130d2fb1104aee44ff1 (diff) |
ARM: pxa: move PXA_GPIO_TO_IRQ macro
Since PXA_GPIO_TO_IRQ() & MMP_GPIO_TO_IRQ() macro are depended on
arch code, move them from gpio driver to platform driver instead.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-mmp/aspenite.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-mmp/avengers_lite.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-mmp/brownstone.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-mmp/flint.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-mmp/gplugd.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-mmp/jasper.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-mmp/tavorevb.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-mmp/teton_bga.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-mmp/ttc_dkb.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa25x.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa27x.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa3xx.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa930.c | 12 |
13 files changed, 88 insertions, 5 deletions
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index 9f64d5632e07..fa21aac52467 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * publishhed by the Free Software Foundation. | 9 | * publishhed by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | #include <linux/gpio.h> | 11 | #include <linux/gpio.h> |
12 | #include <linux/gpio-pxa.h> | ||
12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
14 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
@@ -110,6 +111,10 @@ static unsigned long common_pin_config[] __initdata = { | |||
110 | GPIO121_KP_MKIN4, | 111 | GPIO121_KP_MKIN4, |
111 | }; | 112 | }; |
112 | 113 | ||
114 | static struct pxa_gpio_platform_data pxa168_gpio_pdata = { | ||
115 | .irq_base = MMP_GPIO_TO_IRQ(0), | ||
116 | }; | ||
117 | |||
113 | static struct smc91x_platdata smc91x_info = { | 118 | static struct smc91x_platdata smc91x_info = { |
114 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | 119 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, |
115 | }; | 120 | }; |
@@ -248,6 +253,8 @@ static void __init common_init(void) | |||
248 | pxa168_add_nand(&aspenite_nand_info); | 253 | pxa168_add_nand(&aspenite_nand_info); |
249 | pxa168_add_fb(&aspenite_lcd_info); | 254 | pxa168_add_fb(&aspenite_lcd_info); |
250 | pxa168_add_keypad(&aspenite_keypad_info); | 255 | pxa168_add_keypad(&aspenite_keypad_info); |
256 | platform_device_add_data(&pxa168_device_gpio, &pxa168_gpio_pdata, | ||
257 | sizeof(struct pxa_gpio_platform_data)); | ||
251 | platform_device_register(&pxa168_device_gpio); | 258 | platform_device_register(&pxa168_device_gpio); |
252 | 259 | ||
253 | /* off-chip devices */ | 260 | /* off-chip devices */ |
diff --git a/arch/arm/mach-mmp/avengers_lite.c b/arch/arm/mach-mmp/avengers_lite.c index 1f94957b56ae..a451a0f4d512 100644 --- a/arch/arm/mach-mmp/avengers_lite.c +++ b/arch/arm/mach-mmp/avengers_lite.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/gpio-pxa.h> | ||
15 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
16 | 17 | ||
17 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
@@ -32,12 +33,18 @@ static unsigned long avengers_lite_pin_config_V16F[] __initdata = { | |||
32 | GPIO89_UART2_RXD, | 33 | GPIO89_UART2_RXD, |
33 | }; | 34 | }; |
34 | 35 | ||
36 | static struct pxa_gpio_platform_data pxa168_gpio_pdata = { | ||
37 | .irq_base = MMP_GPIO_TO_IRQ(0), | ||
38 | }; | ||
39 | |||
35 | static void __init avengers_lite_init(void) | 40 | static void __init avengers_lite_init(void) |
36 | { | 41 | { |
37 | mfp_config(ARRAY_AND_SIZE(avengers_lite_pin_config_V16F)); | 42 | mfp_config(ARRAY_AND_SIZE(avengers_lite_pin_config_V16F)); |
38 | 43 | ||
39 | /* on-chip devices */ | 44 | /* on-chip devices */ |
40 | pxa168_add_uart(2); | 45 | pxa168_add_uart(2); |
46 | platform_device_add_data(&pxa168_device_gpio, &pxa168_gpio_pdata, | ||
47 | sizeof(struct pxa_gpio_platform_data)); | ||
41 | platform_device_register(&pxa168_device_gpio); | 48 | platform_device_register(&pxa168_device_gpio); |
42 | } | 49 | } |
43 | 50 | ||
diff --git a/arch/arm/mach-mmp/brownstone.c b/arch/arm/mach-mmp/brownstone.c index 2358011c7d8e..ac25544b8cdb 100644 --- a/arch/arm/mach-mmp/brownstone.c +++ b/arch/arm/mach-mmp/brownstone.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/gpio-pxa.h> | ||
17 | #include <linux/regulator/machine.h> | 18 | #include <linux/regulator/machine.h> |
18 | #include <linux/regulator/max8649.h> | 19 | #include <linux/regulator/max8649.h> |
19 | #include <linux/regulator/fixed.h> | 20 | #include <linux/regulator/fixed.h> |
@@ -104,6 +105,10 @@ static unsigned long brownstone_pin_config[] __initdata = { | |||
104 | GPIO89_GPIO, | 105 | GPIO89_GPIO, |
105 | }; | 106 | }; |
106 | 107 | ||
108 | static struct pxa_gpio_platform_data mmp2_gpio_pdata = { | ||
109 | .irq_base = MMP_GPIO_TO_IRQ(0), | ||
110 | }; | ||
111 | |||
107 | static struct regulator_consumer_supply max8649_supply[] = { | 112 | static struct regulator_consumer_supply max8649_supply[] = { |
108 | REGULATOR_SUPPLY("vcc_core", NULL), | 113 | REGULATOR_SUPPLY("vcc_core", NULL), |
109 | }; | 114 | }; |
@@ -202,6 +207,8 @@ static void __init brownstone_init(void) | |||
202 | /* on-chip devices */ | 207 | /* on-chip devices */ |
203 | mmp2_add_uart(1); | 208 | mmp2_add_uart(1); |
204 | mmp2_add_uart(3); | 209 | mmp2_add_uart(3); |
210 | platform_device_add_data(&mmp2_device_gpio, &mmp2_gpio_pdata, | ||
211 | sizeof(struct pxa_gpio_platform_data)); | ||
205 | platform_device_register(&mmp2_device_gpio); | 212 | platform_device_register(&mmp2_device_gpio); |
206 | mmp2_add_twsi(1, NULL, ARRAY_AND_SIZE(brownstone_twsi1_info)); | 213 | mmp2_add_twsi(1, NULL, ARRAY_AND_SIZE(brownstone_twsi1_info)); |
207 | mmp2_add_sdhost(0, &mmp2_sdh_platdata_mmc0); /* SD/MMC */ | 214 | mmp2_add_sdhost(0, &mmp2_sdh_platdata_mmc0); /* SD/MMC */ |
diff --git a/arch/arm/mach-mmp/flint.c b/arch/arm/mach-mmp/flint.c index 754c352dd02b..6291c33d83e2 100644 --- a/arch/arm/mach-mmp/flint.c +++ b/arch/arm/mach-mmp/flint.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/smc91x.h> | 16 | #include <linux/smc91x.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/gpio-pxa.h> | ||
19 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
20 | 21 | ||
21 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
@@ -77,6 +78,10 @@ static unsigned long flint_pin_config[] __initdata = { | |||
77 | GPIO160_ND_RDY1, | 78 | GPIO160_ND_RDY1, |
78 | }; | 79 | }; |
79 | 80 | ||
81 | static struct pxa_gpio_platform_data mmp2_gpio_pdata = { | ||
82 | .irq_base = MMP_GPIO_TO_IRQ(0), | ||
83 | }; | ||
84 | |||
80 | static struct smc91x_platdata flint_smc91x_info = { | 85 | static struct smc91x_platdata flint_smc91x_info = { |
81 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | 86 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, |
82 | }; | 87 | }; |
@@ -111,6 +116,8 @@ static void __init flint_init(void) | |||
111 | /* on-chip devices */ | 116 | /* on-chip devices */ |
112 | mmp2_add_uart(1); | 117 | mmp2_add_uart(1); |
113 | mmp2_add_uart(2); | 118 | mmp2_add_uart(2); |
119 | platform_device_add_data(&mmp2_device_gpio, &mmp2_gpio_pdata, | ||
120 | sizeof(struct pxa_gpio_platform_data)); | ||
114 | platform_device_register(&mmp2_device_gpio); | 121 | platform_device_register(&mmp2_device_gpio); |
115 | 122 | ||
116 | /* off-chip devices */ | 123 | /* off-chip devices */ |
diff --git a/arch/arm/mach-mmp/gplugd.c b/arch/arm/mach-mmp/gplugd.c index f62b68d926f4..d81b2475e67e 100644 --- a/arch/arm/mach-mmp/gplugd.c +++ b/arch/arm/mach-mmp/gplugd.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/gpio.h> | 13 | #include <linux/gpio.h> |
14 | #include <linux/gpio-pxa.h> | ||
14 | 15 | ||
15 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
16 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
@@ -128,6 +129,10 @@ static unsigned long gplugd_pin_config[] __initdata = { | |||
128 | GPIO116_I2S_TXD | 129 | GPIO116_I2S_TXD |
129 | }; | 130 | }; |
130 | 131 | ||
132 | static struct pxa_gpio_platform_data pxa168_gpio_pdata = { | ||
133 | .irq_base = MMP_GPIO_TO_IRQ(0), | ||
134 | }; | ||
135 | |||
131 | static struct i2c_board_info gplugd_i2c_board_info[] = { | 136 | static struct i2c_board_info gplugd_i2c_board_info[] = { |
132 | { | 137 | { |
133 | .type = "isl1208", | 138 | .type = "isl1208", |
@@ -186,6 +191,8 @@ static void __init gplugd_init(void) | |||
186 | pxa168_add_uart(3); | 191 | pxa168_add_uart(3); |
187 | pxa168_add_ssp(1); | 192 | pxa168_add_ssp(1); |
188 | pxa168_add_twsi(0, NULL, ARRAY_AND_SIZE(gplugd_i2c_board_info)); | 193 | pxa168_add_twsi(0, NULL, ARRAY_AND_SIZE(gplugd_i2c_board_info)); |
194 | platform_device_add_data(&pxa168_device_gpio, &pxa168_gpio_pdata, | ||
195 | sizeof(struct pxa_gpio_platform_data)); | ||
189 | platform_device_register(&pxa168_device_gpio); | 196 | platform_device_register(&pxa168_device_gpio); |
190 | 197 | ||
191 | pxa168_add_eth(&gplugd_eth_platform_data); | 198 | pxa168_add_eth(&gplugd_eth_platform_data); |
diff --git a/arch/arm/mach-mmp/jasper.c b/arch/arm/mach-mmp/jasper.c index 66634fd0ecb0..0e9e5c05b37c 100644 --- a/arch/arm/mach-mmp/jasper.c +++ b/arch/arm/mach-mmp/jasper.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/gpio-pxa.h> | ||
15 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
16 | #include <linux/io.h> | 17 | #include <linux/io.h> |
17 | #include <linux/regulator/machine.h> | 18 | #include <linux/regulator/machine.h> |
@@ -99,6 +100,10 @@ static unsigned long jasper_pin_config[] __initdata = { | |||
99 | GPIO151_MMC3_CLK, | 100 | GPIO151_MMC3_CLK, |
100 | }; | 101 | }; |
101 | 102 | ||
103 | static struct pxa_gpio_platform_data mmp2_gpio_pdata = { | ||
104 | .irq_base = MMP_GPIO_TO_IRQ(0), | ||
105 | }; | ||
106 | |||
102 | static struct regulator_consumer_supply max8649_supply[] = { | 107 | static struct regulator_consumer_supply max8649_supply[] = { |
103 | REGULATOR_SUPPLY("vcc_core", NULL), | 108 | REGULATOR_SUPPLY("vcc_core", NULL), |
104 | }; | 109 | }; |
@@ -165,6 +170,9 @@ static void __init jasper_init(void) | |||
165 | mmp2_add_uart(1); | 170 | mmp2_add_uart(1); |
166 | mmp2_add_uart(3); | 171 | mmp2_add_uart(3); |
167 | mmp2_add_twsi(1, NULL, ARRAY_AND_SIZE(jasper_twsi1_info)); | 172 | mmp2_add_twsi(1, NULL, ARRAY_AND_SIZE(jasper_twsi1_info)); |
173 | platform_device_add_data(&mmp2_device_gpio, &mmp2_gpio_pdata, | ||
174 | sizeof(struct pxa_gpio_platform_data)); | ||
175 | platform_device_register(&mmp2_device_gpio); | ||
168 | mmp2_add_sdhost(0, &mmp2_sdh_platdata_mmc0); /* SD/MMC */ | 176 | mmp2_add_sdhost(0, &mmp2_sdh_platdata_mmc0); /* SD/MMC */ |
169 | 177 | ||
170 | regulator_has_full_constraints(); | 178 | regulator_has_full_constraints(); |
diff --git a/arch/arm/mach-mmp/tavorevb.c b/arch/arm/mach-mmp/tavorevb.c index 4c127d23955d..cdfc9bfee1a4 100644 --- a/arch/arm/mach-mmp/tavorevb.c +++ b/arch/arm/mach-mmp/tavorevb.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * publishhed by the Free Software Foundation. | 8 | * publishhed by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/gpio.h> | 10 | #include <linux/gpio.h> |
11 | #include <linux/gpio-pxa.h> | ||
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
13 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
@@ -60,6 +61,10 @@ static unsigned long tavorevb_pin_config[] __initdata = { | |||
60 | DF_RDY0_DF_RDY0, | 61 | DF_RDY0_DF_RDY0, |
61 | }; | 62 | }; |
62 | 63 | ||
64 | static struct pxa_gpio_platform_data pxa910_gpio_pdata = { | ||
65 | .irq_base = MMP_GPIO_TO_IRQ(0), | ||
66 | }; | ||
67 | |||
63 | static struct smc91x_platdata tavorevb_smc91x_info = { | 68 | static struct smc91x_platdata tavorevb_smc91x_info = { |
64 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | 69 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, |
65 | }; | 70 | }; |
@@ -93,6 +98,8 @@ static void __init tavorevb_init(void) | |||
93 | 98 | ||
94 | /* on-chip devices */ | 99 | /* on-chip devices */ |
95 | pxa910_add_uart(1); | 100 | pxa910_add_uart(1); |
101 | platform_device_add_data(&pxa910_device_gpio, &pxa910_gpio_pdata, | ||
102 | sizeof(struct pxa_gpio_platform_data)); | ||
96 | platform_device_register(&pxa910_device_gpio); | 103 | platform_device_register(&pxa910_device_gpio); |
97 | 104 | ||
98 | /* off-chip devices */ | 105 | /* off-chip devices */ |
diff --git a/arch/arm/mach-mmp/teton_bga.c b/arch/arm/mach-mmp/teton_bga.c index 8609967975ed..e4d95b4c6bb2 100644 --- a/arch/arm/mach-mmp/teton_bga.c +++ b/arch/arm/mach-mmp/teton_bga.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/gpio-pxa.h> | ||
19 | #include <linux/input.h> | 20 | #include <linux/input.h> |
20 | #include <linux/platform_data/keypad-pxa27x.h> | 21 | #include <linux/platform_data/keypad-pxa27x.h> |
21 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
@@ -49,6 +50,10 @@ static unsigned long teton_bga_pin_config[] __initdata = { | |||
49 | GPIO78_GPIO, | 50 | GPIO78_GPIO, |
50 | }; | 51 | }; |
51 | 52 | ||
53 | static struct pxa_gpio_platform_data pxa168_gpio_pdata = { | ||
54 | .irq_base = MMP_GPIO_TO_IRQ(0), | ||
55 | }; | ||
56 | |||
52 | static unsigned int teton_bga_matrix_key_map[] = { | 57 | static unsigned int teton_bga_matrix_key_map[] = { |
53 | KEY(0, 6, KEY_ESC), | 58 | KEY(0, 6, KEY_ESC), |
54 | KEY(0, 7, KEY_ENTER), | 59 | KEY(0, 7, KEY_ENTER), |
@@ -79,6 +84,8 @@ static void __init teton_bga_init(void) | |||
79 | pxa168_add_uart(1); | 84 | pxa168_add_uart(1); |
80 | pxa168_add_keypad(&teton_bga_keypad_info); | 85 | pxa168_add_keypad(&teton_bga_keypad_info); |
81 | pxa168_add_twsi(0, NULL, ARRAY_AND_SIZE(teton_bga_i2c_info)); | 86 | pxa168_add_twsi(0, NULL, ARRAY_AND_SIZE(teton_bga_i2c_info)); |
87 | platform_device_add_data(&pxa168_device_gpio, &pxa168_gpio_pdata, | ||
88 | sizeof(struct pxa_gpio_platform_data)); | ||
82 | platform_device_register(&pxa168_device_gpio); | 89 | platform_device_register(&pxa168_device_gpio); |
83 | } | 90 | } |
84 | 91 | ||
diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c index 22a9058f9f4d..6aa788872921 100644 --- a/arch/arm/mach-mmp/ttc_dkb.c +++ b/arch/arm/mach-mmp/ttc_dkb.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/i2c/pca953x.h> | 18 | #include <linux/i2c/pca953x.h> |
19 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
20 | #include <linux/gpio-pxa.h> | ||
20 | #include <linux/mfd/88pm860x.h> | 21 | #include <linux/mfd/88pm860x.h> |
21 | #include <linux/platform_data/mv_usb.h> | 22 | #include <linux/platform_data/mv_usb.h> |
22 | #include <linux/spi/spi.h> | 23 | #include <linux/spi/spi.h> |
@@ -75,6 +76,10 @@ static unsigned long ttc_dkb_pin_config[] __initdata = { | |||
75 | DF_RDY0_DF_RDY0, | 76 | DF_RDY0_DF_RDY0, |
76 | }; | 77 | }; |
77 | 78 | ||
79 | static struct pxa_gpio_platform_data pxa910_gpio_pdata = { | ||
80 | .irq_base = MMP_GPIO_TO_IRQ(0), | ||
81 | }; | ||
82 | |||
78 | static struct mtd_partition ttc_dkb_onenand_partitions[] = { | 83 | static struct mtd_partition ttc_dkb_onenand_partitions[] = { |
79 | { | 84 | { |
80 | .name = "bootloader", | 85 | .name = "bootloader", |
@@ -284,6 +289,8 @@ static void __init ttc_dkb_init(void) | |||
284 | 289 | ||
285 | /* off-chip devices */ | 290 | /* off-chip devices */ |
286 | pxa910_add_twsi(0, NULL, ARRAY_AND_SIZE(ttc_dkb_i2c_info)); | 291 | pxa910_add_twsi(0, NULL, ARRAY_AND_SIZE(ttc_dkb_i2c_info)); |
292 | platform_device_add_data(&pxa910_device_gpio, &pxa910_gpio_pdata, | ||
293 | sizeof(struct pxa_gpio_platform_data)); | ||
287 | platform_add_devices(ARRAY_AND_SIZE(ttc_dkb_devices)); | 294 | platform_add_devices(ARRAY_AND_SIZE(ttc_dkb_devices)); |
288 | 295 | ||
289 | #ifdef CONFIG_USB_MV_UDC | 296 | #ifdef CONFIG_USB_MV_UDC |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index e31a8812cf0d..f2c28972084d 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -344,7 +344,8 @@ void __init pxa25x_map_io(void) | |||
344 | } | 344 | } |
345 | 345 | ||
346 | static struct pxa_gpio_platform_data pxa25x_gpio_info __initdata = { | 346 | static struct pxa_gpio_platform_data pxa25x_gpio_info __initdata = { |
347 | .gpio_set_wake = gpio_set_wake, | 347 | .irq_base = PXA_GPIO_TO_IRQ(0), |
348 | .gpio_set_wake = gpio_set_wake, | ||
348 | }; | 349 | }; |
349 | 350 | ||
350 | static struct platform_device *pxa25x_devices[] __initdata = { | 351 | static struct platform_device *pxa25x_devices[] __initdata = { |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 7635ec5c9a1d..301471a07a10 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -431,7 +431,8 @@ void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info) | |||
431 | } | 431 | } |
432 | 432 | ||
433 | static struct pxa_gpio_platform_data pxa27x_gpio_info __initdata = { | 433 | static struct pxa_gpio_platform_data pxa27x_gpio_info __initdata = { |
434 | .gpio_set_wake = gpio_set_wake, | 434 | .irq_base = PXA_GPIO_TO_IRQ(0), |
435 | .gpio_set_wake = gpio_set_wake, | ||
435 | }; | 436 | }; |
436 | 437 | ||
437 | static struct platform_device *devices[] __initdata = { | 438 | static struct platform_device *devices[] __initdata = { |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 572666a1e4a8..87011f3de69d 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/gpio-pxa.h> | ||
18 | #include <linux/pm.h> | 19 | #include <linux/pm.h> |
19 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
20 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
@@ -436,6 +437,10 @@ void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info) | |||
436 | pxa_register_device(&pxa3xx_device_i2c_power, info); | 437 | pxa_register_device(&pxa3xx_device_i2c_power, info); |
437 | } | 438 | } |
438 | 439 | ||
440 | static struct pxa_gpio_platform_data pxa3xx_gpio_pdata = { | ||
441 | .irq_base = PXA_GPIO_TO_IRQ(0), | ||
442 | }; | ||
443 | |||
439 | static struct platform_device *devices[] __initdata = { | 444 | static struct platform_device *devices[] __initdata = { |
440 | &pxa27x_device_udc, | 445 | &pxa27x_device_udc, |
441 | &pxa_device_pmu, | 446 | &pxa_device_pmu, |
@@ -488,8 +493,12 @@ static int __init pxa3xx_init(void) | |||
488 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | 493 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |
489 | if (ret) | 494 | if (ret) |
490 | return ret; | 495 | return ret; |
491 | if (cpu_is_pxa300() || cpu_is_pxa310() || cpu_is_pxa320()) | 496 | if (cpu_is_pxa300() || cpu_is_pxa310() || cpu_is_pxa320()) { |
497 | platform_device_add_data(&pxa3xx_device_gpio, | ||
498 | &pxa3xx_gpio_pdata, | ||
499 | sizeof(pxa3xx_gpio_pdata)); | ||
492 | ret = platform_device_register(&pxa3xx_device_gpio); | 500 | ret = platform_device_register(&pxa3xx_device_gpio); |
501 | } | ||
493 | } | 502 | } |
494 | 503 | ||
495 | return ret; | 504 | return ret; |
diff --git a/arch/arm/mach-pxa/pxa930.c b/arch/arm/mach-pxa/pxa930.c index 4693a78948aa..ab624487cf39 100644 --- a/arch/arm/mach-pxa/pxa930.c +++ b/arch/arm/mach-pxa/pxa930.c | |||
@@ -12,9 +12,10 @@ | |||
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/irq.h> | ||
17 | #include <linux/dma-mapping.h> | 15 | #include <linux/dma-mapping.h> |
16 | #include <linux/irq.h> | ||
17 | #include <linux/gpio-pxa.h> | ||
18 | #include <linux/platform_device.h> | ||
18 | 19 | ||
19 | #include <mach/pxa930.h> | 20 | #include <mach/pxa930.h> |
20 | 21 | ||
@@ -192,6 +193,10 @@ static struct mfp_addr_map pxa935_mfp_addr_map[] __initdata = { | |||
192 | MFP_ADDR_END, | 193 | MFP_ADDR_END, |
193 | }; | 194 | }; |
194 | 195 | ||
196 | static struct pxa_gpio_platform_data pxa93x_gpio_pdata = { | ||
197 | .irq_base = PXA_GPIO_TO_IRQ(0), | ||
198 | }; | ||
199 | |||
195 | static int __init pxa930_init(void) | 200 | static int __init pxa930_init(void) |
196 | { | 201 | { |
197 | int ret = 0; | 202 | int ret = 0; |
@@ -199,6 +204,9 @@ static int __init pxa930_init(void) | |||
199 | if (cpu_is_pxa93x()) { | 204 | if (cpu_is_pxa93x()) { |
200 | mfp_init_base(io_p2v(MFPR_BASE)); | 205 | mfp_init_base(io_p2v(MFPR_BASE)); |
201 | mfp_init_addr(pxa930_mfp_addr_map); | 206 | mfp_init_addr(pxa930_mfp_addr_map); |
207 | platform_device_add_data(&pxa93x_device_gpio, | ||
208 | &pxa93x_gpio_pdata, | ||
209 | sizeof(pxa93x_gpio_pdata)); | ||
202 | ret = platform_device_register(&pxa93x_device_gpio); | 210 | ret = platform_device_register(&pxa93x_device_gpio); |
203 | } | 211 | } |
204 | 212 | ||