sysmobts_v2: Enable the HW watchdog in the bootloader
We want to deal/detect events like uboot getting stuck in the ubi/ubifs code. Enable the watchdog feature of u-boot. We need to start the watchdog once by ourselves and then trigger the Davinci one. Once we have set the 60s it can not be changed later on. This requires an updated kernel as well. Fixes: SYS#374
This commit is contained in:
parent
0a964871c7
commit
648cc337cd
|
@ -32,6 +32,7 @@
|
|||
#include <i2c.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/davinci_misc.h>
|
||||
#include <asm/arch/timer_defs.h>
|
||||
#include <asm/gpio.h>
|
||||
|
||||
#define DAVINCI_PLLM (0x01C40910) /* PLL 1 Multiplier */
|
||||
|
@ -139,6 +140,9 @@ int board_init(void)
|
|||
|
||||
lpsc_on(DAVINCI_LPSC_TIMER1);
|
||||
timer_init();
|
||||
#ifdef CONFIG_HW_WATCHDOG
|
||||
davinci_hw_watchdog_enable();
|
||||
#endif
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
@ -170,3 +174,9 @@ int misc_init_r(void)
|
|||
return(0);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HW_WATCHDOG
|
||||
void hw_watchdog_reset(void)
|
||||
{
|
||||
davinci_hw_watchdog_reset();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -203,5 +203,11 @@
|
|||
#define CONFIG_CLOCKS
|
||||
#endif
|
||||
|
||||
/* Enable the watchdog */
|
||||
#define CONFIG_HW_WATCHDOG
|
||||
#define CONFIG_SYS_WDTTIMERBASE 0x01c21C00
|
||||
#define CONFIG_SYS_WDT_PERIOD_LOW 0x608f3d00 /* 60s */
|
||||
#define CONFIG_SYS_WDT_PERIOD_HIGH 0x0
|
||||
|
||||
#endif /* __CONFIG_H */
|
||||
|
||||
|
|
Loading…
Reference in New Issue