From 5da07486124db32a71f06f4d2a5420dc731cb8ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B8e?= Date: Fri, 25 Apr 2025 08:41:42 +0200 Subject: [PATCH] soc: nrf53: Port SYS_INIT to soc_early_init_hook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port the nordicsemi_nrf53_init to use soc_early_init_hook instead of SYS_INIT as SYS_INIT is legacy. Signed-off-by: Sebastian Bøe --- soc/nordic/nrf53/Kconfig | 1 + soc/nordic/nrf53/soc.c | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/soc/nordic/nrf53/Kconfig b/soc/nordic/nrf53/Kconfig index 33c938384cc..1ab7a7ac95e 100644 --- a/soc/nordic/nrf53/Kconfig +++ b/soc/nordic/nrf53/Kconfig @@ -7,6 +7,7 @@ config SOC_SERIES_NRF53X bool select ARM select SOC_COMPATIBLE_NRF53X + select SOC_EARLY_INIT_HOOK select CPU_CORTEX_M33 select CPU_CORTEX_M_HAS_DWT select CPU_HAS_ARM_MPU diff --git a/soc/nordic/nrf53/soc.c b/soc/nordic/nrf53/soc.c index c9fb9adc4f4..75c6e5e0a4d 100644 --- a/soc/nordic/nrf53/soc.c +++ b/soc/nordic/nrf53/soc.c @@ -478,8 +478,7 @@ static int rtc_pretick_init(void) } #endif /* CONFIG_SOC_NRF53_RTC_PRETICK */ - -static int nordicsemi_nrf53_init(void) +void soc_early_init_hook(void) { #if defined(CONFIG_SOC_NRF5340_CPUAPP) && defined(CONFIG_NRF_ENABLE_CACHE) #if !defined(CONFIG_BUILD_WITH_TFM) @@ -553,7 +552,6 @@ static int nordicsemi_nrf53_init(void) nrf_regulators_vreg_enable_set(NRF_REGULATORS, NRF_REGULATORS_VREG_HIGH, true); #endif - return 0; } void arch_busy_wait(uint32_t time_us) @@ -561,7 +559,6 @@ void arch_busy_wait(uint32_t time_us) nrfx_coredep_delay_us(time_us); } -SYS_INIT(nordicsemi_nrf53_init, PRE_KERNEL_1, 0); #ifdef CONFIG_SOC_NRF53_RTC_PRETICK SYS_INIT(rtc_pretick_init, POST_KERNEL, 0);