diff options
author | David Brownell <david-b@pacbell.net> | 2008-01-04 12:30:24 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-02-04 08:16:39 -0500 |
commit | e83aff58bf1b7e6b355a0cfa206e9d3aebe5623f (patch) | |
tree | 0c5e5d990291cdef1e173a1bed74bb8915c67168 /arch/arm/mach-at91/generic.h | |
parent | ae9458d6a0956aa21cb49e1251e35a8d4dacbe6e (diff) |
[ARM] 4739/1: at91sam9263: make gpio bank C and D irqs work
On the at91sam9263, IRQs for GPIO banks C and D don't currently work.
This is because banks C, D, and E share one clock and toplevel IRQ, but
the AT91 code setting up and handling GPIO IRQs expects no sharing.
This patch:
- Fixes GPIO IRQ setup and handling to cope with GPIO banks that are
shared like on sam9263 chips, by setting up a list of those banks
and making the IRQ dispatching logic scan that list.
- Precomputes the address of each bank's registers, saving it with
other per-bank data so that it no longer needs to be constantly
recomputed during IRQs and other GPIO operations. That shrinks
hot-path code, while helping the GPIO bank irq updates.
- Fixes a minor bug where IRQ_TYPE_NONE was wrongly rejected (it just
means "use the default", which is "both edges" here).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-at91/generic.h')
-rw-r--r-- | arch/arm/mach-at91/generic.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index b5daf7f5e011..7b9ce7a336b0 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
@@ -47,6 +47,9 @@ extern void at91_irq_resume(void); | |||
47 | #define AT91RM9200_BGA 4 /* AT91RM9200 BGA package has 4 banks */ | 47 | #define AT91RM9200_BGA 4 /* AT91RM9200 BGA package has 4 banks */ |
48 | 48 | ||
49 | struct at91_gpio_bank { | 49 | struct at91_gpio_bank { |
50 | unsigned chipbase; /* bank's first GPIO number */ | ||
51 | void __iomem *regbase; /* base of register bank */ | ||
52 | struct at91_gpio_bank *next; /* bank sharing same IRQ/clock/... */ | ||
50 | unsigned short id; /* peripheral ID */ | 53 | unsigned short id; /* peripheral ID */ |
51 | unsigned long offset; /* offset from system peripheral base */ | 54 | unsigned long offset; /* offset from system peripheral base */ |
52 | struct clk *clock; /* associated clock */ | 55 | struct clk *clock; /* associated clock */ |