soc: nrf53: Port SYS_INIT to soc_early_init_hook

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 <sebastian.boe@nordicsemi.no>
This commit is contained in:
Sebastian Bøe 2025-04-25 08:41:42 +02:00 committed by Benjamin Cabé
commit 5da0748612
2 changed files with 2 additions and 4 deletions

View file

@ -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

View file

@ -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);