All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: "Varadarajan, Charulatha" <charu@ti.com>
Cc: tony@atomide.com, linux-omap@vger.kernel.org, paul@pwsan.com,
	b-cousson@ti.com, rnayak@ti.com, p-basak2@ti.com
Subject: Re: [PATCH v6 00/13] OMAP: GPIO: Implement GPIO in hwmod way
Date: Mon, 20 Sep 2010 17:07:07 -0700	[thread overview]
Message-ID: <87r5goq7ro.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1284819353-8512-1-git-send-email-charu@ti.com> (Charulatha Varadarajan's message of "Sat, 18 Sep 2010 19:45:40 +0530")

"Varadarajan, Charulatha" <charu@ti.com> writes:

> This patch series makes OMAP2PLUS specific GPIO implemented in hwmod
> FW way. This is done by implementing GPIO module in platform device model.
>
> This patch series is generated on "origin/pm-wip/pm-core" which
> has Kevin's pm-next series, the runtime PM core patch series,
> and a collection of hwmod fixes that Paul/Benoit have lined up
> for 2.6.37.
>
> Tested on OMAP2430, OMAP44430, OMAP3430 SDP and zoom3 boards.
> Also verified that this patch series does not break the OMAP1 build.
>
> This patch series is created on top of the following patches:
> 1. OMAP: HWMOD: Handle opt clocks using clk_add_alias
> [https://patchwork.kernel.org/patch/124531/]
> 2. OMAP2+: GPIO: move late PM out of interrupts-disabled idle path
> [https://patchwork.kernel.org/patch/176172/]
> 3. OMAP: CPUIDLE: Enable IRQs during device activity check and idle management
> by Kevin
>
> This series is tested on OMAP4430 ES2 using the below series
> http://www.spinics.net/lists/linux-omap/msg36023.html

Hi Charu,

I haven't been fully through the series, but here's some quick feedback
based on what I tried today.

Basically, I got stuck because the first board I tried it on was the
35xx-based OMAP3EVM platform, which uses a GPIO-based interrupt for the
network.  My setup uses DHCP + nfsroot, so the GPIO IRQ must be working
during boot.

The first thing I noticed, is that GPIO interrupts are not firing during
boot, so neither the DHCP or the nfsroot works during boot.  I haven't
been able to fully debug this, but the 3430SDP should have the same
issue for its smc91x if you set it up for DHCP + nfsroot.  This is
working fine on my pm-wip/idle-reorg branch which has the prerequisites
you mentioned, but didn't work when I applied the clk_alias patch plus
this series.

The other change when debugging I made was to make the
'workaround_enable' hack bank specific.  Now that the bank idles can be
called independetly, this would get cleared as soon as one of the banks
clears it.  It should be a per-bank flag[1]

Another thing I noticed was that ENWAKEUP is no longer set in the
SYSCONFIG register for each bank, as it was before.  To avoid this kind
of functional change, I did[2]

I'll get back to digging a bit tomorrow, but hopefully you can debug
this further before I get to it.

Kevin


[1]
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 2f5c1eb..3b60418 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -170,6 +170,7 @@ struct gpio_bank {
 	struct omap_gpio_regs gpio_context;
 	struct powerdomain *pwrdm;
 	bool dbck_flag;
+	int workaround_enabled;
 };
 
 static void omap_gpio_save_context(struct device *dev);
@@ -1830,8 +1831,6 @@ static int omap_gpio_resume(struct device *dev)
 	return 0;
 }
 
-static int workaround_enabled;
-
 static int gpio_bank_runtime_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
@@ -1887,7 +1886,7 @@ static int gpio_bank_runtime_suspend(struct device *dev)
 		__raw_writel(l2, bank->base + OMAP4_GPIO_RISINGDETECT);
 	}
 
-	workaround_enabled = 1;
+	bank->workaround_enabled = 1;
 
 	return 0;
 }
@@ -1900,7 +1899,7 @@ static int gpio_bank_runtime_resume(struct device *dev)
 	if (bank->dbck_enable_mask)
 		clk_enable(bank->dbck);
 
