Commit 1d791035 authored by Anas Nashif's avatar Anas Nashif Committed by Henrik Brix Andersen
Browse files

soc: microchip: move init code from SYS_INIT to hooks



Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: default avatarAnas Nashif <anas.nashif@intel.com>
parent 8a16c720
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ config SOC_SERIES_MEC15XX
	select CPU_CORTEX_M_HAS_DWT
	select CPU_HAS_ARM_MPU
	select HAS_PM
	select SOC_EARLY_INIT_HOOK

config SOC_MEC1501_HSZ
	select HAS_MEC_HAL
+1 −5
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ static void configure_debug_interface(void)
#endif /* CONFIG_SOC_MEC1501_DEBUG_WITHOUT_TRACING */
}

static int soc_init(void)
void soc_early_init_hook(void)
{
	uint32_t isave;

@@ -94,8 +94,4 @@ static int soc_init(void)
	if (!isave) {
		__enable_irq();
	}

	return 0;
}

SYS_INIT(soc_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ config SOC_SERIES_MEC172X
	select CPU_HAS_ARM_MPU
	select HAS_SWO
	select HAS_PM
	select SOC_EARLY_INIT_HOOK

if SOC_SERIES_MEC172X

+1 −5
Original line number Diff line number Diff line
@@ -38,12 +38,8 @@ static void configure_debug_interface(void)
#endif /* CONFIG_SOC_MEC172X_DEBUG_DISABLED */
}

static int soc_init(void)
void soc_early_init_hook(void)
{

	configure_debug_interface();

	return 0;
}

SYS_INIT(soc_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ config SOC_SERIES_MEC174X
	select HAS_SWO
	select HAS_MEC5_HAL
	select HAS_PM
	select SOC_PREP_HOOK

if SOC_SERIES_MEC174X

Loading