diff options
author | Mark A. Greer <mgreer@mvista.com> | 2009-04-15 15:40:35 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-05-28 18:16:30 -0400 |
commit | a994955cc091a8a51b7d7412174d9cf6de04d26b (patch) | |
tree | 14c62610ee3ec0aa59fa5df49d4bf5ac88c8eb4c /arch/arm/mach-davinci/dm644x.c | |
parent | 951d6f6d703110790256abfce03ced117d2dcc6b (diff) |
davinci: Make GPIO code more generic
The current gpio code needs to know the number of
gpio irqs there are and what the bank irq number is.
To determine those values, it checks the SoC type.
It also assumes that the base address and the number
of irqs the interrupt controller uses is fixed.
To clean up the SoC checks and make it support
different base addresses and interrupt controllers,
have the SoC-specific code set those values in
the soc_info structure and have the gpio code
reference them there.
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/dm644x.c')
-rw-r--r-- | arch/arm/mach-davinci/dm644x.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index c66269264cca..cfd918e41e2d 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/clk.h> | 13 | #include <linux/clk.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/gpio.h> | ||
15 | 16 | ||
16 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
17 | 18 | ||
@@ -590,6 +591,9 @@ static struct davinci_soc_info davinci_soc_info_dm644x = { | |||
590 | .intc_irq_num = DAVINCI_N_AINTC_IRQ, | 591 | .intc_irq_num = DAVINCI_N_AINTC_IRQ, |
591 | .timer_info = &dm644x_timer_info, | 592 | .timer_info = &dm644x_timer_info, |
592 | .wdt_base = IO_ADDRESS(DAVINCI_WDOG_BASE), | 593 | .wdt_base = IO_ADDRESS(DAVINCI_WDOG_BASE), |
594 | .gpio_base = IO_ADDRESS(DAVINCI_GPIO_BASE), | ||
595 | .gpio_num = 71, | ||
596 | .gpio_irq = IRQ_GPIOBNK0, | ||
593 | }; | 597 | }; |
594 | 598 | ||
595 | void __init dm644x_init(void) | 599 | void __init dm644x_init(void) |