summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2019-12-09 00:47:18 -0800
committerYe Li <ye.li@nxp.com>2019-12-13 03:25:17 -0800
commit1f40c25c7f54898d3b398fdf091c6aa6b24effe1 (patch)
tree79a35f3114ca2aec5468aba967e0a9802dc8bffa /arch
parent7740677930170f694766ce4c8a4be231b8a7f937 (diff)
MLK-23093 imx8m: Enable WDOG_B for timeout
When doing reset_cpu, in normal case the WDOG_B outputs immediately after we clean WDA bit. But on mscale, the WDOG_B may be later than internal reset, and cause PMIC not reset. As we enabled the SD3.0 support, the PMIC must be reset to reset SD card. Change the reset_cpu to enable the WDOG_B for timeout as well, and set WDOG timeout to 1s. Signed-off-by: Ye Li <ye.li@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit e78f889637636d8b67fe6250623f3473514f1a23)
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/imx8m/soc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index a47102f9cf..c09f3dab7c 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -791,11 +791,11 @@ 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);
+ writew((SET_WCR_WT(1) | WCR_WDT | WCR_WDE | WCR_SRS), &wdog->wcr);
while (1) {
/*
- * spin for .5 seconds before reset
+ * spin for 1 second before timeout reset
*/
}
}