source: SVN/rincon/u-boot/cpu/blackfin/watchdog.c @ 55

Last change on this file since 55 was 55, checked in by Tim Harvey, 22 months ago

rincon: added latest u-boot source

restored form server backup

Signed-off-by: Tim Harvey <tharvey@…>

File size: 456 bytes
Line 
1/*
2 * watchdog.c - driver for Blackfin on-chip watchdog
3 *
4 * Copyright (c) 2007-2008 Analog Devices Inc.
5 *
6 * Licensed under the GPL-2 or later.
7 */
8
9#include <common.h>
10#include <watchdog.h>
11#include <asm/blackfin.h>
12
13#ifdef CONFIG_HW_WATCHDOG
14void hw_watchdog_reset(void)
15{
16        bfin_write_WDOG_STAT(0);
17}
18
19void hw_watchdog_init(void)
20{
21        bfin_write_WDOG_CNT(5 * get_sclk());    /* 5 second timeout */
22        hw_watchdog_reset();
23        bfin_write_WDOG_CTL(0x0);
24}
25#endif
Note: See TracBrowser for help on using the repository browser.