1
linux/arch/arm/mach-pxa
Eric Miao 0807da5938 [ARM] pxa: access GPIO registers by chip so to make it further generic
Let's handle GPIOs by banks, each bank covers up to 32 GPIOs with one set
of registers, and each set of registers start from different offsets.

           GPLR    GPDR    GPSR    GPCR    GRER    GFER    GEDR
 BANK 0 - 0x0000  0x000C  0x0018  0x0024  0x0030  0x003C  0x0048
 BANK 1 - 0x0004  0x0010  0x001C  0x0028  0x0034  0x0040  0x004C
 BANK 2 - 0x0008  0x0014  0x0020  0x002C  0x0038  0x0044  0x0050

 BANK 3 - 0x0100  0x010C  0x0118  0x0124  0x0130  0x013C  0x0148
 BANK 4 - 0x0104  0x0110  0x011C  0x0128  0x0134  0x0140  0x014C
 BANK 5 - 0x0108  0x0114  0x0120  0x012C  0x0138  0x0144  0x0150

 NOTE:
   BANK 3 is only available on PXA27x and later processors.
   BANK 4 and 5 are only available on PXA935

1. introduce GPIO_BANK(n) for the offset base of each bank

2. 'struct pxa_gpio_chip' is expanded to include IRQ edge and mask
   setings, and saved register values as well, and is dynamically
   allocated due to possible bank number ranging from 3 to 6

3. all accesses to GPIO registers are made through 'regbase' within
   'pxa_gpio_chip', and register offset

4. introduce several inline functions to simplify the code a bit

