Commit 6d09863801695d975060fbc240147a9067dbafbf
1 parent
40d2612bdf
Exists in
smarc-n7.1.2_2.0.0-ga
and in
4 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>
Showing 1 changed file with 15 additions and 0 deletions Side-by-side Diff
arch/arm/cpu/armv7/mx7/soc.c
1 | 1 | /* |
2 | 2 | * Copyright (C) 2015 Freescale Semiconductor, Inc. |
3 | + * Copyright 2017 NXP | |
3 | 4 | * |
4 | 5 | * SPDX-License-Identifier: GPL-2.0+ |
5 | 6 | */ |
... | ... | @@ -17,6 +18,7 @@ |
17 | 18 | #include <asm/arch/crm_regs.h> |
18 | 19 | #include <dm.h> |
19 | 20 | #include <imx_thermal.h> |
21 | +#include <fsl_wdog.h> | |
20 | 22 | |
21 | 23 | #if defined(CONFIG_IMX_THERMAL) |
22 | 24 | static const struct imx_thermal_plat imx7_thermal_plat = { |
... | ... | @@ -461,5 +463,19 @@ |
461 | 463 | #ifdef CONFIG_VIDEO_MXS |
462 | 464 | lcdif_power_down(); |
463 | 465 | #endif |
466 | +} | |
467 | + | |
468 | +void reset_cpu(ulong addr) | |
469 | +{ | |
470 | + struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR; | |
471 | + | |
472 | + /* Clear WDA to trigger WDOG_B immediately */ | |
473 | + writew((WCR_WDE | WCR_SRS), &wdog->wcr); | |
474 | + | |
475 | + while (1) { | |
476 | + /* | |
477 | + * spin for .5 seconds before reset | |
478 | + */ | |
479 | + } | |
464 | 480 | } |
-
mentioned in commit cde504
-
mentioned in commit cde504
-
mentioned in commit cde504
-
mentioned in commit cde504
-
mentioned in commit cde504
-
mentioned in commit b0d49a
-
mentioned in commit cde504
-
mentioned in commit b0d49a
-
mentioned in commit fd33de
-
mentioned in commit fd33de
-
mentioned in commit fd33de
-
mentioned in commit fd33de
-
mentioned in commit 2d7a9c
-
mentioned in commit 2d7a9c
-
mentioned in commit fd33de
-
mentioned in commit 2d7a9c
-
mentioned in commit 2d7a9c
-
mentioned in commit 2d7a9c
-
mentioned in commit 2d7a9c
-
mentioned in commit a48e71
-
mentioned in commit b35c23