[U-Boot] Watchdog timer and booting in Linux kernel

Sachin Rane SRane at alphion.com
Tue Jan 27 17:11:51 CET 2009


Hi,
 
I am using u-boot and linux kernel on our custom PPC440gx board.
The board was booting without any issue.
 
The board started rebooting while booting in linux kernel after enabled
the watchdog timer in u-boot by defining 'CONFIG_WATCHDOG'.
I have observed that the board gets reset while booting in Linux.
 
I followed the discussion available on: 
http://osdir.com/ml/boot-loaders.u-boot/2001-07/msg00121.html
 
I modified the code given in above link to run it on ppc440gx processor.
I have written a function 'reset_watchdog()' in kernel which will reset
the Watchdog Timer (same as available in u-boot) and called in
'timer_interrupt()' of /arch/ppc/kernel/time.c' But the function is not
giving any effect. The board is still getting rebooted.
 
 
8<-------------------------arch/ppc/kernel/time.c
------------------------------------
 
unsigned long sched_watchdog_counter = 0;
 
void reset_watchdog()
{
 unsigned long val = 0;
 char buff[20];
 local_irq_disable();
 val = mfspr(0x150);
 mtspr(0x150, !(val) | 0x40000000);
 val = mfspr(0x150);
 sprintf(buff,"val = %x\n",val);
 local_irq_enable();
}
 
 
void timer_interrupt(struct pt_regs * regs)
{
    :
    :
    :
  reset_watchdog();
 
 irq_exit();
}
 
8<-------------------------arch/ppc/kernel/time.c
------------------------------------
 
 
 
Can you help me to boot the board in Linux kernel  with watchdog enabled
in u-boot?
 
Regards,
Sachin
 


More information about the U-Boot mailing list