diff --git a/soc/openisa/rv32m1/Kconfig b/soc/openisa/rv32m1/Kconfig index 199d13ba744..0ee9dd7565a 100644 --- a/soc/openisa/rv32m1/Kconfig +++ b/soc/openisa/rv32m1/Kconfig @@ -20,3 +20,4 @@ config SOC_OPENISA_RV32M1 select RISCV_ISA_EXT_C select RISCV_ISA_EXT_ZICSR select RISCV_ISA_EXT_ZIFENCEI + select SOC_EARLY_INIT_HOOK diff --git a/soc/openisa/rv32m1/soc.c b/soc/openisa/rv32m1/soc.c index 95edf0c5383..cfcc6a0387b 100644 --- a/soc/openisa/rv32m1/soc.c +++ b/soc/openisa/rv32m1/soc.c @@ -218,7 +218,7 @@ static void rv32m1_setup_peripheral_clocks(void) * * @return 0 */ -static int soc_rv32m1_init(void) +void soc_early_init_hook(void) { unsigned int key; @@ -239,8 +239,4 @@ static int soc_rv32m1_init(void) rv32m1_setup_peripheral_clocks(); irq_unlock(key); - - return 0; } - -SYS_INIT(soc_rv32m1_init, PRE_KERNEL_1, 0);