diff options
author | Hartley Sweeten <hartleys@visionengravers.com> | 2011-01-24 19:05:35 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-25 16:18:04 -0500 |
commit | fd015480c29deb52ae3bfaf41e888c450765edd8 (patch) | |
tree | d7c72f6c719c593881c78c73d8a4f46d03fcd870 /arch/arm | |
parent | 05b112ff98070dc1f3293e8cd8e4c6f468d1084a (diff) |
ARM: 6636/1: ep93xx: default multiplexed gpio ports to gpio mode
The EP93xx C and D GPIO ports are multiplexed with the Keypad Interface
peripheral. At power-up they default into non-GPIO mode with the Key
Matrix controller enabled so these ports are unusable for GPIO. Note
that the Keypad Interface peripheral is only available in the EP9307,
EP9312, and EP9315 processor variants.
The keypad support will clear the DeviceConfig bits appropriately to
enable the Keypad Interface when the driver is loaded. And, when the
driver is unloaded it will set the bits to return the ports to GPIO mode.
To make these ports available for GPIO after power-up on all EP93xx
processor variants, set the KEYS and GONK bits in the DeviceConfig
register.
Similarly, the E, G, and H ports are multiplexed with the IDE Interface
peripheral. At power-up these also default into non-GPIO mode. Note
that the IDE peripheral is only available in the EP9312 and EP9315
processor variants.
Since an IDE driver is not even available in mainline, set the EONIDE,
GONIDE, and HONIDE bits in the DeviceConfig register so that these
ports will be available for GPIO use after power-up.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-ep93xx/gpio.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c index f3dc76fdcea8..bec34b834958 100644 --- a/arch/arm/mach-ep93xx/gpio.c +++ b/arch/arm/mach-ep93xx/gpio.c | |||
@@ -427,6 +427,13 @@ void __init ep93xx_gpio_init(void) | |||
427 | { | 427 | { |
428 | int i; | 428 | int i; |
429 | 429 | ||
430 | /* Set Ports C, D, E, G, and H for GPIO use */ | ||
431 | ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_KEYS | | ||
432 | EP93XX_SYSCON_DEVCFG_GONK | | ||
433 | EP93XX_SYSCON_DEVCFG_EONIDE | | ||
434 | EP93XX_SYSCON_DEVCFG_GONIDE | | ||
435 | EP93XX_SYSCON_DEVCFG_HONIDE); | ||
436 | |||
430 | for (i = 0; i < ARRAY_SIZE(ep93xx_gpio_banks); i++) | 437 | for (i = 0; i < ARRAY_SIZE(ep93xx_gpio_banks); i++) |
431 | gpiochip_add(&ep93xx_gpio_banks[i].chip); | 438 | gpiochip_add(&ep93xx_gpio_banks[i].chip); |
432 | } | 439 | } |