public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] MX31: mx31pdk: Add watchdog support
@ 2011-03-09 16:35 Fabio Estevam
  2011-03-09 16:35 ` [U-Boot] [PATCH 2/2] MX31: mx31pdk: Print the cause of reset Fabio Estevam
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Fabio Estevam @ 2011-03-09 16:35 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/mx31pdk/mx31pdk.c |   16 ++++++++++++++++
 include/configs/mx31pdk.h         |    1 +
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c
index a9f0fb4..4a5d3ef 100644
--- a/board/freescale/mx31pdk/mx31pdk.c
+++ b/board/freescale/mx31pdk/mx31pdk.c
@@ -28,9 +28,17 @@
 #include <netdev.h>
 #include <asm/arch/mx31.h>
 #include <asm/arch/mx31-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: i.MX31 MAX PDK (3DS)\n");
diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h
index 86c758f..1f1de46 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
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-04-27 12:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-09 16:35 [U-Boot] [PATCH 1/2] MX31: mx31pdk: Add watchdog support Fabio Estevam
2011-03-09 16:35 ` [U-Boot] [PATCH 2/2] MX31: mx31pdk: Print the cause of reset Fabio Estevam
2011-03-12 13:26   ` Anatolij Gustschin
2011-04-10 15:45 ` [U-Boot] [PATCH 1/2] MX31: mx31pdk: Add watchdog support Stefano Babic
2011-04-26  5:45 ` Stefano Babic
2011-04-27 11:38   ` Detlev Zundel
2011-04-27 12:37     ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox