From 033b6c3ac3e501de569f99beac9b37f5aca73a27 Mon Sep 17 00:00:00 2001 From: Etienne Carriere Date: Sun, 8 Dec 2019 08:23:35 +0100 Subject: drivers: stm32mp1 clocks: enable system clocks during initialization Enable few system clocks at related BL initialization. Change-Id: I12b35e8cdc128b993de4a1dc4c6e9d52624dd8d9 Signed-off-by: Etienne Carriere --- drivers/st/clk/stm32mp1_clk.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'drivers/st') diff --git a/drivers/st/clk/stm32mp1_clk.c b/drivers/st/clk/stm32mp1_clk.c index faf4bf6f9..4a90a7b6a 100644 --- a/drivers/st/clk/stm32mp1_clk.c +++ b/drivers/st/clk/stm32mp1_clk.c @@ -2009,6 +2009,23 @@ static void stm32mp1_osc_init(void) static void sync_earlyboot_clocks_state(void) { + unsigned int idx; + const unsigned long secure_enable[] = { + AXIDCG, + BSEC, + DDRC1, DDRC1LP, + DDRC2, DDRC2LP, + DDRCAPB, DDRPHYCAPB, DDRPHYCAPBLP, + DDRPHYC, DDRPHYCLP, + TZC1, TZC2, + TZPC, + STGEN_K, + }; + + for (idx = 0U; idx < ARRAY_SIZE(secure_enable); idx++) { + stm32mp_clk_enable(secure_enable[idx]); + } + if (!stm32mp_is_single_core()) { stm32mp1_clk_enable_secure(RTCAPB); } -- cgit v1.2.3