summaryrefslogtreecommitdiff
path: root/drivers/watchdog/imx_watchdog.c
diff options
context:
space:
mode:
authorXiaoliang Yang <xiaoliang.yang_1@nxp.com>2018-10-18 18:27:46 +0800
committerStefano Babic <sbabic@denx.de>2019-01-01 14:12:18 +0100
commitda4918acb8585ba45b2dbadb2114e10d7557966f (patch)
tree1b803f23780c1ec2b31e33794fa8866aed475cd1 /drivers/watchdog/imx_watchdog.c
parent005c1cf888a7ad72bd0f9ceb6f6b2eee7720f7b0 (diff)
watchdog: imx: add config to disable wdog reset
Add Kconfig option WATCHDOG_RESET_DISABLE to disable watchdog reset in imx_watchdog driver, so that the watchdog will not be fed in u-boot if CONFIG_WATCHDOG_RESET_DISABLE is enabled. Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Diffstat (limited to 'drivers/watchdog/imx_watchdog.c')
-rw-r--r--drivers/watchdog/imx_watchdog.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/watchdog/imx_watchdog.c b/drivers/watchdog/imx_watchdog.c
index ddcf474996..14cc618074 100644
--- a/drivers/watchdog/imx_watchdog.c
+++ b/drivers/watchdog/imx_watchdog.c
@@ -16,10 +16,12 @@
#ifdef CONFIG_IMX_WATCHDOG
void hw_watchdog_reset(void)
{
+#ifndef CONFIG_WATCHDOG_RESET_DISABLE
struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
writew(0x5555, &wdog->wsr);
writew(0xaaaa, &wdog->wsr);
+#endif /* CONFIG_WATCHDOG_RESET_DISABLE*/
}
void hw_watchdog_init(void)