Commit fa65b0a9 authored by Ye Li's avatar Ye Li
Browse files

MLK-16903 imx8m: Add reset_cpu to use external WDOG_B for reset

The WDT is enabled for WDOG in current u-boot reset, this cause external WDOG_B
and internal WDOG_RESET_B_DEB both asserted for timeout. To avoid any unpredictable
behavior, change to use the WDOG_B only.
Signed-off-by: default avatarYe Li <>
Reviewed-by: default avatarPeng Fan <>
parent aa6bafbb
......@@ -14,6 +14,7 @@
#include <asm/armv8/mmu.h>
#include <errno.h>
#include <fdt_support.h>
#include <fsl_wdog.h>
......@@ -507,3 +508,17 @@ add_status:
return ft_add_optee_node(blob, bd);
void reset_cpu(ulong addr)
struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
/* Clear WDA to trigger WDOG_B immediately */
writew((WCR_WDE | WCR_SRS), &wdog->wcr);
while (1) {
* spin for .5 seconds before reset
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