All of lore.kernel.org
 help / color / mirror / Atom feed
From: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
To: linux-omap@vger.kernel.org
Cc: Tony Lindgren <tony@atomide.com>,
	linux-arm-kernel@lists.infradead.org, e3-hacking@earth.li
Subject: [PATCH v4 2.1/5(7)] OMAP1: Amstrad Delta: update board initialization code for complete modem IRQ GPIO line setup
Date: Wed, 28 Apr 2010 03:05:47 +0200	[thread overview]
Message-ID: <201004280305.49347.jkrzyszt@tis.icnet.pl> (raw)
In-Reply-To: <201004280252.58420.jkrzyszt@tis.icnet.pl>

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@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;
+
 	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,

WARNING: multiple messages have this Message-ID (diff)
From: jkrzyszt@tis.icnet.pl (Janusz Krzysztofik)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 2.1/5(7)] OMAP1: Amstrad Delta: update board initialization code for complete modem IRQ GPIO line setup
Date: Wed, 28 Apr 2010 03:05:47 +0200	[thread overview]
Message-ID: <201004280305.49347.jkrzyszt@tis.icnet.pl> (raw)
In-Reply-To: <201004280252.58420.jkrzyszt@tis.icnet.pl>

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@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;
+
 	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,

  parent reply	other threads:[~2010-04-28  1:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-28  0:52 [PATCH v4 0/5(7)] OMAP1: Amstrad Delta: add FIQ based support for external keyboard Janusz Krzysztofik
2010-04-28  0:52 ` Janusz Krzysztofik
2010-04-28  0:58 ` [PATCH v4 0.1/5(7)] OMAP: add missing FIQ_START definition required for arch/arm/kernel/fiq.c compilation Janusz Krzysztofik
2010-04-28  0:58   ` Janusz Krzysztofik
2010-04-28  2:15   ` [RESUBMIT] " Janusz Krzysztofik
2010-04-28  2:15     ` Janusz Krzysztofik
2010-04-28  1:01 ` [PATCH v4 1/5(7)] OMAP1: Amstrad Delta: add FIQ handler for serial keyboard port interrupt processing Janusz Krzysztofik
2010-04-28  1:01   ` Janusz Krzysztofik
2010-04-28  1:03 ` [PATCH v4 2/5(7)] OMAP1: Amstrad Delta: add a handler for processing interrupts generated by the FIQ routine Janusz Krzysztofik
2010-04-28  1:03   ` Janusz Krzysztofik
2010-04-28  1:05 ` Janusz Krzysztofik [this message]
2010-04-28  1:05   ` [PATCH v4 2.1/5(7)] OMAP1: Amstrad Delta: update board initialization code for complete modem IRQ GPIO line setup Janusz Krzysztofik
2010-04-28  1:07 ` [PATCH v4 3/5(7)] OMAP1: Amstrad Delta: use FIQ for processing GPIO interrupts Janusz Krzysztofik
2010-04-28  1:07   ` Janusz Krzysztofik
2010-04-28  1:10 ` [PATCH v4 4/5(7)] input: serio: add support for Amstrad Delta serial keyboard port Janusz Krzysztofik
2010-04-28  1:10   ` Janusz Krzysztofik
2010-05-04 20:40   ` Tony Lindgren
2010-05-04 20:40     ` Tony Lindgren
2010-05-04 20:48     ` Russell King - ARM Linux
2010-05-04 20:48       ` Russell King - ARM Linux
2010-05-04 20:58       ` Dmitry Torokhov
2010-05-04 20:58         ` Dmitry Torokhov
2010-04-28  1:14 ` [PATCH v4 5/5(7)] OMAP1: Amstrad Delta: modify defconfig for external keyboard support Janusz Krzysztofik
2010-04-28  1:14   ` Janusz Krzysztofik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201004280305.49347.jkrzyszt@tis.icnet.pl \
    --to=jkrzyszt@tis.icnet.pl \
    --cc=e3-hacking@earth.li \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.