* rtc-twl: catch22 in 2.6.37 and 2.6.38 when clock was never set
@ 2011-04-04 14:29 Alexander Holler
2011-04-05 10:14 ` Alexander Holler
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Holler @ 2011-04-04 14:29 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-omap
Hello,
it just happened here that the rechargeable backup battery for the RTC
on a TPS65950 run out off power, because of some days while the device
wasn't powered.
Afterwards I couldn't read or set the clock with hwclock using a kernel
2.6.37.n or 2.6.38.n.
I don't have a fix, but I think I've analyzed the problem and can offer
a (bad) workaround.
What happens is the following:
When trying to read or set the clock with hwclock, the driver (rtc-twl)
starts an alarm, but the irq for the alarm will never get called. The
result is that a select in hwclock times out (for both operations, read
or set).
Because I had this clock running before, I've got the idea to try one of
those old OMAP-kernels (2.6.32-angstrom) using the same userland.
And with that kernel I could set the clock.
Using 2.6.37 or 2.6.38 afterwards, hwclock did function again, both read
an set are working.
So it looks like there is a catch22 in kernels >=2.6.37 (I haven't
tested .33-.36):
When the clock was never set, the alarm(-irq) doesn't work, so hwclock
doesn't work, so one can't set the clock.
Regards,
Alexander Holler
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: rtc-twl: catch22 in 2.6.37 and 2.6.38 when clock was never set
2011-04-04 14:29 rtc-twl: catch22 in 2.6.37 and 2.6.38 when clock was never set Alexander Holler
@ 2011-04-05 10:14 ` Alexander Holler
2011-05-31 10:28 ` Tony Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Holler @ 2011-04-05 10:14 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-omap
Hello,
Am 04.04.2011 16:29, schrieb Alexander Holler:
> it just happened here that the rechargeable backup battery for the RTC
> on a TPS65950 run out off power, because of some days while the device
> wasn't powered.
>
> Afterwards I couldn't read or set the clock with hwclock using a kernel
> 2.6.37.n or 2.6.38.n.
>
> I don't have a fix, but I think I've analyzed the problem and can offer
> a (bad) workaround.
>
> What happens is the following:
>
> When trying to read or set the clock with hwclock, the driver (rtc-twl)
> starts an alarm, but the irq for the alarm will never get called. The
> result is that a select in hwclock times out (for both operations, read
> or set).
>
> Because I had this clock running before, I've got the idea to try one of
> those old OMAP-kernels (2.6.32-angstrom) using the same userland.
> And with that kernel I could set the clock.
> Using 2.6.37 or 2.6.38 afterwards, hwclock did function again, both read
> an set are working.
>
> So it looks like there is a catch22 in kernels >=2.6.37 (I haven't
> tested .33-.36):
>
> When the clock was never set, the alarm(-irq) doesn't work, so hwclock
> doesn't work, so one can't set the clock.
It turns out that the missing/wrong initialization of the msecure line
is the problem which disabled setting the clock. After doing that
through a quick hack, I could set the clock.
I'm using a BeagleBoard C4, but I can't find any msecure initialization
for other boards too.
What happened with those patches? E.g. those:
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg16125.html
Regards,
Alexander
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: rtc-twl: catch22 in 2.6.37 and 2.6.38 when clock was never set
2011-04-05 10:14 ` Alexander Holler
@ 2011-05-31 10:28 ` Tony Lindgren
0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2011-05-31 10:28 UTC (permalink / raw)
To: Alexander Holler; +Cc: linux-kernel, linux-omap
* Alexander Holler <holler@ahsoftware.de> [110405 03:11]:
> Hello,
>
> Am 04.04.2011 16:29, schrieb Alexander Holler:
>
> >it just happened here that the rechargeable backup battery for the RTC
> >on a TPS65950 run out off power, because of some days while the device
> >wasn't powered.
> >
> >Afterwards I couldn't read or set the clock with hwclock using a kernel
> >2.6.37.n or 2.6.38.n.
> >
> >I don't have a fix, but I think I've analyzed the problem and can offer
> >a (bad) workaround.
> >
> >What happens is the following:
> >
> >When trying to read or set the clock with hwclock, the driver (rtc-twl)
> >starts an alarm, but the irq for the alarm will never get called. The
> >result is that a select in hwclock times out (for both operations, read
> >or set).
> >
> >Because I had this clock running before, I've got the idea to try one of
> >those old OMAP-kernels (2.6.32-angstrom) using the same userland.
> >And with that kernel I could set the clock.
> >Using 2.6.37 or 2.6.38 afterwards, hwclock did function again, both read
> >an set are working.
> >
> >So it looks like there is a catch22 in kernels >=2.6.37 (I haven't
> >tested .33-.36):
> >
> >When the clock was never set, the alarm(-irq) doesn't work, so hwclock
> >doesn't work, so one can't set the clock.
>
> It turns out that the missing/wrong initialization of the msecure
> line is the problem which disabled setting the clock. After doing
> that through a quick hack, I could set the clock.
>
> I'm using a BeagleBoard C4, but I can't find any msecure
> initialization for other boards too.
>
> What happened with those patches? E.g. those:
>
> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg16125.html
Looks like these need reposting. Maybe worth doing generic omap
RTC init code though?
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-31 10:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-04 14:29 rtc-twl: catch22 in 2.6.37 and 2.6.38 when clock was never set Alexander Holler
2011-04-05 10:14 ` Alexander Holler
2011-05-31 10:28 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox