Book-E watchdog driver questions

Mike Nuss mikenuss at
Fri Jan 4 01:46:56 EST 2008

On Sep 25, 2007 1:18 PM, Mike Nuss <mikenuss at> wrote:
> > > Is there a reason that booke_wdt.c does not specify a MODULE_LICENSE?
> > >> From the copyright notice at the top it appears to be GPL. As
> > >> written,
> > > it taints the kernel.
> >
> > Odd, no reason.  I'll submit a patch for that.
> >
> > > Also, if I test out the driver by killing my process that's doing the
> > > pinging, I get a kernel panic:
> >
> > Its been a while since i've tried this.  I'll try it out and see what
> > happens.

The kernel panic was caused because TCR: WIE was set. This bit should
not be set, because it causes the timer to generate an interrupt that
the kernel does not handle.

> I also found that GETBOOTSTATUS returns 0 after the reboot. Looking at
> the source code I found the comment "XXX: something is clearing TSR" -
> I take that to mean that the register is being cleared by something
> before the module tries to read it? In my case U-Boot may be clearing
> that - I can take a look.

It turns out that the status bits in TSR are undefined at poweron
reset. Boards require external logic to detect POR - this is described
in AMCC's app note for the WDT. Because of this, U-Boot clears TSR
early on in the standard 4xx firmware (in start.S). To use TSR to
detect a watchdog reset, U-Boot must be modified to check that logic
and only clear the bits at POR. Those bits will be preserved until the
kernel driver looks at them, or until the system is powered off. So
the driver is correct here, but the comment should be updated to
explain why the GETBOOTSTATUS value may not be meaningful - it
requires additional hardware and firmware support.

I can submit a patch for these issues if you like.


More information about the Linuxppc-dev mailing list