Skip to content

Commit 3f9cfc6

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 6d0ab59 commit 3f9cfc6

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
@@ -126,7 +126,7 @@ bool z_arm_on_enter_cpu_idle(void)
126126
}
127127
#endif
128128

129-
static int nordicsemi_nrf54h_init(void)
129+
void soc_early_init_hook(void)
130130
{
131131
int err;
132132

@@ -138,9 +138,7 @@ static int nordicsemi_nrf54h_init(void)
138138
trim_hsfll();
139139

140140
err = dmm_init();
141-
if (err < 0) {
142-
return err;
143-
}
141+
__ASSERT_NO_MSG(err >= 0);
144142

145143
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ccm030))
146144
/* DMASEC is set to non-secure by default, which prevents CCM from
@@ -156,13 +154,9 @@ static int nordicsemi_nrf54h_init(void)
156154
DT_PROP_OR(DT_NODELABEL(nfct), nfct_pins_as_gpios, 0)) {
157155
nrf_nfct_pad_config_enable_set(NRF_NFCT, false);
158156
}
159-
160-
return 0;
161157
}
162158

163159
void arch_busy_wait(uint32_t time_us)
164160
{
165161
nrfx_coredep_delay_us(time_us);
166162
}
167-
168-
SYS_INIT(nordicsemi_nrf54h_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);

0 commit comments

Comments
 (0)