diff options
author | Peter Tyser <ptyser@xes-inc.com> | 2010-04-12 22:28:13 -0500 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-04-13 09:13:25 +0200 |
commit | c6fb83d21729321426308c3acff2a3dfb20d250b (patch) | |
tree | 85b569582345fdd9361d8524df08e92251c84a59 /arch/blackfin/cpu/watchdog.c | |
parent | a4145534851bf74619cb373a942613a74547bb82 (diff) | |
download | u-boot-imx-c6fb83d21729321426308c3acff2a3dfb20d250b.zip u-boot-imx-c6fb83d21729321426308c3acff2a3dfb20d250b.tar.gz u-boot-imx-c6fb83d21729321426308c3acff2a3dfb20d250b.tar.bz2 |
blackfin: Move cpu/blackfin/* to arch/blackfin/cpu/*
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Diffstat (limited to 'arch/blackfin/cpu/watchdog.c')
-rw-r--r-- | arch/blackfin/cpu/watchdog.c | 23 |
1 files changed, 23 insertions, 0 deletions
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 <common.h> +#include <watchdog.h> +#include <asm/blackfin.h> + +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); +} |