3 #include <asm/arch/regs_global.h>
4 #include <asm/arch/bits.h>
5 #include <linux/types.h>
6 #include <asm/arch/regs_wdg.h>
8 void start_watchdog(uint32_t init_time_ms)
12 void stop_watchdog(void)
15 //Enable watchdog programming
16 REG32(GR_GEN0) |=GEN0_WDG_EN;
17 REG32(GR_CLK_EN) &= ~0x04;
18 //Unlock watchdog load rigiter
19 REG32(WDG_LOCK) = 0x1ACCE551;
20 //clear watchdog interrupt
21 REG32(WDG_INT_CLR) = 1;
23 //Disable watchdog timer clock and interrupt mode
24 REG32(WDG_CTL) &= ~(BIT_1 | BIT_0);
26 REG32(WDG_LOCK) = 0x12345678;
27 //Disable watchdog programming
28 REG32(GR_GEN0) &= ~GEN0_WDG_EN;
31 void init_watchdog(void)
36 void feed_watchdog(void)
40 void load_watchdog(uint32_t time_ms)
43 void hw_watchdog_reset(void)