From 57549a0423dc9c0bf4972453d6209aaf82a69c43 Mon Sep 17 00:00:00 2001 From: Zhang Bo Date: Tue, 25 Sep 2018 12:31:42 +0800 Subject: 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 (cherry picked from commit 1a34c017d7838947870f84934f84adf351978411) --- arch/arm/mach-imx/imx8m/soc.c | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- cgit v1.2.3