From 30f0b40844e5add7ad879e2f5939ff498f72f3e6 Mon Sep 17 00:00:00 2001 From: eric miao Date: Wed, 29 Aug 2007 10:18:47 +0100 Subject: [ARM] 4559/1: pxa: make PXA_LAST_GPIO a run-time variable This definition produces processor specific code in generic function pxa_gpio_mode(), thus creating inconsistencies for support of pxa25x and pxa27x in a single zImage. As David Brownell suggests, make it a run-time variable and initialize at run-time according to the number of GPIOs on the processor. For now the initialization happens in pxa_init_irq_gpio(), since there is already a parameter for that, besides, this is and MUST be earlier than any subsequent calls to pxa_gpio_mode(). Signed-off-by: eric miao Signed-off-by: Russell King --- arch/arm/mach-pxa/irq.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/mach-pxa/irq.c') diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index ae2ae08032d7..3d95442d4168 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c @@ -349,6 +349,8 @@ void __init pxa_init_irq_gpio(int gpio_nr) { int irq, i; + pxa_last_gpio = gpio_nr - 1; + /* clear all GPIO edge detects */ for (i = 0; i < gpio_nr; i += 32) { GFER(i) = 0; -- cgit v1.2.3