From: NeilBrown <neilb@suse.de>
To: Paul Walmsley <paul@pwsan.com>
Cc: Joe Woodward <jw@terrafix.co.uk>,
khilman@ti.com, t-kristo@ti.com, govindraj.raja@ti.com,
linux-omap@vger.kernel.org
Subject: Re: DSS2/PM on 3.2 broken?
Date: Wed, 18 Jan 2012 08:24:10 +1100 [thread overview]
Message-ID: <20120118082410.48262777@notabene.brown> (raw)
In-Reply-To: <20120114100915.01c96727@notabene.brown>
[-- Attachment #1: Type: text/plain, Size: 3400 bytes --]
On Sat, 14 Jan 2012 10:09:15 +1100 NeilBrown <neilb@suse.de> wrote:
> On Fri, 13 Jan 2012 04:31:37 -0700 (MST) Paul Walmsley <paul@pwsan.com> wrote:
>
> > On Fri, 13 Jan 2012, NeilBrown wrote:
> >
> > > Also, the HDQ access to the battery 'fuel gauge' is working fine, so
> > > presumably that gets disturbed by one of the lower power states (3,4,5).
> > > I guess it is 4,5,6 when CORE goes to RET or OFF. So we need some way for
> > > HDQ to say "I'm busy" just like UART can. omap_hdq_can_sleep() ???
> > > There must be a cleaner way...
> >
> > The first thing to try is the HDQ runtime PM conversion series that was
> > sent separately. Maybe let us know if that fixes the problem.
>
> Not completely - but I'm still exploring.
>
>
I've finished exploring (for now) and am seriously stumped. Maybe you can
help...
I modified your patch so that hdq uses autosuspend - because it seemed like a
good idea and ends up providing slightly more informative failure modes.
The normal behaviour of the bq27000 driver is to request lots of values in
quick succession. So using autosuspend (with 100ms timeout) means that we
have only one pm_resume and one pm_suspend for each batch of requests which
at least reduces the noise.
I have added an omap_hdq_can_sleep() function which only succeeds if the hdq
device is run-time suspended, and call it in the same place that
omap_uart_can_sleep is called, to ensure the core never goes to a lower state
while he hdq is active. I've double-checked that this really works.
HDQ all works find normally, but then normally CORE stays ON because the UART
keeps it on.
If I tell the UARTs they can sleep (by setting sleep_timeout) and then access
the bq27000 via HDQ it doesn't work properly.
The normal sequence is that it resets the HDQ and sends a 'BREAK' signal
(possibly not really necessary) for which we get a TIMEOUT interrupt.
Then
write address - get TX interrupt - wait a bit - get RX interrupt - read byte.
We normally get the TIMEOUT interrupt and often get the first TX and then RX
interrupts but then the device goes silent. No more interrupts come in, and
the status register (which shows interrupt source) reads as zero.
Occasionally I have seen maybe half a dozen successful reads before it goes
silent, but usually it is zero or 1.
It is as though something is timing out and going to sleep. A clock
auto-sleeping? Seems unlikely.
If I set all the UART sleep_timeout values to 0 to keep CORE always ON, the
problem doesn't fix itself. Whatever got turned off stays off.
Once it starts failing, it never works again until a reboot.
Could we be caching something in memory which we think is on, but due to CORE
going into RET (or maybe OFF), the thing is now off and we never bother to
reset it because the cached value is 'on' ?? I'm wondering about
_sysc_cache, but I haven't looked very deeply into it.
Any other ideas?
Oh - another thing.
Sometimes during early boot I get:
[ 0.158447] omap_hwmod: usbtll_fck: missing clockdomain for usbtll_fck.
[ 0.176879] omap_hwmod: hdq: softreset failed (waited 10000 usec)
At the same time the UART seem to hiccup and my USB-Serial port loses track
and doesn't see any more characters until I close and re-open.
Could that be related? Any idea what it means?
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2012-01-17 21:24 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-09 12:46 DSS2/PM on 3.2 broken? Joe Woodward
2012-01-09 21:08 ` NeilBrown
2012-01-10 9:58 ` Joe Woodward
2012-01-11 13:43 ` Paul Walmsley
2012-01-11 14:22 ` Archit
2012-01-11 15:15 ` Joe Woodward
2012-01-11 15:52 ` Archit
2012-01-11 16:13 ` Joe Woodward
2012-01-11 16:54 ` Archit
2012-01-12 9:28 ` Tomi Valkeinen
2012-01-12 9:30 ` Tomi Valkeinen
2012-01-12 9:51 ` Tomi Valkeinen
2012-01-11 22:59 ` NeilBrown
2012-01-13 10:05 ` Paul Walmsley
2012-01-13 11:20 ` NeilBrown
2012-01-13 11:31 ` Paul Walmsley
2012-01-13 23:09 ` NeilBrown
2012-01-13 23:35 ` Paul Walmsley
2012-01-17 21:24 ` NeilBrown [this message]
2012-01-22 0:07 ` Paul Walmsley
2012-01-22 11:30 ` NeilBrown
2012-01-24 10:37 ` OMAP HDQ: was " NeilBrown
2012-01-26 14:19 ` Paul Walmsley
2012-01-27 22:35 ` NeilBrown
2012-01-27 22:58 ` Paul Walmsley
2012-01-28 0:40 ` NeilBrown
2012-01-28 6:02 ` Paul Walmsley
2012-02-01 7:51 ` NeilBrown
2012-02-01 18:36 ` Paul Walmsley
2012-01-18 7:13 ` Tomi Valkeinen
2012-01-18 11:15 ` NeilBrown
2012-01-18 11:42 ` Tomi Valkeinen
2012-01-18 20:30 ` NeilBrown
2012-01-19 10:17 ` Joe Woodward
2012-01-19 10:40 ` Tomi Valkeinen
2012-01-19 11:29 ` Joe Woodward
2012-01-19 11:36 ` Tomi Valkeinen
2012-01-19 12:21 ` Joe Woodward
2012-01-19 14:52 ` Tomi Valkeinen
2012-01-19 19:37 ` Kevin Hilman
2012-01-19 21:05 ` NeilBrown
2012-01-20 0:22 ` Kevin Hilman
2012-01-21 12:12 ` NeilBrown
2012-01-23 22:11 ` Kevin Hilman
2012-01-25 0:32 ` NeilBrown
2012-01-13 11:34 ` Govindraj
2012-01-13 13:23 ` Paul Walmsley
2012-01-13 19:21 ` Kevin Hilman
2012-01-13 22:37 ` Kevin Hilman
2012-01-13 23:06 ` Paul Walmsley
2012-01-13 23:34 ` Paul Walmsley
2012-01-14 1:17 ` NeilBrown
2012-01-14 1:28 ` Paul Walmsley
2012-01-13 23:39 ` Paul Walmsley
2012-01-13 11:19 ` Paul Walmsley
2012-01-11 13:32 ` Paul Walmsley
2012-01-12 16:42 ` Tomi Valkeinen
2012-01-12 22:40 ` Kevin Hilman
2012-01-13 5:29 ` Tomi Valkeinen
2012-01-13 19:30 ` Kevin Hilman
2012-01-16 11:11 ` Tomi Valkeinen
2012-01-19 19:24 ` Kevin Hilman
2012-01-20 7:16 ` Tomi Valkeinen
2012-01-20 18:06 ` Kevin Hilman
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=20120118082410.48262777@notabene.brown \
--to=neilb@suse.de \
--cc=govindraj.raja@ti.com \
--cc=jw@terrafix.co.uk \
--cc=khilman@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=t-kristo@ti.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;
as well as URLs for NNTP newsgroup(s).