clk: stm32mp: enable RTCAPB clock for dual-core chips
authorYann Gautier <[email protected]>
Mon, 20 May 2019 12:39:26 +0000 (14:39 +0200)
committerYann Gautier <[email protected]>
Mon, 2 Sep 2019 15:51:30 +0000 (17:51 +0200)
In order to correctly manage the bring-up of non boot CPUs, the RTCAPB
clock needs to be enabled.
It controls the access to backup registers, where the CPU entrypoint
will be stored.

Change-Id: Ifeeceb4faf64bc9e0778030444f437cc0bb27272
Signed-off-by: Yann Gautier <[email protected]>
Signed-off-by: Etienne Carriere <[email protected]>
Signed-off-by: Nicolas Le Bayon <[email protected]>
drivers/st/clk/stm32mp1_clk.c

index 76e6e6fdcf52520001cf1a45839f6a120d47a852..f3b9f0cc3c5d841a60334514ff5acf1fc5914142 100644 (file)
@@ -1912,9 +1912,18 @@ static void stm32mp1_osc_init(void)
        }
 }
 
+static void sync_earlyboot_clocks_state(void)
+{
+       if (!stm32mp_is_single_core()) {
+               stm32mp1_clk_enable_secure(RTCAPB);
+       }
+}
+
 int stm32mp1_clk_probe(void)
 {
        stm32mp1_osc_init();
 
+       sync_earlyboot_clocks_state();
+
        return 0;
 }