Commit fd33de063a9c8a233ef3790d0b066df9b48fb516
1 parent
c5e6063cba
Exists in
smarc_8mq-imx_v2020.04_5.4.24_2.1.0
and in
3 other branches
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 <ye.li@nxp.com> (cherry picked from commit 6d09863801695d975060fbc240147a9067dbafbf) (cherry picked from commit cde504077e1ce94d9ad34ece0f3e882972404297) (cherry picked from commit b0d49a10b23f0b9a7d8cc9299e6eac6b39ce1434)
Showing 1 changed file with 14 additions and 0 deletions Side-by-side Diff
arch/arm/mach-imx/mx7/soc.c
... | ... | @@ -18,6 +18,7 @@ |
18 | 18 | #include <imx_thermal.h> |
19 | 19 | #include <fsl_sec.h> |
20 | 20 | #include <asm/setup.h> |
21 | +#include <fsl_wdog.h> | |
21 | 22 | |
22 | 23 | #define IOMUXC_GPR1 0x4 |
23 | 24 | #define BM_IOMUXC_GPR1_IRQ 0x1000 |
... | ... | @@ -415,5 +416,19 @@ |
415 | 416 | lcdif_power_down(); |
416 | 417 | #endif |
417 | 418 | #endif |
419 | +} | |
420 | + | |
421 | +void reset_cpu(ulong addr) | |
422 | +{ | |
423 | + struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR; | |
424 | + | |
425 | + /* Clear WDA to trigger WDOG_B immediately */ | |
426 | + writew((WCR_WDE | WCR_SRS), &wdog->wcr); | |
427 | + | |
428 | + while (1) { | |
429 | + /* | |
430 | + * spin for .5 seconds before reset | |
431 | + */ | |
432 | + } | |
418 | 433 | } |