summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Estevam <festevam@gmail.com>2011-04-10 08:17:50 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-05-11 23:03:15 +0200
commitb73850f7644db4f4c68f6efda43928a5be5a8534 (patch)
tree4ac7db1f28888c095c6d9178160a8dce837b8189
parent24a514c44557601de52df3c8bc0ee789bef8714c (diff)
downloadu-boot-imx-b73850f7644db4f4c68f6efda43928a5be5a8534.zip
u-boot-imx-b73850f7644db4f4c68f6efda43928a5be5a8534.tar.gz
u-boot-imx-b73850f7644db4f4c68f6efda43928a5be5a8534.tar.bz2
MX31: mx31pdk: Add watchdog support
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
-rw-r--r--board/freescale/mx31pdk/mx31pdk.c16
-rw-r--r--include/configs/mx31pdk.h3
2 files changed, 19 insertions, 0 deletions
diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c
index 826fb4a..08addd2 100644
--- a/board/freescale/mx31pdk/mx31pdk.c
+++ b/board/freescale/mx31pdk/mx31pdk.c
@@ -28,9 +28,17 @@
#include <netdev.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.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 */
@@ -68,6 +76,14 @@ int board_init(void)
return 0;
}
+int board_late_init(void)
+{
+#ifdef CONFIG_HW_WATCHDOG
+ mxc_hw_watchdog_enable();
+#endif
+ return 0;
+}
+
int checkboard(void)
{
printf("Board: MX31PDK\n");
diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h
index d4c6d16..f5d3ee7 100644
--- a/include/configs/mx31pdk.h
+++ b/include/configs/mx31pdk.h
@@ -61,6 +61,7 @@
#define CONFIG_MXC_UART 1
#define CONFIG_SYS_MX31_UART1 1
+#define CONFIG_HW_WATCHDOG
#define CONFIG_HARD_SPI 1
#define CONFIG_MXC_SPI 1
@@ -98,6 +99,8 @@
*/
#undef CONFIG_CMD_IMLS
+#define BOARD_LATE_INIT
+
#define CONFIG_BOOTDELAY 3
#define CONFIG_EXTRA_ENV_SETTINGS \