[E3-hacking] [PATCH v4 2.1/5(7)] OMAP1: Amstrad Delta: update board initialization code for complete modem IRQ GPIO line setup

Janusz Krzysztofik jkrzyszt at tis.icnet.pl
Wed Apr 28 02:05:47 BST 2010

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.

Created and tested against linux-omap master, 
commit 104a77440f05430f29f9d3f4ecb88c1536819585 dated 2010-04-27.

Signed-off-by: Janusz Krzysztofik <jkrzyszt at tis.icnet.pl>
Introduced in v3 of the patch set.
v4 changes: none.

 arch/arm/mach-omap1/board-ams-delta.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

--- git.orig/arch/arm/mach-omap1/board-ams-delta.c	2010-04-27 21:40:22.000000000 +0200
+++ git/arch/arm/mach-omap1/board-ams-delta.c	2010-04-27 22:34:42.000000000 +0200
@@ -263,8 +263,18 @@ static struct platform_device ams_delta_
 static int __init ams_delta_modem_init(void)
+	int err;
-	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);

More information about the e3-hacking mailing list