MX31: qong: add watchdog
authorStefano Babic <sbabic@denx.de>
Wed, 2 Feb 2011 00:49:37 +0000 (00:49 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Wed, 27 Apr 2011 17:38:04 +0000 (19:38 +0200)
Signed-off-by: Stefano Babic <sbabic@denx.de>
board/davedenx/qong/qong.c
include/configs/qong.h

index 8a81cfc68615617b63c55ef1de496d3a1d9c9c0c..3ace6cdfff54878a5792da9bfec3477fe72b3450 100644 (file)
 #include <fsl_pmic.h>
 #include <mxc_gpio.h>
 #include "qong_fpga.h"
+#include <watchdog.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#ifdef CONFIG_HW_WATCHDOG
+void hw_watchdog_reset(void)
+{
+       mxc_hw_watchdog_reset();
+}
+#endif
+
 int dram_init (void)
 {
        /* dram_init must store complete ramsize in gd->ram_size */
@@ -202,6 +210,10 @@ int board_late_init(void)
        pmic_reg_write(REG_POWER_CTL0, val | COINCHEN);
        pmic_reg_write(REG_INT_STATUS1, RTCRSTI);
 
+#ifdef CONFIG_HW_WATCHDOG
+       mxc_hw_watchdog_enable();
+#endif
+
        return 0;
 }
 
index e2f7a5e9f9fc13f5e61b3024bdb5dadc63ee97ff..299db5eef97e8919dfc79111f2847ad70f2abbfc 100644 (file)
@@ -52,6 +52,7 @@
 #define CONFIG_SYS_MX31_UART1  1
 
 #define CONFIG_MXC_GPIO
+#define CONFIG_HW_WATCHDOG
 
 #define CONFIG_MXC_SPI
 #define CONFIG_DEFAULT_SPI_BUS 1