aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pxa25x.c
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2008-11-26 05:12:04 -0500
committerEric Miao <eric.miao@marvell.com>2008-12-02 01:42:37 -0500
commit067455aa53a55404ded85227e87436478c2acc63 (patch)
tree44e1deef3e364e45199cdd7abade384bde6e6164 /arch/arm/mach-pxa/pxa25x.c
parente88db8b91f1f5de24ae6bb3241d92fecaae64abf (diff)
[ARM] pxa: add support for additional GPIOs on PXA26x
Original patch from Marek Vasut, the problems with PXA26x are: 1. there are additional 4 GPIOs 86,87,88,89 have their direction bits inverted in GPDR2, as well as their alternate function bits being '1' for their GPIO functionality in GAFRx 2. there is no easy way to decide if the processor is a pxa26x or a pxa250/pxa255 at run-time, so the assumption here is the pxa26x will be treated as one of the pxa25x variants, and board code should have a better knowledge of the processor it is featured Introduce pxa26x_init_irq() for the second purpose, and treat the additional GPIOs > 85 on PXA25x specially. Kconfig option CONFIG_CPU_PXA26x is introduced to optimize the code a bit when PXA26x support isn't needed. Board config options have to select this to enable the support for PXA26x. __gpio_is_inverted() will be optimized way when CONFIG_CPU_PXA26x isn't selected. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch/arm/mach-pxa/pxa25x.c')
-rw-r--r--arch/arm/mach-pxa/pxa25x.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index 6543321a2df4..0f672998b2eb 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -298,6 +298,14 @@ void __init pxa25x_init_irq(void)
298 pxa_init_gpio(85, pxa25x_set_wake); 298 pxa_init_gpio(85, pxa25x_set_wake);
299} 299}
300 300
301#ifdef CONFIG_CPU_PXA26x
302void __init pxa26x_init_irq(void)
303{
304 pxa_init_irq(32, pxa25x_set_wake);
305 pxa_init_gpio(90, pxa25x_set_wake);
306}
307#endif
308
301static struct platform_device *pxa25x_devices[] __initdata = { 309static struct platform_device *pxa25x_devices[] __initdata = {
302 &pxa25x_device_udc, 310 &pxa25x_device_udc,
303 &pxa_device_ffuart, 311 &pxa_device_ffuart,