soc: openisa: move init code from SYS_INIT to hooks

Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2024-09-10 09:42:41 -04:00 committed by Henrik Brix Andersen
commit 911d5532bb
2 changed files with 2 additions and 5 deletions

View file

@ -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

View file

@ -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);