From ff8cca70a4651e6a9db9599d3778d7b5d7926d96 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Wed, 1 Jul 2020 23:17:38 -0400 Subject: [PATCH] imx233: rtc: Explicitly clear the soft reset bit when initializing If we come up and the RTC is in a reset state, we need to release that before trying to initialze anything else. (See IMX23RM 23.8.1 and 39.3.10) Change-Id: I1820ab771ba81f7d428d07040b7d188d9f688127 --- firmware/target/arm/imx233/rtc-imx233.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/firmware/target/arm/imx233/rtc-imx233.h b/firmware/target/arm/imx233/rtc-imx233.h index 77e4081507..c6138efbb6 100644 --- a/firmware/target/arm/imx233/rtc-imx233.h +++ b/firmware/target/arm/imx233/rtc-imx233.h @@ -81,6 +81,8 @@ static inline void imx233_rtc_reset_watchdog(uint32_t ms) static inline void imx233_rtc_init(void) { + BF_CLR(RTC_CTRL, SFTRST); + udelay(5); /* only need 3 GPMI clocks (1us) */ BF_CLR(RTC_CTRL, CLKGATE); imx233_rtc_enable_watchdog(false); }