Commit b73850f7644db4f4c68f6efda43928a5be5a8534
Committed by
Albert ARIBAUD
1 parent
24a514c445
Exists in
master
and in
54 other branches
MX31: mx31pdk: Add watchdog support
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Showing 2 changed files with 19 additions and 0 deletions Side-by-side Diff
board/freescale/mx31pdk/mx31pdk.c
... | ... | @@ -28,9 +28,17 @@ |
28 | 28 | #include <netdev.h> |
29 | 29 | #include <asm/arch/clock.h> |
30 | 30 | #include <asm/arch/imx-regs.h> |
31 | +#include <watchdog.h> | |
31 | 32 | |
32 | 33 | DECLARE_GLOBAL_DATA_PTR; |
33 | 34 | |
35 | +#ifdef CONFIG_HW_WATCHDOG | |
36 | +void hw_watchdog_reset(void) | |
37 | +{ | |
38 | + mxc_hw_watchdog_reset(); | |
39 | +} | |
40 | +#endif | |
41 | + | |
34 | 42 | int dram_init(void) |
35 | 43 | { |
36 | 44 | /* dram_init must store complete ramsize in gd->ram_size */ |
... | ... | @@ -65,6 +73,14 @@ |
65 | 73 | /* adress of boot parameters */ |
66 | 74 | gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100; |
67 | 75 | |
76 | + return 0; | |
77 | +} | |
78 | + | |
79 | +int board_late_init(void) | |
80 | +{ | |
81 | +#ifdef CONFIG_HW_WATCHDOG | |
82 | + mxc_hw_watchdog_enable(); | |
83 | +#endif | |
68 | 84 | return 0; |
69 | 85 | } |
70 | 86 |
include/configs/mx31pdk.h
... | ... | @@ -61,6 +61,7 @@ |
61 | 61 | |
62 | 62 | #define CONFIG_MXC_UART 1 |
63 | 63 | #define CONFIG_SYS_MX31_UART1 1 |
64 | +#define CONFIG_HW_WATCHDOG | |
64 | 65 | |
65 | 66 | #define CONFIG_HARD_SPI 1 |
66 | 67 | #define CONFIG_MXC_SPI 1 |
... | ... | @@ -97,6 +98,8 @@ |
97 | 98 | * that CFG_NO_FLASH is undefined). |
98 | 99 | */ |
99 | 100 | #undef CONFIG_CMD_IMLS |
101 | + | |
102 | +#define BOARD_LATE_INIT | |
100 | 103 | |
101 | 104 | #define CONFIG_BOOTDELAY 3 |
102 | 105 |