summaryrefslogtreecommitdiff
path: root/drivers/watchdog/imx7ulp_wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/imx7ulp_wdt.c')
-rw-r--r--drivers/watchdog/imx7ulp_wdt.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/watchdog/imx7ulp_wdt.c b/drivers/watchdog/imx7ulp_wdt.c
index 845c900b5bcb..b54268849ce6 100644
--- a/drivers/watchdog/imx7ulp_wdt.c
+++ b/drivers/watchdog/imx7ulp_wdt.c
@@ -146,15 +146,10 @@ static inline void imx7ulp_wdt_init(void __iomem *base, unsigned int timeout)
local_irq_disable();
- /*
- * if the wdog is in unlocked status, the UNLOCK
- * sequence no need to be send.
- */
- val = readl(base + WDOG_CS);
- if (!(val & WDOG_CS_ULK)) {
- writel(UNLOCK_SEQ0, base + WDOG_CNT);
- writel(UNLOCK_SEQ1, base + WDOG_CNT);
- }
+ /* unlock the wdog for reconfiguration */
+ writel_relaxed(UNLOCK_SEQ0, base + WDOG_CNT);
+ writel_relaxed(UNLOCK_SEQ1, base + WDOG_CNT);
+
/*set an initial timeout value in TOVAL */
writel(timeout, base + WDOG_TOVAL);
/* enable 32bit command sequence and reconfigure */