summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/mx7/soc.c
diff options
context:
space:
mode:
authorZhang Bo <bo.zhang@nxp.com>2017-09-07 18:57:57 +0800
committerZhang Bo <bo.zhang@nxp.com>2017-09-07 18:58:06 +0800
commitc250b072a606b6a450dbe6633b9c5371c5e36108 (patch)
treed56a9ed20926c208a74da8a7a7a23dd3ab9a8a7d /arch/arm/cpu/armv7/mx7/soc.c
parent922168448596a075c8b990bea3a81bcb62024ae4 (diff)
downloadu-boot-imx-n7.1.2_2.0.0-ga.zip
u-boot-imx-n7.1.2_2.0.0-ga.tar.gz
u-boot-imx-n7.1.2_2.0.0-ga.tar.bz2
MA-9554[Android_6DL_SD]RTC: Sometimes the RTC reset to the initial time 1970 after softare reboot the first time. 40%n7.1.2_2.0.0-ga
RTC timer is default disabled after power off and bootup again. it will be enabled in kernel rtc driver init. But rtc time is shorter than system clock, so rtc time cannot update to system clock in rtc_hctosys(), and the sysfs file /sys/class/rtc/rtc0/hctosys cat result is 0. Android AlarmManagerService cannot work normally when hctosys is 0. Enable RTC in u-boot so the time in RTC timer is longer than system clock. Change-Id: Ie8b1c1b36e5ab48031efe44dd06468ac35ca3d3b Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
Diffstat (limited to 'arch/arm/cpu/armv7/mx7/soc.c')
-rw-r--r--arch/arm/cpu/armv7/mx7/soc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx7/soc.c b/arch/arm/cpu/armv7/mx7/soc.c
index 9e85bf1..a491f6a 100644
--- a/arch/arm/cpu/armv7/mx7/soc.c
+++ b/arch/arm/cpu/armv7/mx7/soc.c
@@ -483,6 +483,10 @@ void s_init(void)
/* clock configuration. */
clock_init();
+#if defined(CONFIG_ANDROID_SUPPORT)
+ /* Enable RTC */
+ writel(0x21, 0x30370038);
+#endif
return;
}