All of lore.kernel.org
 help / color / mirror / Atom feed
From: "DebBarma, Tarun Kanti" <tarun.kanti@ti.com>
To: Franky Lin <frankyl@broadcom.com>
Cc: Jon Hunter <jon-hunter@ti.com>, 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,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: Panda ES board hang when using GPIO as interrupt
Date: Fri, 29 Jun 2012 09:37:14 +0530	[thread overview]
Message-ID: <CAC83ZvJJw-7Xt4Ey4_OT70D6MGHEfwURYVuj5wYTLe5oYiMuRw@mail.gmail.com> (raw)
In-Reply-To: <4FECFDD8.5060105@broadcom.com>

On Fri, Jun 29, 2012 at 6:29 AM, Franky Lin <frankyl@broadcom.com> wrote:
> On 06/28/2012 04:54 PM, Jon Hunter wrote:
>>
>> I am wondering if this could be the bug ... on start-up I see that we do
>> a context restore on bank1 during the probe which is before we have done
>> the first suspend! In other words, we could restore a bad/uninitialised
>> context for bank1. In the case of bank1, the loss count starts at 1 and
>> not 0 and so we falsely think we need to perform a restore :-(
>>
>> [    0.176269] omap_gpio_runtime_resume: bank @ 0xfc310000
>> [    0.177276] omap_gpio_runtime_resume: count 0, now 1
>> [    0.177276] gpiochip_add: registered GPIOs 0 to 31 on device: gpio
>> [    0.177642] omap_gpio_runtime_suspend: bank @ 0xfc310000
>>
>> Can you try ...
>>
>> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
>> index c4ed172..9623408 100644
>> --- a/drivers/gpio/gpio-omap.c
>> +++ b/drivers/gpio/gpio-omap.c
>> @@ -1086,6 +1086,9 @@ static int __devinit omap_gpio_probe(struct
>> platform_device *pdev)
>>  #ifdef CONFIG_OF_GPIO
>>         bank->chip.of_node = of_node_get(node);
>>  #endif
>> +       if (bank->get_context_loss_count)
>> +               bank->context_loss_count =
>> +                               bank->get_context_loss_count(bank->dev);
>>
>>         bank->irq_base = irq_alloc_descs(-1, 0, bank->width, 0);
>>         if (bank->irq_base < 0) {
>>
>
> Looks like you found the culprit. :) It does fix the problem.
So this looks similar to what NeilBrown <neilb@suse.de> reported in
another thread.
The reason was context_loss_count = 1 for GPIO BANK#0 which of course is in the
WKUP domain. In fact he tried out with the same fix. Anyways, we
should hear from
Kevin now whether it is feasible to fix the context_loss_count for the WKUP GPIO
bank or to put the workaround here in the gpio driver.
--
Tarun
>
> Franky
>

WARNING: multiple messages have this Message-ID (diff)
From: "DebBarma, Tarun Kanti" <tarun.kanti@ti.com>
To: Franky Lin <frankyl@broadcom.com>
Cc: Jon Hunter <jon-hunter@ti.com>, 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,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: Panda ES board hang when using GPIO as interrupt
Date: Fri, 29 Jun 2012 09:37:14 +0530	[thread overview]
Message-ID: <CAC83ZvJJw-7Xt4Ey4_OT70D6MGHEfwURYVuj5wYTLe5oYiMuRw@mail.gmail.com> (raw)
In-Reply-To: <4FECFDD8.5060105@broadcom.com>

On Fri, Jun 29, 2012 at 6:29 AM, Franky Lin <frankyl@broadcom.com> wrote:
> On 06/28/2012 04:54 PM, Jon Hunter wrote:
>>
>> I am wondering if this could be the bug ... on start-up I see that we do
>> a context restore on bank1 during the probe which is before we have done
>> the first suspend! In other words, we could restore a bad/uninitialised
>> context for bank1. In the case of bank1, the loss count starts at 1 and
>> not 0 and so we falsely think we need to perform a restore :-(
>>
>> [    0.176269] omap_gpio_runtime_resume: bank @ 0xfc310000
>> [    0.177276] omap_gpio_runtime_resume: count 0, now 1
>> [    0.177276] gpiochip_add: registered GPIOs 0 to 31 on device: gpio
>> [    0.177642] omap_gpio_runtime_suspend: bank @ 0xfc310000
>>
>> Can you try ...
>>
>> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
>> index c4ed172..9623408 100644
>> --- a/drivers/gpio/gpio-omap.c
>> +++ b/drivers/gpio/gpio-omap.c
>> @@ -1086,6 +1086,9 @@ static int __devinit omap_gpio_probe(struct
>> platform_device *pdev)
>>  #ifdef CONFIG_OF_GPIO
>>         bank->chip.of_node = of_node_get(node);
>>  #endif
>> +       if (bank->get_context_loss_count)
>> +               bank->context_loss_count =
>> +                               bank->get_context_loss_count(bank->dev);
>>
>>         bank->irq_base = irq_alloc_descs(-1, 0, bank->width, 0);
>>         if (bank->irq_base < 0) {
>>
>
> Looks like you found the culprit. :) It does fix the problem.
So this looks similar to what NeilBrown <neilb@suse.de> reported in
another thread.
The reason was context_loss_count = 1 for GPIO BANK#0 which of course is in the
WKUP domain. In fact he tried out with the same fix. Anyways, we
should hear from
Kevin now whether it is feasible to fix the context_loss_count for the WKUP GPIO
bank or to put the workaround here in the gpio driver.
--
Tarun
>
> Franky
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: tarun.kanti@ti.com (DebBarma, Tarun Kanti)
To: linux-arm-kernel@lists.infradead.org
Subject: Panda ES board hang when using GPIO as interrupt
Date: Fri, 29 Jun 2012 09:37:14 +0530	[thread overview]
Message-ID: <CAC83ZvJJw-7Xt4Ey4_OT70D6MGHEfwURYVuj5wYTLe5oYiMuRw@mail.gmail.com> (raw)
In-Reply-To: <4FECFDD8.5060105@broadcom.com>

On Fri, Jun 29, 2012 at 6:29 AM, Franky Lin <frankyl@broadcom.com> wrote:
> On 06/28/2012 04:54 PM, Jon Hunter wrote:
>>
>> I am wondering if this could be the bug ... on start-up I see that we do
>> a context restore on bank1 during the probe which is before we have done
>> the first suspend! In other words, we could restore a bad/uninitialised
>> context for bank1. In the case of bank1, the loss count starts at 1 and
>> not 0 and so we falsely think we need to perform a restore :-(
>>
>> [ ? ?0.176269] omap_gpio_runtime_resume: bank @ 0xfc310000
>> [ ? ?0.177276] omap_gpio_runtime_resume: count 0, now 1
>> [ ? ?0.177276] gpiochip_add: registered GPIOs 0 to 31 on device: gpio
>> [ ? ?0.177642] omap_gpio_runtime_suspend: bank @ 0xfc310000
>>
>> Can you try ...
>>
>> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
>> index c4ed172..9623408 100644
>> --- a/drivers/gpio/gpio-omap.c
>> +++ b/drivers/gpio/gpio-omap.c
>> @@ -1086,6 +1086,9 @@ static int __devinit omap_gpio_probe(struct
>> platform_device *pdev)
>> ?#ifdef CONFIG_OF_GPIO
>> ? ? ? ? bank->chip.of_node = of_node_get(node);
>> ?#endif
>> + ? ? ? if (bank->get_context_loss_count)
>> + ? ? ? ? ? ? ? bank->context_loss_count =
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bank->get_context_loss_count(bank->dev);
>>
>> ? ? ? ? bank->irq_base = irq_alloc_descs(-1, 0, bank->width, 0);
>> ? ? ? ? if (bank->irq_base < 0) {
>>
>
> Looks like you found the culprit. :) It does fix the problem.
So this looks similar to what NeilBrown <neilb@suse.de> reported in
another thread.
The reason was context_loss_count = 1 for GPIO BANK#0 which of course is in the
WKUP domain. In fact he tried out with the same fix. Anyways, we
should hear from
Kevin now whether it is feasible to fix the context_loss_count for the WKUP GPIO
bank or to put the workaround here in the gpio driver.
--
Tarun
>
> Franky
>

  reply	other threads:[~2012-06-29  4:07 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
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
2012-06-27  3:37 ` Kevin Hilman
2012-06-27  3:37   ` Kevin Hilman
2012-06-27  3:37   ` Kevin Hilman
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
2012-06-28 21:55         ` Jon Hunter
2012-06-28 21:55           ` Jon Hunter
2012-06-28 21:55           ` Jon Hunter
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
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
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 [this message]
2012-06-29  4:07                       ` DebBarma, Tarun Kanti
2012-06-29  4:07                       ` DebBarma, Tarun Kanti
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
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=CAC83ZvJJw-7Xt4Ey4_OT70D6MGHEfwURYVuj5wYTLe5oYiMuRw@mail.gmail.com \
    --to=tarun.kanti@ti.com \
    --cc=b-cousson@ti.com \
    --cc=frankyl@broadcom.com \
    --cc=grant.likely@secretlab.ca \
    --cc=jon-hunter@ti.com \
    --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=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.