From b6a1a19c6649e59f986625e5b4a9fa886821dd88 Mon Sep 17 00:00:00 2001 From: Zhang Bo Date: Tue, 28 Aug 2018 10:33:05 +0800 Subject: 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 --- arch/arm/cpu/armv8/imx8m/soc.c | 5 +++++ 1 file changed, 5 insertions(+) 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; } -- cgit v1.2.3