soc: nrf53: Port SYS_INIT nrf53_cpunet_init to soc_late_init_hook

Port SYS_INIT nrf53_cpunet_init to soc_late_init_hook as SYS_INIT are
legacy.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit is contained in:
Sebastian Bøe 2025-04-25 08:47:21 +02:00 committed by Benjamin Cabé
commit 8007e2481c
4 changed files with 12 additions and 6 deletions

View file

@ -8,7 +8,7 @@ config SOC_SERIES_NRF53X
select ARM
select SOC_COMPATIBLE_NRF53X
select SOC_EARLY_INIT_HOOK
select SOC_LATE_INIT_HOOK
select SOC_LATE_INIT_HOOK if SOC_NRF53_RTC_PRETICK || SOC_NRF53_CPUNET_ENABLE
select CPU_CORTEX_M33
select CPU_CORTEX_M_HAS_DWT
select CPU_HAS_ARM_MPU

View file

@ -101,7 +101,7 @@ void nrf53_cpunet_enable(bool on)
}
#ifdef CONFIG_SOC_NRF53_CPUNET_ENABLE
static int nrf53_cpunet_init(void)
void nrf53_cpunet_init(void)
{
#if !defined(CONFIG_TRUSTED_EXECUTION_NONSECURE)
/* Retain nRF5340 Network MCU in Secure domain (bus
@ -120,9 +120,5 @@ static int nrf53_cpunet_init(void)
nrf53_cpunet_enable(true);
#endif /* !CONFIG_TRUSTED_EXECUTION_SECURE */
return 0;
}
SYS_INIT(nrf53_cpunet_init, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
#endif /* CONFIG_SOC_NRF53_CPUNET_ENABLE */

View file

@ -28,4 +28,9 @@
*/
void nrf53_cpunet_enable(bool on);
/**
* @brief Configure the security setting of the network CPU and then enable it.
*/
void nrf53_cpunet_init(void);
#endif /* NRF53_CPUNET_MGMT_H__ */

View file

@ -38,6 +38,8 @@
#include <cmsis_core.h>
#include "nrf53_cpunet_mgmt.h"
#define PIN_XL1 0
#define PIN_XL2 1
@ -562,6 +564,9 @@ void soc_late_init_hook(void)
(void)err;
#endif
#ifdef CONFIG_SOC_NRF53_CPUNET_ENABLE
nrf53_cpunet_init();
#endif
}
void arch_busy_wait(uint32_t time_us)