soc: nordic: nrf54l: Set SystemCoreClock using frequency from DT

Use cpu clock source frequency as system core clock.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruściński 2025-01-17 06:01:28 +01:00 committed by Benjamin Cabé
commit df32919a52

View file

@ -32,6 +32,7 @@
#include <nrf_erratas.h> #include <nrf_erratas.h>
#include <system_nrf54l.h> #include <system_nrf54l.h>
#include <zephyr/drivers/clock_control/nrf_clock_control.h>
LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL); LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);
@ -43,9 +44,9 @@ LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);
static int nordicsemi_nrf54l_init(void) static int nordicsemi_nrf54l_init(void)
{ {
/* Update the SystemCoreClock global variable with current core clock /* Update the SystemCoreClock global variable with current core clock
* retrieved from hardware state. * retrieved from the DT.
*/ */
SystemCoreClockUpdate(); SystemCoreClock = NRF_PERIPH_GET_FREQUENCY(DT_NODELABEL(cpu));
#if defined(NRF_APPLICATION) #if defined(NRF_APPLICATION)
/* Enable ICACHE */ /* Enable ICACHE */