Browse Source

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>
pull/78767/head
Anas Nashif 10 months ago committed by Henrik Brix Andersen
parent
commit
911d5532bb
  1. 1
      soc/openisa/rv32m1/Kconfig
  2. 6
      soc/openisa/rv32m1/soc.c

1
soc/openisa/rv32m1/Kconfig

@ -20,3 +20,4 @@ config SOC_OPENISA_RV32M1 @@ -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

6
soc/openisa/rv32m1/soc.c

@ -218,7 +218,7 @@ static void rv32m1_setup_peripheral_clocks(void) @@ -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) @@ -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);

Loading…
Cancel
Save