2 * watchdog.c - driver for Blackfin on-chip watchdog
4 * Copyright (c) 2007-2009 Analog Devices Inc.
6 * Licensed under the GPL-2 or later.
11 #include <asm/blackfin.h>
12 #include <asm/clock.h>
13 #include <asm/mach-common/bits/watchdog.h>
15 void hw_watchdog_reset(void)
17 bfin_write_WDOG_STAT(0);
20 void hw_watchdog_init(void)
22 bfin_write_WDOG_CTL(WDDIS
);
24 bfin_write_WDOG_CNT(CONFIG_WATCHDOG_TIMEOUT_MSECS
/ 1000 * get_sclk());
26 bfin_write_WDOG_CTL(WDEN
);