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>
This commit is contained in:
committed by
Kevin Hilman
parent
951d6f6d70
commit
a994955cc0
@@ -58,6 +58,9 @@ struct davinci_soc_info {
|
||||
unsigned long intc_irq_num;
|
||||
struct davinci_timer_info *timer_info;
|
||||
void __iomem *wdt_base;
|
||||
void __iomem *gpio_base;
|
||||
unsigned gpio_num;
|
||||
unsigned gpio_irq;
|
||||
};
|
||||
|
||||
extern struct davinci_soc_info davinci_soc_info;
|
||||
|
Reference in New Issue
Block a user