Skip to content

Commit

Permalink
board: ge: bx50v3: Enable hardware watchdog
Browse files Browse the repository at this point in the history
Enable the hardware watchdog on bx50v3 to cause it to reset in the event
the board hangs.

Configure GPIO_9 pin as WDOG1_B so that a watchdog timeout results in a
full system reset.

The watchdog is used and reconfigured by systemd approximately 1.7 seconds
into boot. Adding a few seconds for U-Boot and a few more seconds as a
safety margin.

Note that the PCIe controller is _not_ put back into a safe state prior
to board reset.  This is a problem if board reset is implemented as CPU
reset.

Signed-off-by: Ian Ray <[email protected]>
Signed-off-by: Martyn Welch <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
  • Loading branch information
mwelchuk authored and sbabic committed Feb 4, 2018
1 parent 2850645 commit 6d65649
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions board/ge/bx50v3/bx50v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@ static iomux_v3_cfg_t const misc_pads[] = {
MX6_PAD_EIM_OE__GPIO2_IO25 | MUX_PAD_CTRL(NC_PAD_CTRL),
MX6_PAD_EIM_BCLK__GPIO6_IO31 | MUX_PAD_CTRL(NC_PAD_CTRL),
MX6_PAD_GPIO_1__GPIO1_IO01 | MUX_PAD_CTRL(NC_PAD_CTRL),
MX6_PAD_GPIO_9__WDOG1_B | MUX_PAD_CTRL(NC_PAD_CTRL),
};
#define SUS_S3_OUT IMX_GPIO_NR(4, 11)
#define WIFI_EN IMX_GPIO_NR(6, 14)
Expand Down
4 changes: 4 additions & 0 deletions include/configs/ge_bx50v3.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
#define CONFIG_REVISION_TAG
#define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M)

#define CONFIG_HW_WATCHDOG
#define CONFIG_IMX_WATCHDOG
#define CONFIG_WATCHDOG_TIMEOUT_MSECS 6000

#define CONFIG_LAST_STAGE_INIT

#define CONFIG_MXC_GPIO
Expand Down

0 comments on commit 6d65649

Please sign in to comment.