soc: nrf54: Port SYS_INIT to use soc_early_init_hook

Port SYS_INIT to use soc_early_init_hook as SYS_INITs are legacy.

Due to moving dmm_init() from PRE_KERNEL_1 SYS_INIT to
soc_early_init_hook(), the DMM test is also updated to ensure that
its setup function runs before dmm_init().

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
This commit is contained in:
Sebastian Bøe 2025-05-01 11:49:05 +02:00 committed by Benjamin Cabé
commit c0c4170c42
3 changed files with 5 additions and 9 deletions

View file

@ -7,6 +7,7 @@ config SOC_SERIES_NRF54HX
select HAS_NRFS
select HAS_NRFX
select HAS_NORDIC_DRIVERS
select SOC_EARLY_INIT_HOOK if ARM
select NRF_PLATFORM_HALTIUM
config SOC_NRF54H20_CPUAPP_COMMON

View file

@ -126,7 +126,7 @@ bool z_arm_on_enter_cpu_idle(void)
}
#endif
static int nordicsemi_nrf54h_init(void)
void soc_early_init_hook(void)
{
int err;
@ -138,9 +138,7 @@ static int nordicsemi_nrf54h_init(void)
trim_hsfll();
err = dmm_init();
if (err < 0) {
return err;
}
__ASSERT_NO_MSG(err == 0);
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ccm030))
/* DMASEC is set to non-secure by default, which prevents CCM from
@ -156,13 +154,9 @@ static int nordicsemi_nrf54h_init(void)
DT_PROP_OR(DT_NODELABEL(nfct), nfct_pins_as_gpios, 0)) {
nrf_nfct_pad_config_enable_set(NRF_NFCT, false);
}
return 0;
}
void arch_busy_wait(uint32_t time_us)
{
nrfx_coredep_delay_us(time_us);
}
SYS_INIT(nordicsemi_nrf54h_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);