Skip to content

Commit 5d9f554

Browse files
SebastianBoekartben
authored andcommitted
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: Sebastian Bøe <[email protected]>
1 parent 5da0748 commit 5d9f554

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

soc/nordic/nrf53/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ config SOC_SERIES_NRF53X
88
select ARM
99
select SOC_COMPATIBLE_NRF53X
1010
select SOC_EARLY_INIT_HOOK
11+
select SOC_LATE_INIT_HOOK
1112
select CPU_CORTEX_M33
1213
select CPU_CORTEX_M_HAS_DWT
1314
select CPU_HAS_ARM_MPU

soc/nordic/nrf53/soc.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -551,15 +551,20 @@ void soc_early_init_hook(void)
551551
#if defined(CONFIG_SOC_DCDC_NRF53X_HV) || DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(vregh))
552552
nrf_regulators_vreg_enable_set(NRF_REGULATORS, NRF_REGULATORS_VREG_HIGH, true);
553553
#endif
554+
}
555+
556+
void soc_late_init_hook(void)
557+
{
558+
#ifdef CONFIG_SOC_NRF53_RTC_PRETICK
559+
int err = rtc_pretick_init();
560+
561+
__ASSERT_NO_MSG(err == 0);
562+
(void)err;
563+
#endif
554564

555565
}
556566

557567
void arch_busy_wait(uint32_t time_us)
558568
{
559569
nrfx_coredep_delay_us(time_us);
560570
}
561-
562-
563-
#ifdef CONFIG_SOC_NRF53_RTC_PRETICK
564-
SYS_INIT(rtc_pretick_init, POST_KERNEL, 0);
565-
#endif

0 commit comments

Comments
 (0)