Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Janusz Krzysztofik and committed by
Tony Lindgren
4cb2dc67 11f9562a

+11 -1
+11 -1
arch/arm/mach-omap1/board-ams-delta.c
··· 263 263 264 264 static int __init ams_delta_modem_init(void) 265 265 { 266 + int err; 267 + 266 268 omap_cfg_reg(M14_1510_GPIO2); 267 - ams_delta_modem_ports[0].irq = gpio_to_irq(2); 269 + ams_delta_modem_ports[0].irq = 270 + gpio_to_irq(AMS_DELTA_GPIO_PIN_MODEM_IRQ); 271 + 272 + err = gpio_request(AMS_DELTA_GPIO_PIN_MODEM_IRQ, "modem"); 273 + if (err) { 274 + pr_err("Couldn't request gpio pin for modem\n"); 275 + return err; 276 + } 277 + gpio_direction_input(AMS_DELTA_GPIO_PIN_MODEM_IRQ); 268 278 269 279 ams_delta_latch2_write( 270 280 AMS_DELTA_LATCH2_MODEM_NRESET | AMS_DELTA_LATCH2_MODEM_CODEC,