MLK-18243-10 arm: imx8m: soc: enable SCTR clock before timer init
authorPeng Fan <peng.fan@nxp.com>
Wed, 9 May 2018 07:50:07 +0000 (15:50 +0800)
committerYe Li <ye.li@nxp.com>
Fri, 24 May 2019 09:31:08 +0000 (02:31 -0700)
To i.MX8MM SCTR clock is disabled by ROM, so before timer init
need to enable it.
To i.MX8MQ, it does not hurt the clock is enabled again.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 2347541e9e79f833716fe88f7de860b5704b5e48)
(cherry picked from commit f5cfd600cfa58d4a768e94c29aaa890fd39a2d63)

arch/arm/mach-imx/imx8m/soc.c

index cf52591..68af92d 100644 (file)
@@ -184,9 +184,11 @@ static void imx_set_wdog_powerdown(bool enable)
 int arch_cpu_init(void)
 {
        /*
-        * Init timer at very early state, because sscg pll setting
-        * will use it
+        * Init timer at very early state, because pll setting will use it,
+        * Rom Turnned off SCTR, enable it before timer_init
         */
+
+       clock_enable(CCGR_SCTR, 1);
        timer_init();
 
        if (IS_ENABLED(CONFIG_SPL_BUILD)) {