summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-01 23:17:38 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-15 18:29:49 +0000
commitff8cca70a4651e6a9db9599d3778d7b5d7926d96 (patch)
treebed814c33e500d3f34c20b3f4044757902b489d6 /firmware/target/arm
parent650eaa39c4665a08d882217550f1959a49c0c039 (diff)
downloadrockbox-ff8cca70a4651e6a9db9599d3778d7b5d7926d96.tar.gz
rockbox-ff8cca70a4651e6a9db9599d3778d7b5d7926d96.tar.bz2
rockbox-ff8cca70a4651e6a9db9599d3778d7b5d7926d96.zip
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
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/imx233/rtc-imx233.h2
1 files changed, 2 insertions, 0 deletions
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);
}