From: David Brownell <david-b@pacbell.net>
To: Tony Lindgren <tony@atomide.com>
Cc: Felipe Balbi <me@felipebalbi.com>,
"Aguirre Rodriguez, Sergio Alberto" <saaguirre@ti.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH] twl4030: Fix pwrirq by making sure the module is responding (Re: kernel oops for 3430sdp)
Date: Wed, 8 Oct 2008 11:05:17 -0700 [thread overview]
Message-ID: <200810081105.17689.david-b@pacbell.net> (raw)
In-Reply-To: <20081008145517.GJ30831@atomide.com>
On Wednesday 08 October 2008, Tony Lindgren wrote:
> I suspect that twl is not yet initialized for pwrirq handling at this
> point. At least this patch seems to help,
Did you verify that the value you read isn't 0xff? Or does the
issue seem to be the mere attempt to read a register?
I have a hard time seeing the root cause be anything other than
problems in i2c-omap, since the timeouts appear at various other
places too.
> no idea on what registers
> we should check though.. Anybody got ideas on what needs to be checked
> for pwrirq?
Well, there does seem to be an issue where the "pending IRQ" mechanism
can leave a PWRIRQ.PWRON interrupt pending sometimes. If you see a
bunch of alarming-but-harmless boot messages like
TWL4030 module irq 373 is disabled but can't be masked!
before pwrirq registers, that seems to be the issue. A debug hack I
applied (appended) reported that the mask (IMR) was 0xff but the IRQ
was still being raised ... when pwrirq registered itself, the stream
of those messages stopped. (Or, when this hack dumped the status and
thus kicked in clear-on-read ...)
- Dave
=============================
---
drivers/mfd/twl4030-core.c | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
--- a/drivers/mfd/twl4030-core.c
+++ b/drivers/mfd/twl4030-core.c
@@ -574,6 +574,36 @@ static int twl4030_irq_thread(void *data
continue;
}
+ /* power irq before handler registered? */
+ if ((pih_isr & BIT(5)) && irq_desc[twl4030_irq_base + 5].depth) {
+ u8 buf[8];
+ int status;
+ int retries = 3;
+
+ while (retries--) {
+ status = twl4030_i2c_read(TWL4030_MODULE_INT,
+ buf, 0, sizeof buf);
+ if (status == 0) {
+ pr_crit("... PWR: "
+ "%02x.%02x/%02x.%02x "
+ "%02x; "
+ "%02x.%02x, "
+ "%02x "
+ "\n",
+ /* {ISR,IMR}{1,2} */
+ buf[0], buf[1], buf[2], buf[3],
+ /* SIH */
+ buf[4],
+ /* EDR */
+ buf[5], buf[6],
+ /* CTRL */
+ buf[7]);
+ } else
+ pr_crit("... read PWR --> %d\n",
+ status);
+ }
+ }
+
/* these handlers deal with the relevant SIH irq status */
local_irq_disable();
for (module_irq = twl4030_irq_base;
next prev parent reply other threads:[~2008-10-08 18:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-07 18:07 kernel oops for 3430sdp Aguirre Rodriguez, Sergio Alberto
2008-10-07 18:28 ` David Brownell
2008-10-07 19:29 ` Aguirre Rodriguez, Sergio Alberto
2008-10-07 20:09 ` Felipe Balbi
2008-10-08 14:55 ` [PATCH] twl4030: Fix pwrirq by making sure the module is responding (Re: kernel oops for 3430sdp) Tony Lindgren
2008-10-08 18:05 ` David Brownell [this message]
2008-10-08 18:38 ` Tony Lindgren
2008-10-08 19:19 ` David Brownell
2008-10-08 19:36 ` David Brownell
2008-10-08 21:36 ` [PATCH 2.6.27-rc9-omap] i2c-omap: timeouts begone David Brownell
2008-10-08 21:54 ` Felipe Balbi
2008-10-08 22:35 ` Woodruff, Richard
2008-10-10 11:36 ` Paul Walmsley
2008-10-08 23:38 ` Woodruff, Richard
2008-10-09 1:09 ` David Brownell
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=200810081105.17689.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=linux-omap@vger.kernel.org \
--cc=me@felipebalbi.com \
--cc=saaguirre@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox