diff options
author | Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> | 2010-04-28 03:05:47 +0200 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-05-05 20:11:10 +0200 |
commit | 4cb2dc67d160642410eb3cbdbfd7e7fb5f3db21a (patch) | |
tree | 5f8f0937cb5d8cafdb2996e65e2fb8b59b846a6e /arch/arm/mach-omap1 | |
parent | OMAP1: Amstrad Delta: add a handler for processing interruptsgenerated by the... (diff) | |
download | linux-4cb2dc67d160642410eb3cbdbfd7e7fb5f3db21a.tar.xz linux-4cb2dc67d160642410eb3cbdbfd7e7fb5f3db21a.zip |
OMAP1: Amstrad Delta: update board initialization code forcomplete modem IRQ GPIO line setup
In case of Amstrad Delta modem utilized GPIO line, interrupt is requested from
standard serial8250 driver code without first requesting the GPIO pin itself.
Even if it works with default OMAP GPIO interrupt handler, it appeared not
compatible with recent, optimized version of the board GPIO FIQ handler,
required for fast processing of interrupts generated by other GPIO pin that a
serial keyboard clock hangs off.
This patch fills the board specific modem initialization routine with common
GPIO line reservation and direction setup.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r-- | arch/arm/mach-omap1/board-ams-delta.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 7fc11c34b696..9217bbdc35ab 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -263,8 +263,18 @@ static struct platform_device ams_delta_modem_device = { static int __init ams_delta_modem_init(void) { + int err; + omap_cfg_reg(M14_1510_GPIO2); - ams_delta_modem_ports[0].irq = gpio_to_irq(2); + ams_delta_modem_ports[0].irq = + gpio_to_irq(AMS_DELTA_GPIO_PIN_MODEM_IRQ); + + err = gpio_request(AMS_DELTA_GPIO_PIN_MODEM_IRQ, "modem"); + if (err) { + pr_err("Couldn't request gpio pin for modem\n"); + return err; + } + gpio_direction_input(AMS_DELTA_GPIO_PIN_MODEM_IRQ); ams_delta_latch2_write( AMS_DELTA_LATCH2_MODEM_NRESET | AMS_DELTA_LATCH2_MODEM_CODEC, |