ar7240: add watchdog support for carambola/skylab

This commit is contained in:
Alexander Couzens 2015-03-01 04:44:55 +01:00
parent 6944c3a4c1
commit 5931f93ba4
2 changed files with 14 additions and 0 deletions

View File

@ -5,6 +5,7 @@ LIB = lib$(BOARD).a
OBJS = $(BOARD).o flash.o ../common/ar7240_flash.o ../common/ar7240_s26_phy.o
OBJS += carambola_factory.o
OBJS += ../common/usb_boot.o
OBJS += ../common/watchdog.o
SOBJS = ../common/lowlevel_init.o
SOBJS += hornet_pll_init.o

View File

@ -0,0 +1,13 @@
#include <common.h>
#include <asm/addrspace.h>
#include <asm/types.h>
#include "ar7240_soc.h"
void hw_watchdog_reset(void)
{
/* around 15 seconds */
ar7240_reg_wr(AR7240_WATCHDOG_TMR, 0xfffffffful);
/* do a full chip reset */
ar7240_reg_wr(AR7240_WATCHDOG_TMR_CONTROL, 0x3);
}