diff options
author | Ye Li <ye.li@nxp.com> | 2017-02-07 22:48:01 +0800 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2017-03-14 21:27:09 +0800 |
commit | 6d09863801695d975060fbc240147a9067dbafbf (patch) | |
tree | abf25db122de57af19475a37f4ea662264f0aaba /arch/arm/cpu/armv7/mx7 | |
parent | 40d2612bdfdc805d8f924854329de8adb4f38902 (diff) | |
download | u-boot-imx-6d09863801695d975060fbc240147a9067dbafbf.zip u-boot-imx-6d09863801695d975060fbc240147a9067dbafbf.tar.gz u-boot-imx-6d09863801695d975060fbc240147a9067dbafbf.tar.bz2 |
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>
Diffstat (limited to 'arch/arm/cpu/armv7/mx7')
-rw-r--r-- | arch/arm/cpu/armv7/mx7/soc.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx7/soc.c b/arch/arm/cpu/armv7/mx7/soc.c index dead1d3..4bfabf7 100644 --- a/arch/arm/cpu/armv7/mx7/soc.c +++ b/arch/arm/cpu/armv7/mx7/soc.c @@ -1,5 +1,6 @@ /* * Copyright (C) 2015 Freescale Semiconductor, Inc. + * Copyright 2017 NXP * * SPDX-License-Identifier: GPL-2.0+ */ @@ -17,6 +18,7 @@ #include <asm/arch/crm_regs.h> #include <dm.h> #include <imx_thermal.h> +#include <fsl_wdog.h> #if defined(CONFIG_IMX_THERMAL) static const struct imx_thermal_plat imx7_thermal_plat = { @@ -463,3 +465,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 + */ + } +} |