From b0d49a10b23f0b9a7d8cc9299e6eac6b39ce1434 Mon Sep 17 00:00:00 2001 From: Ye Li Date: Tue, 7 Feb 2017 22:48:01 +0800 Subject: [PATCH] MLK-14422 imx7d: wdog: Overwrite the reset_cpu to turn off internal reset signal Set wdog WCR register SRS bit to turn off internal reset signal WDOG_RESET_B_DEB for mx7d. So that the warm reset is disabled. The WDA is cleared to output WDOG_B immediately to reset the board. Signed-off-by: Ye Li (cherry picked from commit 6d09863801695d975060fbc240147a9067dbafbf) (cherry picked from commit cde504077e1ce94d9ad34ece0f3e882972404297) --- arch/arm/mach-imx/mx7/soc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c index 7cfdff0981..017ab68e6d 100644 --- a/arch/arm/mach-imx/mx7/soc.c +++ b/arch/arm/mach-imx/mx7/soc.c @@ -17,6 +17,7 @@ #include #include #include +#include #define IOMUXC_GPR1 0x4 #define BM_IOMUXC_GPR1_IRQ 0x1000 @@ -375,3 +376,16 @@ void reset_misc(void) #endif } +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 + */ + } +} -- 2.17.1