Commit 73e73c29 authored by Peng Fan's avatar Peng Fan

MLK-16773 imx8m: spl: implement wdog reset

Implement wdog reset in SPL stage.
Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
parent 3b9d581b
......@@ -148,15 +148,6 @@ void set_wdog_reset(struct wdog_regs *wdog)
writew(reg, &wdog->wcr);
}
#ifdef CONFIG_SPL_BUILD
void reset_cpu(ulong addr)
{
/* TODO */
printf("%s\n", __func__);
while (1);
}
#endif
static struct mm_region imx8m_mem_map[] = {
{
.virt = 0x0UL,
......
......@@ -67,6 +67,12 @@ static iomux_v3_cfg_t const uart_pads[] = {
int board_early_init_f(void)
{
struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
set_wdog_reset(wdog);
imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
return 0;
......@@ -223,12 +229,6 @@ int board_mmc_get_env_dev(int devno)
int board_late_init(void)
{
struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
set_wdog_reset(wdog);
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
setenv("board_name", "EVK");
setenv("board_rev", "iMX8MQ");
......
......@@ -20,6 +20,7 @@
#ifdef CONFIG_SPL_BUILD
/*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/
#define CONFIG_SPL_WATCHDOG_SUPPORT
#define CONFIG_SPL_POWER_SUPPORT
#define CONFIG_SPL_I2C_SUPPORT
#define CONFIG_SPL_BOARD_INIT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment