From 0f21f98dd4d6bff72df4eeaca4163779896cb336 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 22 Apr 2013 11:23:16 +0200 Subject: watchdog: Add support for Xilinx Microblaze watchdog Watchdog can be used on Microblaze, PPC and Zynq hw designs. Signed-off-by: Michal Simek Reviewed-by: Tom Rini --- board/xilinx/microblaze-generic/microblaze-generic.c | 4 ++++ board/xilinx/microblaze-generic/xparameters.h | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'board/xilinx') diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index 1af0b86..befbb3a 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -39,6 +39,10 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) ++(*((unsigned long *)(CONFIG_SYS_GPIO_0_ADDR))); #endif +#ifdef CONFIG_XILINX_TB_WATCHDOG + hw_watchdog_disable(); +#endif + puts ("Reseting board\n"); __asm__ __volatile__ (" mts rmsr, r0;" \ "bra r0"); diff --git a/board/xilinx/microblaze-generic/xparameters.h b/board/xilinx/microblaze-generic/xparameters.h index 50a82d9..c846f97 100644 --- a/board/xilinx/microblaze-generic/xparameters.h +++ b/board/xilinx/microblaze-generic/xparameters.h @@ -77,3 +77,7 @@ #define XILINX_LLTEMAC_SDMA_CTRL_BASEADDR 0x42000180 #define XILINX_LLTEMAC_BASEADDR1 0x44200000 #define XILINX_LLTEMAC_FIFO_BASEADDR1 0x42100000 + +/* Watchdog IP is wxi_timebase_wdt_0 */ +#define XILINX_WATCHDOG_BASEADDR 0x50000000 +#define XILINX_WATCHDOG_IRQ 1 -- cgit v1.1