Commit 5da07486 authored by Sebastian Bøe's avatar Sebastian Bøe Committed by Benjamin Cabé
Browse files

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: default avatarSebastian Bøe <sebastian.boe@nordicsemi.no>
parent 277d0c1f
Loading
Loading
Loading
Loading
+1 −0
Changes for soc/nordic/nrf53/Kconfig: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -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
+1 −4
Changes for soc/nordic/nrf53/soc.c: 1 added line, 4 removed lines.
Original line number Diff line number Diff line
@@ -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);