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/mach-pxa | |
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/mach-pxa')
-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 |
4 files changed, 24 insertions, 5 deletions
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 | ||