diff --git a/soc/brcm/bcmvk/viper/Kconfig b/soc/brcm/bcmvk/viper/Kconfig index e6266d10456..20b30195bc6 100644 --- a/soc/brcm/bcmvk/viper/Kconfig +++ b/soc/brcm/bcmvk/viper/Kconfig @@ -6,8 +6,10 @@ config SOC_BCM58402_M7 select CPU_CORTEX_M7 select CPU_CORTEX_M_HAS_SYSTICK select CPU_HAS_ARM_MPU + select SOC_EARLY_INIT_HOOK config SOC_BCM58402_A72 select ARM64 select CPU_CORTEX_A72 select ARM_ARCH_TIMER if SYS_CLOCK_EXISTS + select SOC_EARLY_INIT_HOOK diff --git a/soc/brcm/bcmvk/viper/a72/soc.c b/soc/brcm/bcmvk/viper/a72/soc.c index 9bc05f01425..a30d246cf07 100644 --- a/soc/brcm/bcmvk/viper/a72/soc.c +++ b/soc/brcm/bcmvk/viper/a72/soc.c @@ -13,11 +13,8 @@ * @brief Perform basic hardware initialization at boot. * * This needs to be run from the very beginning. - * So the init priority has to be 0 (zero). - * - * @return 0 */ -static int viper_init(void) +void soc_early_init_hook(void) { uint32_t key; uint32_t data; @@ -35,8 +32,4 @@ static int viper_init(void) sys_write32(data, LS_ICFG_PMON_LITE_SW_RESETN); irq_unlock(key); - - return 0; } - -SYS_INIT(viper_init, PRE_KERNEL_1, 0); diff --git a/soc/brcm/bcmvk/viper/m7/soc.c b/soc/brcm/bcmvk/viper/m7/soc.c index d18d13ce884..61ab7eb3b30 100644 --- a/soc/brcm/bcmvk/viper/m7/soc.c +++ b/soc/brcm/bcmvk/viper/m7/soc.c @@ -13,11 +13,8 @@ * @brief Perform basic hardware initialization at boot. * * This needs to be run from the very beginning. - * So the init priority has to be 0 (zero). - * - * @return 0 */ -static int viper_init(void) +void soc_early_init_hook(void) { uint32_t data; @@ -29,8 +26,4 @@ static int viper_init(void) data = sys_read32(LS_ICFG_PMON_LITE_SW_RESETN); data |= PCIE_PMON_LITE_SW_RESETN; sys_write32(data, LS_ICFG_PMON_LITE_SW_RESETN); - - return 0; } - -SYS_INIT(viper_init, PRE_KERNEL_1, 0);