mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-22 20:58:22 +00:00
udoo_neo: Convert to watchdog driver model
Commit 68dcbdd594
("ARM: imx: Add weak default reset_cpu()") caused
the 'reset' command in U-Boot to not cause a board reset.
Fix it by switching to the watchdog driver model via sysreset, which
is the preferred method for implementing the watchdog reset.
With the watchdog driver model in place, it is no longer needed
to have board code to initialize the watchdog, so remove
its related board code.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
This commit is contained in:
parent
d509c48b65
commit
5e4f16bdb3
3 changed files with 15 additions and 16 deletions
|
@ -1,5 +1,13 @@
|
|||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
/ {
|
||||
wdt-reboot {
|
||||
compatible = "wdt-reboot";
|
||||
wdt = <&wdog1>;
|
||||
bootph-pre-ram;
|
||||
};
|
||||
};
|
||||
|
||||
&soc {
|
||||
bootph-all;
|
||||
};
|
||||
|
@ -15,3 +23,7 @@
|
|||
&uart1 {
|
||||
bootph-all;
|
||||
};
|
||||
|
||||
&wdog1 {
|
||||
bootph-pre-ram;
|
||||
};
|
||||
|
|
|
@ -57,9 +57,6 @@ enum {
|
|||
#define ENET_RX_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \
|
||||
PAD_CTL_SPEED_MED | PAD_CTL_SRE_FAST)
|
||||
|
||||
#define WDOG_PAD_CTRL (PAD_CTL_PUE | PAD_CTL_PKE | PAD_CTL_SPEED_MED | \
|
||||
PAD_CTL_DSE_40ohm)
|
||||
|
||||
#define BOARD_DETECT_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \
|
||||
PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \
|
||||
PAD_CTL_DSE_34ohm | PAD_CTL_HYS | PAD_CTL_SRE_FAST)
|
||||
|
@ -113,10 +110,6 @@ static iomux_v3_cfg_t const phy_control_pads[] = {
|
|||
MUX_PAD_CTRL(ENET_CLK_PAD_CTRL),
|
||||
};
|
||||
|
||||
static iomux_v3_cfg_t const wdog_b_pad = {
|
||||
MX6_PAD_GPIO1_IO13__GPIO1_IO_13 | MUX_PAD_CTRL(WDOG_PAD_CTRL),
|
||||
};
|
||||
|
||||
static iomux_v3_cfg_t const peri_3v3_pads[] = {
|
||||
MX6_PAD_QSPI1A_DATA0__GPIO4_IO_16 | MUX_PAD_CTRL(NO_PAD_CTRL),
|
||||
};
|
||||
|
@ -148,15 +141,6 @@ int board_init(void)
|
|||
/* Address of boot parameters */
|
||||
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
|
||||
|
||||
/*
|
||||
* Because kernel set WDOG_B mux before pad with the commone pinctrl
|
||||
* framwork now and wdog reset will be triggered once set WDOG_B mux
|
||||
* with default pad setting, we set pad setting here to workaround this.
|
||||
* Since imx_iomux_v3_setup_pad also set mux before pad setting, we set
|
||||
* as GPIO mux firstly here to workaround it.
|
||||
*/
|
||||
imx_iomux_v3_setup_pad(wdog_b_pad);
|
||||
|
||||
/* Enable PERI_3V3, which is used by SD2, ENET, LVDS, BT */
|
||||
imx_iomux_v3_setup_multiple_pads(peri_3v3_pads,
|
||||
ARRAY_SIZE(peri_3v3_pads));
|
||||
|
|
|
@ -61,5 +61,8 @@ CONFIG_DM_REGULATOR_FIXED=y
|
|||
CONFIG_DM_REGULATOR_ANATOP=y
|
||||
CONFIG_DM_SERIAL=y
|
||||
CONFIG_MXC_UART=y
|
||||
CONFIG_SYSRESET=y
|
||||
CONFIG_SYSRESET_WATCHDOG=y
|
||||
CONFIG_IMX_THERMAL=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_IMX_WATCHDOG=y
|
||||
|
|
Loading…
Add table
Reference in a new issue