From c9e0a4b843ae2bc5d99e834df73ceaf88200c087 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Tue, 10 Sep 2024 09:42:31 -0400 Subject: [PATCH] soc: ene: move init code from SYS_INIT to hooks Replace SYS_INIT with SoC hooks and adapt SoC init code Signed-off-by: Anas Nashif --- soc/ene/kb1200/Kconfig | 1 + soc/ene/kb1200/soc.c | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/soc/ene/kb1200/Kconfig b/soc/ene/kb1200/Kconfig index 102065edeb8..96f489d1d0e 100644 --- a/soc/ene/kb1200/Kconfig +++ b/soc/ene/kb1200/Kconfig @@ -7,3 +7,4 @@ config SOC_KB1200 select CPU_HAS_ARM_MPU select CPU_CORTEX_M_HAS_DWT select CPU_HAS_FPU + select SOC_EARLY_INIT_HOOK diff --git a/soc/ene/kb1200/soc.c b/soc/ene/kb1200/soc.c index 6abf0180fb9..8ec63721dad 100644 --- a/soc/ene/kb1200/soc.c +++ b/soc/ene/kb1200/soc.c @@ -39,11 +39,8 @@ static void clock_init(void) } } -static int kb1200_init(void) +void soc_early_init_hook(void) { clock_init(); pmu_init(); - return 0; } - -SYS_INIT(kb1200_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);