Commit 8007e248 authored by Sebastian Bøe's avatar Sebastian Bøe Committed by Benjamin Cabé
Browse files

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: default avatarSebastian Bøe <sebastian.boe@nordicsemi.no>
parent 5d9f5543
Loading
Loading
Loading
Loading
+1 −1
Changes for soc/nordic/nrf53/Kconfig: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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
+1 −5
Changes for soc/nordic/nrf53/nrf53_cpunet_mgmt.c: 1 added line, 5 removed lines.
Original line number Diff line number Diff line
@@ -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 */
+5 −0
Changes for soc/nordic/nrf53/nrf53_cpunet_mgmt.h: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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__ */
+5 −0
Changes for soc/nordic/nrf53/soc.c: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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)