From: Jon Hunter <jon-hunter@ti.com>
To: Franky Lin <frankyl@broadcom.com>
Cc: Kevin Hilman <khilman@ti.com>,
b-cousson@ti.com, tony@atomide.com,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
grant.likely@secretlab.ca, santosh.shilimkar@ti.com,
linux-omap@vger.kernel.org, tarun.kanti@ti.com,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: Panda ES board hang when using GPIO as interrupt
Date: Thu, 28 Jun 2012 18:35:12 -0500 [thread overview]
Message-ID: <4FECEA30.5060107@ti.com> (raw)
In-Reply-To: <4FECE45E.6040506@broadcom.com>
On 06/28/2012 06:10 PM, Franky Lin wrote:
> On 06/28/2012 03:59 PM, Jon Hunter wrote:
>>
>> On 06/28/2012 05:53 PM, Franky Lin wrote:
>>> I found one interesting thing. When I added the print info to see when
>>> runtime_suspend/resume get called, it seems like the suspend/resume is
>>> unbalance during boot. Resume got called more than suspend. So I hack
>>> the code to make sure suspend and resume are called in pair. A resume
>>> without suspend will do nothing and return immediately. This also makes
>>> the hang vanish.
>>
>> I am not 100% sure I follow. On boot I would expect to see a
>> resume/suspend due to the probe on the irq bank and then I would expect
>> to see another resume from the acquisition of the gpio, however, I would
>> not expect a suspend until the gpio is freed, which I don't believe you
>> are doing.
>>
>> Can you share your hack? Just paste the diff? This may help me
>> understand more.
>>
>
> OK.
> This is what I saw in the log:
> [ 0.171844] dummy:
> [ 0.172912] NET: Registered protocol family 16
> [ 0.173431] GPMC revision 6.0
> [ 0.173492] gpmc: irq-52 could not claim: err -22
> [ 0.177551] ??????omap_gpio_runtime_resume
> [ 0.178619] OMAP GPIO hardware version 0.1
> [ 0.178649] !!!!!omap_gpio_runtime_suspend
> [ 0.178771] ??????omap_gpio_runtime_resume
> [ 0.179351] !!!!!omap_gpio_runtime_suspend
> [ 0.179504] ??????omap_gpio_runtime_resume
> [ 0.180023] !!!!!omap_gpio_runtime_suspend
> [ 0.180145] ??????omap_gpio_runtime_resume
> [ 0.180694] !!!!!omap_gpio_runtime_suspend
> [ 0.180847] ??????omap_gpio_runtime_resume
> [ 0.181365] !!!!!omap_gpio_runtime_suspend
> [ 0.181518] ??????omap_gpio_runtime_resume
> [ 0.182037] !!!!!omap_gpio_runtime_suspend
> [ 0.185089] omap_mux_init: Add partition: #1: core, flags: 2
> [ 0.186462] omap_mux_init: Add partition: #2: wkup, flags: 2
> [ 0.186584] error setting wl12xx data: -38
> [ 0.189788] _omap_mux_get_by_name: Could not find signal
> uart1_rx.uart1_rx
> [ 0.189788] _omap_mux_get_by_name: Could not find signal
> uart1_rx.uart1_rx
> [ 0.239501] ??????omap_gpio_runtime_resume
> [ 0.239532] ??????omap_gpio_runtime_resume
> [ 0.241058] usbhs_omap: alias fck already exists
> [ 0.244781] ??????omap_gpio_runtime_resume
Sorry, can you do one more test? :-)
Add the following and send me the output?
Thanks!
Jon
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index c4ed172..3aa0f96 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1155,6 +1155,7 @@ static int omap_gpio_runtime_suspend(struct device
*dev)
unsigned long flags;
u32 wake_low, wake_hi;
+ pr_info("%s: bank @ 0x%x\n", __func__, (u32)bank->base);
spin_lock_irqsave(&bank->lock, flags);
/*
@@ -1221,6 +1222,7 @@ static int omap_gpio_runtime_resume(struct device
*dev)
u32 l = 0, gen, gen0, gen1;
unsigned long flags;
+ pr_info("%s: bank @ 0x%x\n", __func__, (u32)bank->base);
spin_lock_irqsave(&bank->lock, flags);
_gpio_dbck_enable(bank);
@@ -1239,6 +1241,7 @@ static int omap_gpio_runtime_resume(struct device
*dev)
context_lost_cnt_after =
bank->get_context_loss_count(bank->dev);
if (context_lost_cnt_after != bank->context_loss_count) {
+ pr_info("%s: count %d, now %d", __func__,
bank->context_loss_count, context_lost_cnt_after);
omap_gpio_restore_context(bank);
} else {
spin_unlock_irqrestore(&bank->lock, flags);
@@ -1341,6 +1344,7 @@ void omap2_gpio_resume_after_idle(void)
#if defined(CONFIG_PM_RUNTIME)
static void omap_gpio_restore_context(struct gpio_bank *bank)
{
+ pr_info("%s: bank @ 0x%x\n", __func__, (u32)bank->base);
__raw_writel(bank->context.wake_en,
bank->base + bank->regs->wkup_en);
__raw_writel(bank->context.ctrl, bank->base + bank->regs->ctrl);
WARNING: multiple messages have this Message-ID (diff)
From: Jon Hunter <jon-hunter@ti.com>
To: Franky Lin <frankyl@broadcom.com>
Cc: Kevin Hilman <khilman@ti.com>, <b-cousson@ti.com>,
<tony@atomide.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
<grant.likely@secretlab.ca>, <santosh.shilimkar@ti.com>,
<linux-omap@vger.kernel.org>, <tarun.kanti@ti.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: Panda ES board hang when using GPIO as interrupt
Date: Thu, 28 Jun 2012 18:35:12 -0500 [thread overview]
Message-ID: <4FECEA30.5060107@ti.com> (raw)
In-Reply-To: <4FECE45E.6040506@broadcom.com>
On 06/28/2012 06:10 PM, Franky Lin wrote:
> On 06/28/2012 03:59 PM, Jon Hunter wrote:
>>
>> On 06/28/2012 05:53 PM, Franky Lin wrote:
>>> I found one interesting thing. When I added the print info to see when
>>> runtime_suspend/resume get called, it seems like the suspend/resume is
>>> unbalance during boot. Resume got called more than suspend. So I hack
>>> the code to make sure suspend and resume are called in pair. A resume
>>> without suspend will do nothing and return immediately. This also makes
>>> the hang vanish.
>>
>> I am not 100% sure I follow. On boot I would expect to see a
>> resume/suspend due to the probe on the irq bank and then I would expect
>> to see another resume from the acquisition of the gpio, however, I would
>> not expect a suspend until the gpio is freed, which I don't believe you
>> are doing.
>>
>> Can you share your hack? Just paste the diff? This may help me
>> understand more.
>>
>
> OK.
> This is what I saw in the log:
> [ 0.171844] dummy:
> [ 0.172912] NET: Registered protocol family 16
> [ 0.173431] GPMC revision 6.0
> [ 0.173492] gpmc: irq-52 could not claim: err -22
> [ 0.177551] ??????omap_gpio_runtime_resume
> [ 0.178619] OMAP GPIO hardware version 0.1
> [ 0.178649] !!!!!omap_gpio_runtime_suspend
> [ 0.178771] ??????omap_gpio_runtime_resume
> [ 0.179351] !!!!!omap_gpio_runtime_suspend
> [ 0.179504] ??????omap_gpio_runtime_resume
> [ 0.180023] !!!!!omap_gpio_runtime_suspend
> [ 0.180145] ??????omap_gpio_runtime_resume
> [ 0.180694] !!!!!omap_gpio_runtime_suspend
> [ 0.180847] ??????omap_gpio_runtime_resume
> [ 0.181365] !!!!!omap_gpio_runtime_suspend
> [ 0.181518] ??????omap_gpio_runtime_resume
> [ 0.182037] !!!!!omap_gpio_runtime_suspend
> [ 0.185089] omap_mux_init: Add partition: #1: core, flags: 2
> [ 0.186462] omap_mux_init: Add partition: #2: wkup, flags: 2
> [ 0.186584] error setting wl12xx data: -38
> [ 0.189788] _omap_mux_get_by_name: Could not find signal
> uart1_rx.uart1_rx
> [ 0.189788] _omap_mux_get_by_name: Could not find signal
> uart1_rx.uart1_rx
> [ 0.239501] ??????omap_gpio_runtime_resume
> [ 0.239532] ??????omap_gpio_runtime_resume
> [ 0.241058] usbhs_omap: alias fck already exists
> [ 0.244781] ??????omap_gpio_runtime_resume
Sorry, can you do one more test? :-)
Add the following and send me the output?
Thanks!
Jon
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index c4ed172..3aa0f96 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1155,6 +1155,7 @@ static int omap_gpio_runtime_suspend(struct device
*dev)
unsigned long flags;
u32 wake_low, wake_hi;
+ pr_info("%s: bank @ 0x%x\n", __func__, (u32)bank->base);
spin_lock_irqsave(&bank->lock, flags);
/*
@@ -1221,6 +1222,7 @@ static int omap_gpio_runtime_resume(struct device
*dev)
u32 l = 0, gen, gen0, gen1;
unsigned long flags;
+ pr_info("%s: bank @ 0x%x\n", __func__, (u32)bank->base);
spin_lock_irqsave(&bank->lock, flags);
_gpio_dbck_enable(bank);
@@ -1239,6 +1241,7 @@ static int omap_gpio_runtime_resume(struct device
*dev)
context_lost_cnt_after =
bank->get_context_loss_count(bank->dev);
if (context_lost_cnt_after != bank->context_loss_count) {
+ pr_info("%s: count %d, now %d", __func__,
bank->context_loss_count, context_lost_cnt_after);
omap_gpio_restore_context(bank);
} else {
spin_unlock_irqrestore(&bank->lock, flags);
@@ -1341,6 +1344,7 @@ void omap2_gpio_resume_after_idle(void)
#if defined(CONFIG_PM_RUNTIME)
static void omap_gpio_restore_context(struct gpio_bank *bank)
{
+ pr_info("%s: bank @ 0x%x\n", __func__, (u32)bank->base);
__raw_writel(bank->context.wake_en,
bank->base + bank->regs->wkup_en);
__raw_writel(bank->context.ctrl, bank->base + bank->regs->ctrl);
WARNING: multiple messages have this Message-ID (diff)
From: jon-hunter@ti.com (Jon Hunter)
To: linux-arm-kernel@lists.infradead.org
Subject: Panda ES board hang when using GPIO as interrupt
Date: Thu, 28 Jun 2012 18:35:12 -0500 [thread overview]
Message-ID: <4FECEA30.5060107@ti.com> (raw)
In-Reply-To: <4FECE45E.6040506@broadcom.com>
On 06/28/2012 06:10 PM, Franky Lin wrote:
> On 06/28/2012 03:59 PM, Jon Hunter wrote:
>>
>> On 06/28/2012 05:53 PM, Franky Lin wrote:
>>> I found one interesting thing. When I added the print info to see when
>>> runtime_suspend/resume get called, it seems like the suspend/resume is
>>> unbalance during boot. Resume got called more than suspend. So I hack
>>> the code to make sure suspend and resume are called in pair. A resume
>>> without suspend will do nothing and return immediately. This also makes
>>> the hang vanish.
>>
>> I am not 100% sure I follow. On boot I would expect to see a
>> resume/suspend due to the probe on the irq bank and then I would expect
>> to see another resume from the acquisition of the gpio, however, I would
>> not expect a suspend until the gpio is freed, which I don't believe you
>> are doing.
>>
>> Can you share your hack? Just paste the diff? This may help me
>> understand more.
>>
>
> OK.
> This is what I saw in the log:
> [ 0.171844] dummy:
> [ 0.172912] NET: Registered protocol family 16
> [ 0.173431] GPMC revision 6.0
> [ 0.173492] gpmc: irq-52 could not claim: err -22
> [ 0.177551] ??????omap_gpio_runtime_resume
> [ 0.178619] OMAP GPIO hardware version 0.1
> [ 0.178649] !!!!!omap_gpio_runtime_suspend
> [ 0.178771] ??????omap_gpio_runtime_resume
> [ 0.179351] !!!!!omap_gpio_runtime_suspend
> [ 0.179504] ??????omap_gpio_runtime_resume
> [ 0.180023] !!!!!omap_gpio_runtime_suspend
> [ 0.180145] ??????omap_gpio_runtime_resume
> [ 0.180694] !!!!!omap_gpio_runtime_suspend
> [ 0.180847] ??????omap_gpio_runtime_resume
> [ 0.181365] !!!!!omap_gpio_runtime_suspend
> [ 0.181518] ??????omap_gpio_runtime_resume
> [ 0.182037] !!!!!omap_gpio_runtime_suspend
> [ 0.185089] omap_mux_init: Add partition: #1: core, flags: 2
> [ 0.186462] omap_mux_init: Add partition: #2: wkup, flags: 2
> [ 0.186584] error setting wl12xx data: -38
> [ 0.189788] _omap_mux_get_by_name: Could not find signal
> uart1_rx.uart1_rx
> [ 0.189788] _omap_mux_get_by_name: Could not find signal
> uart1_rx.uart1_rx
> [ 0.239501] ??????omap_gpio_runtime_resume
> [ 0.239532] ??????omap_gpio_runtime_resume
> [ 0.241058] usbhs_omap: alias fck already exists
> [ 0.244781] ??????omap_gpio_runtime_resume
Sorry, can you do one more test? :-)
Add the following and send me the output?
Thanks!
Jon
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index c4ed172..3aa0f96 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1155,6 +1155,7 @@ static int omap_gpio_runtime_suspend(struct device
*dev)
unsigned long flags;
u32 wake_low, wake_hi;
+ pr_info("%s: bank @ 0x%x\n", __func__, (u32)bank->base);
spin_lock_irqsave(&bank->lock, flags);
/*
@@ -1221,6 +1222,7 @@ static int omap_gpio_runtime_resume(struct device
*dev)
u32 l = 0, gen, gen0, gen1;
unsigned long flags;
+ pr_info("%s: bank @ 0x%x\n", __func__, (u32)bank->base);
spin_lock_irqsave(&bank->lock, flags);
_gpio_dbck_enable(bank);
@@ -1239,6 +1241,7 @@ static int omap_gpio_runtime_resume(struct device
*dev)
context_lost_cnt_after =
bank->get_context_loss_count(bank->dev);
if (context_lost_cnt_after != bank->context_loss_count) {
+ pr_info("%s: count %d, now %d", __func__,
bank->context_loss_count, context_lost_cnt_after);
omap_gpio_restore_context(bank);
} else {
spin_unlock_irqrestore(&bank->lock, flags);
@@ -1341,6 +1344,7 @@ void omap2_gpio_resume_after_idle(void)
#if defined(CONFIG_PM_RUNTIME)
static void omap_gpio_restore_context(struct gpio_bank *bank)
{
+ pr_info("%s: bank @ 0x%x\n", __func__, (u32)bank->base);
__raw_writel(bank->context.wake_en,
bank->base + bank->regs->wkup_en);
__raw_writel(bank->context.ctrl, bank->base + bank->regs->ctrl);
next prev parent reply other threads:[~2012-06-28 23:35 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-25 20:52 Panda ES board hang when using GPIO as interrupt Franky Lin
2012-06-25 20:52 ` Franky Lin
2012-06-25 20:52 ` Franky Lin
2012-06-26 7:21 ` DebBarma, Tarun Kanti
2012-06-26 7:21 ` DebBarma, Tarun Kanti
[not found] ` <CAC83ZvL2ozQD1DYmtKeFa1PB1pZ1JmBUKFWmDWnbJOCDL3sKNg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-06-26 18:20 ` Franky Lin
2012-06-26 18:20 ` Franky Lin
2012-06-26 18:20 ` Franky Lin
2012-06-27 13:29 ` DebBarma, Tarun Kanti
2012-06-27 13:29 ` DebBarma, Tarun Kanti
[not found] ` <4FE8CF77.5080400-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2012-06-27 3:37 ` Kevin Hilman
2012-06-27 3:37 ` Kevin Hilman
2012-06-27 3:37 ` Kevin Hilman
[not found] ` <87txxxs9we.fsf-l0cyMroinI0@public.gmane.org>
2012-06-28 0:41 ` Franky Lin
2012-06-28 0:41 ` Franky Lin
2012-06-28 0:41 ` Franky Lin
2012-06-28 15:42 ` Jon Hunter
2012-06-28 15:42 ` Jon Hunter
2012-06-28 15:42 ` Jon Hunter
2012-06-28 21:24 ` Franky Lin
2012-06-28 21:24 ` Franky Lin
[not found] ` <4FECCB91.7090609-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2012-06-28 21:55 ` Jon Hunter
2012-06-28 21:55 ` Jon Hunter
2012-06-28 21:55 ` Jon Hunter
[not found] ` <4FECD2E5.1060603-l0cyMroinI0@public.gmane.org>
2012-06-28 22:53 ` Franky Lin
2012-06-28 22:53 ` Franky Lin
2012-06-28 22:53 ` Franky Lin
2012-06-28 22:59 ` Jon Hunter
2012-06-28 22:59 ` Jon Hunter
2012-06-28 22:59 ` Jon Hunter
2012-06-28 23:10 ` Franky Lin
2012-06-28 23:10 ` Franky Lin
[not found] ` <4FECE45E.6040506-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2012-06-28 23:28 ` Jon Hunter
2012-06-28 23:28 ` Jon Hunter
2012-06-28 23:28 ` Jon Hunter
2012-06-28 23:35 ` Jon Hunter [this message]
2012-06-28 23:35 ` Jon Hunter
2012-06-28 23:35 ` Jon Hunter
2012-06-28 23:54 ` Jon Hunter
2012-06-28 23:54 ` Jon Hunter
2012-06-28 23:54 ` Jon Hunter
2012-06-29 0:59 ` Franky Lin
2012-06-29 0:59 ` Franky Lin
2012-06-29 4:07 ` DebBarma, Tarun Kanti
2012-06-29 4:07 ` DebBarma, Tarun Kanti
2012-06-29 4:07 ` DebBarma, Tarun Kanti
[not found] ` <CAC83ZvJJw-7Xt4Ey4_OT70D6MGHEfwURYVuj5wYTLe5oYiMuRw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-06-29 15:53 ` Jon Hunter
2012-06-29 15:53 ` Jon Hunter
2012-06-29 15:53 ` Jon Hunter
2012-06-27 23:43 ` Jon Hunter
2012-06-27 23:43 ` Jon Hunter
2012-06-27 23:43 ` Jon Hunter
2012-06-28 1:03 ` Franky Lin
2012-06-28 1:03 ` Franky Lin
[not found] ` <4FEBAD7A.5050505-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2012-06-28 15:37 ` Jon Hunter
2012-06-28 15:37 ` Jon Hunter
2012-06-28 15:37 ` Jon Hunter
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=4FECEA30.5060107@ti.com \
--to=jon-hunter@ti.com \
--cc=b-cousson@ti.com \
--cc=frankyl@broadcom.com \
--cc=grant.likely@secretlab.ca \
--cc=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=santosh.shilimkar@ti.com \
--cc=tarun.kanti@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.