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

soc: nrf53: Port SYS_INIT rtc_pretick_init to soc_late_init_hook

Port the SYS_INIT for rtc_pretick_init to use soc_late_init_hook as
SYS_INIT's are legacy.

Signed-off-by: default avatarSebastian Bøe <sebastian.boe@nordicsemi.no>
parent 5da07486
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
@@ -8,6 +8,7 @@ config SOC_SERIES_NRF53X
	select ARM
	select SOC_COMPATIBLE_NRF53X
	select SOC_EARLY_INIT_HOOK
	select SOC_LATE_INIT_HOOK
	select CPU_CORTEX_M33
	select CPU_CORTEX_M_HAS_DWT
	select CPU_HAS_ARM_MPU
+10 −5
Changes for soc/nordic/nrf53/soc.c: 10 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -551,6 +551,16 @@ void soc_early_init_hook(void)
#if defined(CONFIG_SOC_DCDC_NRF53X_HV) || DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(vregh))
	nrf_regulators_vreg_enable_set(NRF_REGULATORS, NRF_REGULATORS_VREG_HIGH, true);
#endif
}

void soc_late_init_hook(void)
{
#ifdef CONFIG_SOC_NRF53_RTC_PRETICK
	int err = rtc_pretick_init();

	__ASSERT_NO_MSG(err == 0);
	(void)err;
#endif

}

@@ -558,8 +568,3 @@ void arch_busy_wait(uint32_t time_us)
{
	nrfx_coredep_delay_us(time_us);
}


#ifdef CONFIG_SOC_NRF53_RTC_PRETICK
SYS_INIT(rtc_pretick_init, POST_KERNEL, 0);
#endif