Skip to content

Commit 98d12ca

Browse files
committed
[nrf fromlist] 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. Upstream PR #: 88908 Signed-off-by: Sebastian Bøe <[email protected]>
1 parent ae0719d commit 98d12ca

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

soc/nordic/nrf54h/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ config SOC_SERIES_NRF54HX
77
select HAS_NRFS
88
select HAS_NRFX
99
select HAS_NORDIC_DRIVERS
10+
select SOC_EARLY_INIT_HOOK if ARM
1011
select NRF_PLATFORM_HALTIUM
1112

1213
config SOC_NRF54H20_CPUAPP_COMMON

soc/nordic/nrf54h/soc.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ bool z_arm_on_enter_cpu_idle(void)
125125
}
126126
#endif
127127

128-
static int nordicsemi_nrf54h_init(void)
128+
void soc_early_init_hook(void)
129129
{
130130
int err;
131131

@@ -137,9 +137,7 @@ static int nordicsemi_nrf54h_init(void)
137137
trim_hsfll();
138138

139139
err = dmm_init();
140-
if (err < 0) {
141-
return err;
142-
}
140+
__ASSERT_NO_MSG(err >= 0);
143141

144142
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ccm030))
145143
/* DMASEC is set to non-secure by default, which prevents CCM from
@@ -150,13 +148,9 @@ static int nordicsemi_nrf54h_init(void)
150148

151149
nrf_spu_periph_perm_dmasec_set(spu, nrf_address_slave_get(ccm030_addr), true);
152150
#endif
153-
154-
return 0;
155151
}
156152

157153
void arch_busy_wait(uint32_t time_us)
158154
{
159155
nrfx_coredep_delay_us(time_us);
160156
}
161-
162-
SYS_INIT(nordicsemi_nrf54h_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);

0 commit comments

Comments
 (0)