-	if ((!workaround_enabled) || (!(bank->enabled_non_wakeup_gpios)))
+	if ((!bank->workaround_enabled) || (!(bank->enabled_non_wakeup_gpios)))
 		return 0;
 
 	if (bank->method == METHOD_GPIO_24XX) {
@@ -2110,11 +2109,11 @@ void omap2_gpio_prepare_for_idle(void)
 {
 	int i;
 
-	workaround_enabled = 0;
-
 	for (i = 0; i < gpio_bank_count; i++) {
 		struct gpio_bank *bank = &gpio_bank[i];
 
+		bank->workaround_enabled = 0;
+
 		/* If the gpio bank is not used, do nothing */
 		if ((!bank->pwrdm) || !(bank->mod_usage))
 			continue;


[2]
diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c
index e759311..ae7487f 100644
--- a/arch/arm/mach-omap2/gpio.c
+++ b/arch/arm/mach-omap2/gpio.c
@@ -54,6 +54,8 @@ static int omap2_init_gpio(struct omap_hwmod *oh, void *user)
 	pdata->virtual_irq_start = IH_GPIO_BASE + 32 * gpio_bank_count;
 	pdata->pwrdm = omap_hwmod_get_pwrdm(oh);
 
+	omap_hwmod_enable_wakeup(oh);
+
 	switch (oh->class->rev) {
 	case 0:
 	case 1:

  parent reply	other threads:[~2010-09-21  0:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-18 14:15 [PATCH v6 00/13] OMAP: GPIO: Implement GPIO in hwmod way Varadarajan, Charulatha
2010-09-18 14:15 ` [PATCH v6 01/13] OMAP: GPIO: Modify init() in preparation for platform device implementation Varadarajan, Charulatha
2010-09-18 14:15 ` [PATCH v6 02/13] OMAP: GPIO: Introduce support for OMAP15xx chip GPIO init Varadarajan, Charulatha
2010-09-18 14:15 ` [PATCH v6 03/13] OMAP: GPIO: Introduce support for OMAP16xx " Varadarajan, Charulatha
2010-09-18 14:15 ` [PATCH v6 04/13] OMAP: GPIO: Introduce support for OMAP7xx " Varadarajan, Charulatha
2010-09-18 14:15 ` [PATCH v6 05/13] OMAP2420: hwmod data: Add GPIO Varadarajan, Charulatha
2010-09-18 14:15 ` [PATCH v6 06/13] OMAP2430: " Varadarajan, Charulatha
2010-09-18 14:15 ` [PATCH v6 07/13] OMAP3: " Varadarajan, Charulatha
2010-09-21 23:22   ` Kevin Hilman
2010-09-18 14:15 ` [PATCH v6 08/13] OMAP4: " Varadarajan, Charulatha
2010-09-18 14:15 ` [PATCH v6 09/13] OMAP2PLUS: GPIO: use omap_device_build for device registration Varadarajan, Charulatha
2010-09-18 14:15 ` [PATCH v6 10/13] OMAP: GPIO: Implement GPIO as a platform device Varadarajan, Charulatha
2010-09-18 14:15 ` [PATCH v6 11/13] OMAP: GPIO: Make gpio_context as part of gpio_bank structure Varadarajan, Charulatha
2010-09-18 14:15 ` [PATCH v6 12/13] OMAP: GPIO: Use dev_pm_ops instead of sys_dev_class Varadarajan, Charulatha
2010-09-18 14:15 ` [PATCH v6 13/13] OMAP: GPIO: Remove omap_gpio_init() Varadarajan, Charulatha
2010-09-21  0:07 ` Kevin Hilman [this message]
2010-09-21 14:06   ` [PATCH v6 00/13] OMAP: GPIO: Implement GPIO in hwmod way Varadarajan, Charulatha
2010-09-21 17:57     ` Kevin Hilman
2010-09-21 23:34       ` Kevin Hilman
2010-09-22  0:18         ` Kevin Hilman
2010-09-22 14:27           ` Varadarajan, Charulatha
2010-09-22 14:33             ` Kevin Hilman
2010-09-22 23:11           ` Kevin Hilman
2010-09-24 15:12           ` Varadarajan, Charulatha
2010-09-24 18:37             ` Kevin Hilman
2010-09-25 11:59               ` Varadarajan, Charulatha

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=87r5goq7ro.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=b-cousson@ti.com \
    --cc=charu@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=p-basak2@ti.com \
    --cc=paul@pwsan.com \
    --cc=rnayak@ti.com \
    --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.