summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Bo <bo.zhang@nxp.com>2018-08-28 10:33:05 +0800
committerZhang Bo <bo.zhang@nxp.com>2018-08-28 10:49:06 +0800
commitb6a1a19c6649e59f986625e5b4a9fa886821dd88 (patch)
tree28da93f77cbcafa845b7014725db4e70dc23cbb5
parent512bdbb63bb4bcdf24c820e438b927cd7808b45c (diff)
MA-12536[Android] Enable RTC for imx8m in uboot
Enable RTC in bootloader to avoid rtc time less than jiffies time when linux first bootup after RTC lose power. It will cause the issue as MA-9554[Android_6DL_SD]RTC: Sometimes the RTC reset to the initial time 1970 after softare reboot the first time. 40% Change-Id: I0c87180640be98a2c928a30c6949f91f4515844d Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
-rw-r--r--arch/arm/cpu/armv8/imx8m/soc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv8/imx8m/soc.c b/arch/arm/cpu/armv8/imx8m/soc.c
index 8e506c47fc..9578be616c 100644
--- a/arch/arm/cpu/armv8/imx8m/soc.c
+++ b/arch/arm/cpu/armv8/imx8m/soc.c
@@ -271,6 +271,11 @@ int arch_cpu_init(void)
imx_set_wdog_powerdown(false);
+#if defined(CONFIG_ANDROID_SUPPORT)
+ /* Enable RTC */
+ writel(0x21, 0x30370038);
+#endif
+
return 0;
}