[PATCH] powerpc: Fix Book-E watchdog timer interval setting

Matthias Fuchs matthias.fuchs at esd-electronics.com
Fri Aug 8 00:04:07 EST 2008


Sure,

the former line:

 mtspr(SPRN_TCR, (mfspr(SPRN_TCR)&~WDTP(0))|WDTP(booke_wdt_period));

tries to mask the wdt interval period bits by and'ing with ~WDTP(0) which
is 0xffffffff. So no bits are cleared and or'ing a new value does not change anything.
The default interval is '3' which is the maximum, so any attempt to set a new
interval keeps the former '3'.

The patch correctly masks the period bits in SPRN_TCR before writing the new value.

That's all.

Matthias

On Thursday 07 August 2008 15:19, Kumar Gala wrote:
> 
> On Aug 7, 2008, at 7:48 AM, Matthias Fuchs wrote:
> 
> > This patch fixes the setting of the Book-E watchdog timer interval  
> > setup
> > on initialization and by ioctl().
> >
> > Tested on PPC440EPx sequoia evaluation board.
> >
> > Signed-off-by: Matthias Fuchs <matthias.fuchs at esd-electronics.com>
> > ---
> > drivers/watchdog/booke_wdt.c |    6 +++++-
> > 1 files changed, 5 insertions(+), 1 deletions(-)
> 
> can you be more explicit about what the bug was.
> 
> - k
> 
> 




More information about the Linuxppc-dev mailing list