5. change IRQ demux handler to base on gpio chips

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-09 21:22:38 +08:00
..
include/mach [ARM] pxa: access GPIO registers by chip so to make it further generic 2009-03-09 21:22:38 +08:00
am200epd.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
am300epd.c [ARM] 5354/1: mach-pxa: add AM300 platform driver v3 2009-02-10 11:28:00 +00:00
clock.c Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel 2008-12-02 22:07:40 +00:00
clock.h [ARM] pxa: convert to clkdev and match clocks by struct device where possible 2008-11-27 12:38:23 +00:00
cm-x2xx-pci.c [ARM] 5282/1: pxa: add CM-X255 support 2008-10-07 12:05:07 +01:00
cm-x2xx-pci.h [ARM] 5280/1: pxa: prepare cm-x2xx.c and cm-x2xx-pci.[ch] for addition of CM-X255 2008-10-07 12:05:05 +01:00
cm-x2xx.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
cm-x255.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
cm-x270.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
cm-x300.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
colibri.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
corgi_lcd.c [ARM] pxa: fix the corgi_ssp.c dependency issue in {corgi,spitz}_defconfig 2008-10-21 11:36:19 +08:00
corgi_pm.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
corgi_ssp.c Revert "[ARM] pxa/corgi: remove now unused corgi_ssp.c and corgi_lcd.c" 2008-10-21 09:42:29 +08:00
corgi.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
cpufreq-pxa2xx.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
cpufreq-pxa3xx.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
devices.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
devices.h [ARM] pxa: add resources for incoming rtc-pxa driver 2008-12-02 14:43:47 +08:00
dma.c [ARM] pxa: move DMA registers definitions into <mach/dma.h> 2009-03-09 21:22:36 +08:00
e330.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
e350.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
e400.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
e740.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
e750.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
e800.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
em-x270.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
eseries.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
eseries.h [ARM] pxa: Add multi-io support for e-series 2008-12-15 03:29:34 +00:00
ezx.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
generic.c [ARM] pxa: move GPIO register definitions into <mach/gpio.h> 2009-03-09 21:22:37 +08:00
generic.h [ARM] pxa: move declaration of 'pxa_last_gpio' into <mach/gpio.h> 2009-03-09 21:22:37 +08:00
gpio.c [ARM] pxa: access GPIO registers by chip so to make it further generic 2009-03-09 21:22:38 +08:00
gumstix.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
h5000.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
himalaya.c [ARM] 5355/1: Adding support for the HTC Himalaya and its framebuffer 2009-02-10 11:29:41 +00:00
idp.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
imote2.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
irq.c [ARM] pxa: move IRQ handling of GPIO 0 and 1 outside of gpio.c 2009-03-09 21:22:37 +08:00
Kconfig [ARM] pxa/magician: select PXA_SSP for touchscreen and sound 2009-03-09 21:22:33 +08:00
leds-idp.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
leds-lubbock.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
leds-mainstone.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
leds.c [ARM] 5251/1: remove old LED support for Trizeps4 SOM 2008-10-01 22:34:34 +01:00
leds.h fix file specification in comments 2006-10-03 23:01:26 +02:00
littleton.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
lpd270.c [ARM] pxa: move GPIO register definitions into <mach/gpio.h> 2009-03-09 21:22:37 +08:00
lubbock.c [ARM] pxa: move GPIO register definitions into <mach/gpio.h> 2009-03-09 21:22:37 +08:00
magician.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
mainstone.c [ARM] pxa: move GPIO register definitions into <mach/gpio.h> 2009-03-09 21:22:37 +08:00
Makefile [ARM] 5355/1: Adding support for the HTC Himalaya and its framebuffer 2009-02-10 11:29:41 +00:00
Makefile.boot
mfp-pxa2xx.c [ARM] pxa: access GPIO registers by chip so to make it further generic 2009-03-09 21:22:38 +08:00
mfp-pxa3xx.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
mioa701_bootresume.S [ARM] pxa/MioA701: fix memory corruption. 2008-11-22 20:57:21 +08:00
mioa701.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
mp900.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
palmld.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
palmt5.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
palmtx.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
palmz72.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
pcm027.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
pcm990-baseboard.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
pm.c [ARM] pxa: Allow platforms to override PSPR setting 2008-09-09 16:32:52 +01:00
poodle.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
pwm.c [ARM] pxa: don't pass a consumer clock name for devices with unique clocks 2008-11-27 12:38:23 +00:00
pxa2xx.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
pxa3xx.c [ARM] pxa: move IRQ handling of GPIO 0 and 1 outside of gpio.c 2009-03-09 21:22:37 +08:00
pxa25x.c [ARM] pxa: move IRQ handling of GPIO 0 and 1 outside of gpio.c 2009-03-09 21:22:37 +08:00
pxa27x.c [ARM] pxa: move IRQ handling of GPIO 0 and 1 outside of gpio.c 2009-03-09 21:22:37 +08:00
pxa300.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
pxa320.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
pxa930.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
reset.c [ARM] 5330/1: mach-pxa: Fixup reset for systems using reboot=cold or other strings 2008-11-17 14:05:41 +00:00
saar.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
sharpsl_pm.c [ARM] pxa: fix the corgi_ssp.c dependency issue in {corgi,spitz}_defconfig 2008-10-21 11:36:19 +08:00
sharpsl.h [ARM] 4737/1: Refactor corgi_lcd to improve readability + bugfix 2008-01-28 13:13:25 +00:00
sleep.S [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
smemc.c [ARM] pxa: avoid polluting the kernel's namespace 2008-11-28 16:04:54 +00:00
spitz_pm.c [ARM] corgi_lcd: fix simultaneous compilation with corgi_bl 2008-10-29 11:45:37 +08:00
spitz.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
ssp.c [ARM] pxa: don't pass a consumer clock name for devices with unique clocks 2008-11-27 12:38:23 +00:00
standby.S [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
tavorevb.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
time.c Merge branch 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-01-02 11:44:09 -08:00
tosa-bt.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
tosa.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
trizeps4.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
viper.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
zylonite_pxa300.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
zylonite_pxa320.c [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage 2009-03-09 21:22:36 +08:00
zylonite.c [ARM] pxa: use <linux/gpio.h> instead of unnecessary <mach/gpio.h> 2008-12-02 14:42:37 +08:00