Commit 0528ba0e1c4f879278d597b1aeaf1bf31a943f75

Authored by Peng Fan
Committed by Stefano Babic
1 parent b3cf0a8f03

imx8m: soc: enable SCTR clock before timer init

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>

Showing 1 changed file with 6 additions and 0 deletions Side-by-side Diff

arch/arm/mach-imx/imx8m/soc.c
... ... @@ -232,6 +232,12 @@
232 232 {
233 233 struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
234 234 /*
  235 + * ROM might disable clock for SCTR,
  236 + * enable the clock before timer_init.
  237 + */
  238 + if (IS_ENABLED(CONFIG_SPL_BUILD))
  239 + clock_enable(CCGR_SCTR, 1);
  240 + /*
235 241 * Init timer at very early state, because sscg pll setting
236 242 * will use it
237 243 */