Skip to content

Commit 5da0748

Browse files
SebastianBoekartben
authored andcommitted
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 <[email protected]>
1 parent 277d0c1 commit 5da0748

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

soc/nordic/nrf53/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ config SOC_SERIES_NRF53X
77
bool
88
select ARM
99
select SOC_COMPATIBLE_NRF53X
10+
select SOC_EARLY_INIT_HOOK
1011
select CPU_CORTEX_M33
1112
select CPU_CORTEX_M_HAS_DWT
1213
select CPU_HAS_ARM_MPU

soc/nordic/nrf53/soc.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,7 @@ static int rtc_pretick_init(void)
478478
}
479479
#endif /* CONFIG_SOC_NRF53_RTC_PRETICK */
480480

481-
482-
static int nordicsemi_nrf53_init(void)
481+
void soc_early_init_hook(void)
483482
{
484483
#if defined(CONFIG_SOC_NRF5340_CPUAPP) && defined(CONFIG_NRF_ENABLE_CACHE)
485484
#if !defined(CONFIG_BUILD_WITH_TFM)
@@ -553,15 +552,13 @@ static int nordicsemi_nrf53_init(void)
553552
nrf_regulators_vreg_enable_set(NRF_REGULATORS, NRF_REGULATORS_VREG_HIGH, true);
554553
#endif
555554

556-
return 0;
557555
}
558556

559557
void arch_busy_wait(uint32_t time_us)
560558
{
561559
nrfx_coredep_delay_us(time_us);
562560
}
563561

564-
SYS_INIT(nordicsemi_nrf53_init, PRE_KERNEL_1, 0);
565562

566563
#ifdef CONFIG_SOC_NRF53_RTC_PRETICK
567564
SYS_INIT(rtc_pretick_init, POST_KERNEL, 0);

0 commit comments

Comments
 (0)