From c6fb83d21729321426308c3acff2a3dfb20d250b Mon Sep 17 00:00:00 2001 From: Peter Tyser Date: Mon, 12 Apr 2010 22:28:13 -0500 Subject: blackfin: Move cpu/blackfin/* to arch/blackfin/cpu/* Signed-off-by: Peter Tyser --- arch/blackfin/cpu/watchdog.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 arch/blackfin/cpu/watchdog.c (limited to 'arch/blackfin/cpu/watchdog.c') diff --git a/arch/blackfin/cpu/watchdog.c b/arch/blackfin/cpu/watchdog.c new file mode 100644 index 0000000..1886bda --- /dev/null +++ b/arch/blackfin/cpu/watchdog.c @@ -0,0 +1,23 @@ +/* + * watchdog.c - driver for Blackfin on-chip watchdog + * + * Copyright (c) 2007-2009 Analog Devices Inc. + * + * Licensed under the GPL-2 or later. + */ + +#include +#include +#include + +void hw_watchdog_reset(void) +{ + bfin_write_WDOG_STAT(0); +} + +void hw_watchdog_init(void) +{ + bfin_write_WDOG_CNT(5 * get_sclk()); /* 5 second timeout */ + hw_watchdog_reset(); + bfin_write_WDOG_CTL(0x0); +} -- cgit v1.1