diff options
author | Zhang Bo <bo.zhang@nxp.com> | 2018-09-25 12:31:42 +0800 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2018-09-29 00:35:23 -0700 |
commit | 57549a0423dc9c0bf4972453d6209aaf82a69c43 (patch) | |
tree | 21bdf977bbe351df8db0f2837a9341e56beed01c | |
parent | a8bb0fa49e6d55ae8e38387a62b0d85710a7d2ae (diff) |
MA-12536-1[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: I048a148003241f73345aeb8ff0fda8fc328c0efb
Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
(cherry picked from commit 1a34c017d7838947870f84934f84adf351978411)
-rw-r--r-- | arch/arm/mach-imx/imx8m/soc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index 25f85d0ab5..b4a399261d 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -245,6 +245,10 @@ int arch_cpu_init(void) /* Secure init function such RNG */ imx_sec_init(); #endif +#if defined(CONFIG_ANDROID_SUPPORT) + /* Enable RTC */ + writel(0x21, 0x30370038); +#endif return 0; } |