diff --git a/arch/arm/core/Kconfig b/arch/arm/core/Kconfig index 41c2b1f7684..8d677d9787e 100644 --- a/arch/arm/core/Kconfig +++ b/arch/arm/core/Kconfig @@ -166,11 +166,15 @@ config RUNTIME_NMI needed, enable this option and attach it via z_arm_nmi_set_handler(). config PLATFORM_SPECIFIC_INIT - bool "Platform (SOC) specific startup hook" + bool "Platform (SOC) specific startup hook [DEPRECATED]" + select DEPRECATED + select SOC_RESET_HOOK help The platform specific initialization code (z_arm_platform_init) is executed at the beginning of the startup code (__start). + This option is deprecated, use SOC_RESET_HOOK instead. + config FAULT_DUMP int "Fault dump level" default 2 diff --git a/arch/arm/core/cortex_a_r/reset.S b/arch/arm/core/cortex_a_r/reset.S index 5cba6cb079e..efb04d249ec 100644 --- a/arch/arm/core/cortex_a_r/reset.S +++ b/arch/arm/core/cortex_a_r/reset.S @@ -30,8 +30,8 @@ GDATA(z_arm_sys_stack) GDATA(z_arm_fiq_stack) GDATA(z_arm_abort_stack) GDATA(z_arm_undef_stack) -#if defined(CONFIG_PLATFORM_SPECIFIC_INIT) -GTEXT(z_arm_platform_init) +#if defined(CONFIG_SOC_RESET_HOOK) +GTEXT(soc_reset_hook) #endif /** @@ -305,9 +305,9 @@ _primary_core: msr CPSR_c, #(MODE_SYS | I_BIT | F_BIT) mov sp, r10 -#if defined(CONFIG_PLATFORM_SPECIFIC_INIT) +#if defined(CONFIG_SOC_RESET_HOOK) /* Execute platform-specific initialisation if applicable */ - bl z_arm_platform_init + bl soc_reset_hook #endif #if defined(CONFIG_WDOG_INIT) diff --git a/arch/arm/core/cortex_m/reset.S b/arch/arm/core/cortex_m/reset.S index 332f1a60c10..bc75ccfceaa 100644 --- a/arch/arm/core/cortex_m/reset.S +++ b/arch/arm/core/cortex_m/reset.S @@ -24,8 +24,8 @@ GDATA(z_interrupt_stacks) #if defined(CONFIG_DEBUG_THREAD_INFO) GDATA(z_sys_post_kernel) #endif -#if defined(CONFIG_PLATFORM_SPECIFIC_INIT) -GTEXT(z_arm_platform_init) +#if defined(CONFIG_SOC_RESET_HOOK) +GTEXT(soc_reset_hook) #endif #if defined(CONFIG_INIT_ARCH_HW_AT_BOOT) GTEXT(z_arm_init_arch_hw_at_boot) @@ -93,8 +93,8 @@ SECTION_SUBSEC_FUNC(TEXT,_reset_section,__start) bl arch_pm_s2ram_resume #endif /* CONFIG_PM_S2RAM */ -#if defined(CONFIG_PLATFORM_SPECIFIC_INIT) - bl z_arm_platform_init +#if defined(CONFIG_SOC_RESET_HOOK) + bl soc_reset_hook #endif #if defined(CONFIG_INIT_ARCH_HW_AT_BOOT) diff --git a/drivers/clock_control/clock_control_numaker_scc.c b/drivers/clock_control/clock_control_numaker_scc.c index c8dd340eaef..8f1092ad85f 100644 --- a/drivers/clock_control/clock_control_numaker_scc.c +++ b/drivers/clock_control/clock_control_numaker_scc.c @@ -136,7 +136,7 @@ static int numaker_scc_init(const struct device *dev) #endif /* - * z_arm_platform_init() will respect above configurations and + * soc_reset_hook() will respect above configurations and * actually take charge of system clock control initialization. */ diff --git a/samples/drivers/ipm/ipm_mcux/remote/prj.conf b/samples/drivers/ipm/ipm_mcux/remote/prj.conf index 9823a473bcf..633d81ffc7f 100644 --- a/samples/drivers/ipm/ipm_mcux/remote/prj.conf +++ b/samples/drivers/ipm/ipm_mcux/remote/prj.conf @@ -1,6 +1,6 @@ CONFIG_STDOUT_CONSOLE=n CONFIG_PRINTK=n CONFIG_IPM=y -CONFIG_PLATFORM_SPECIFIC_INIT=n +CONFIG_SOC_RESET_HOOK=n CONFIG_SECOND_CORE_MCUX=y CONFIG_BUILD_OUTPUT_HEX=y diff --git a/samples/subsys/ipc/openamp/remote/prj.conf b/samples/subsys/ipc/openamp/remote/prj.conf index e0a369edab3..ffe8ef34229 100644 --- a/samples/subsys/ipc/openamp/remote/prj.conf +++ b/samples/subsys/ipc/openamp/remote/prj.conf @@ -1,7 +1,7 @@ CONFIG_STDOUT_CONSOLE=n CONFIG_PRINTK=n CONFIG_IPM=y -CONFIG_PLATFORM_SPECIFIC_INIT=n +CONFIG_SOC_RESET_HOOK=n CONFIG_HEAP_MEM_POOL_SIZE=4096 CONFIG_OPENAMP=y CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=4096 diff --git a/samples/subsys/ipc/openamp_rsc_table/boards/colibri_imx7d_mcimx7d_m4.conf b/samples/subsys/ipc/openamp_rsc_table/boards/colibri_imx7d_mcimx7d_m4.conf index 8c960fc2dd3..1933f35d626 100644 --- a/samples/subsys/ipc/openamp_rsc_table/boards/colibri_imx7d_mcimx7d_m4.conf +++ b/samples/subsys/ipc/openamp_rsc_table/boards/colibri_imx7d_mcimx7d_m4.conf @@ -1,7 +1,7 @@ CONFIG_IPM=y CONFIG_IPM_IMX_MAX_DATA_SIZE_4=y CONFIG_OPENAMP_WITH_DCACHE=y -CONFIG_PLATFORM_SPECIFIC_INIT=n +CONFIG_SOC_RESET_HOOK=n CONFIG_OPENAMP=y CONFIG_OPENAMP_RSC_TABLE_NUM_RPMSG_BUFF=32 CONFIG_OPENAMP_RSC_TABLE=y diff --git a/samples/subsys/ipc/openamp_rsc_table/boards/stm32mp157c_dk2.conf b/samples/subsys/ipc/openamp_rsc_table/boards/stm32mp157c_dk2.conf index f36a9598e4b..acf7e44c290 100644 --- a/samples/subsys/ipc/openamp_rsc_table/boards/stm32mp157c_dk2.conf +++ b/samples/subsys/ipc/openamp_rsc_table/boards/stm32mp157c_dk2.conf @@ -1 +1 @@ -CONFIG_PLATFORM_SPECIFIC_INIT=n +CONFIG_SOC_RESET_HOOK=n diff --git a/soc/arm/fvp_aemv8r/Kconfig b/soc/arm/fvp_aemv8r/Kconfig index 61136d864cc..a40fc6f86cb 100644 --- a/soc/arm/fvp_aemv8r/Kconfig +++ b/soc/arm/fvp_aemv8r/Kconfig @@ -13,5 +13,5 @@ config SOC_FVP_AEMV8R_AARCH32 select CPU_HAS_MPU select VFP_DP_D32_FP16_FMAC if !USE_SWITCH select GIC_SINGLE_SECURITY_STATE - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select ARM diff --git a/soc/arm/fvp_aemv8r/aarch32/soc.c b/soc/arm/fvp_aemv8r/aarch32/soc.c index 56532ce9a9f..4d6544d1eac 100644 --- a/soc/arm/fvp_aemv8r/aarch32/soc.c +++ b/soc/arm/fvp_aemv8r/aarch32/soc.c @@ -8,7 +8,7 @@ #include #include -void z_arm_platform_init(void) +void soc_reset_hook(void) { if (IS_ENABLED(CONFIG_ICACHE)) { if (!(__get_SCTLR() & SCTLR_I_Msk)) { diff --git a/soc/aspeed/Kconfig b/soc/aspeed/Kconfig index 5d28220c246..aab2e8b2c06 100644 --- a/soc/aspeed/Kconfig +++ b/soc/aspeed/Kconfig @@ -3,7 +3,7 @@ # Copyright (c) 2021 ASPEED Technology Inc. config SOC_FAMILY_ASPEED - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK if SOC_FAMILY_ASPEED diff --git a/soc/aspeed/ast10x0/soc.c b/soc/aspeed/ast10x0/soc.c index f443fcd4231..5df1ca21b66 100644 --- a/soc/aspeed/ast10x0/soc.c +++ b/soc/aspeed/ast10x0/soc.c @@ -84,7 +84,7 @@ struct sb_header sbh __attribute((used, section(".sboot"))) = { .img_size = (uint32_t)&__bss_start, }; -void z_arm_platform_init(void) +void soc_reset_hook(void) { uint32_t jtag_pinmux; uint32_t base = DT_REG_ADDR(DT_NODELABEL(syscon)); diff --git a/soc/atmel/sam/sam3x/Kconfig b/soc/atmel/sam/sam3x/Kconfig index 1f66f4ef398..4dc448a4c69 100644 --- a/soc/atmel/sam/sam3x/Kconfig +++ b/soc/atmel/sam/sam3x/Kconfig @@ -11,5 +11,5 @@ config SOC_SERIES_SAM3X select CPU_CORTEX_M3 select CPU_CORTEX_M_HAS_DWT select CPU_HAS_ARM_MPU - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select HAS_POWEROFF diff --git a/soc/atmel/sam/sam3x/soc.c b/soc/atmel/sam/sam3x/soc.c index 08e803c4f1d..969b603d912 100644 --- a/soc/atmel/sam/sam3x/soc.c +++ b/soc/atmel/sam/sam3x/soc.c @@ -97,7 +97,7 @@ static ALWAYS_INLINE void clock_init(void) } } -void z_arm_platform_init(void) +void soc_reset_hook(void) { if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_WAIT_MODE)) { /* diff --git a/soc/atmel/sam/sam4e/Kconfig b/soc/atmel/sam/sam4e/Kconfig index 57441f1eaef..e150ff372bc 100644 --- a/soc/atmel/sam/sam4e/Kconfig +++ b/soc/atmel/sam/sam4e/Kconfig @@ -11,5 +11,5 @@ config SOC_SERIES_SAM4E select CPU_CORTEX_M_HAS_DWT select CPU_HAS_ARM_MPU select CPU_HAS_FPU - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select HAS_POWEROFF diff --git a/soc/atmel/sam/sam4e/soc.c b/soc/atmel/sam/sam4e/soc.c index 82468f48738..59bb24ac0b9 100644 --- a/soc/atmel/sam/sam4e/soc.c +++ b/soc/atmel/sam/sam4e/soc.c @@ -89,7 +89,7 @@ static ALWAYS_INLINE void clock_init(void) } } -void z_arm_platform_init(void) +void soc_reset_hook(void) { if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_WAIT_MODE)) { /* diff --git a/soc/atmel/sam/sam4l/Kconfig b/soc/atmel/sam/sam4l/Kconfig index 15ad8ba2583..eae8f9abb41 100644 --- a/soc/atmel/sam/sam4l/Kconfig +++ b/soc/atmel/sam/sam4l/Kconfig @@ -6,5 +6,5 @@ config SOC_SERIES_SAM4L select CPU_CORTEX_M4 select CPU_CORTEX_M_HAS_DWT select CPU_HAS_ARM_MPU - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select HAS_POWEROFF diff --git a/soc/atmel/sam/sam4l/soc.c b/soc/atmel/sam/sam4l/soc.c index c4e7b48ce1a..3836d99723e 100644 --- a/soc/atmel/sam/sam4l/soc.c +++ b/soc/atmel/sam/sam4l/soc.c @@ -253,7 +253,7 @@ static ALWAYS_INLINE void clock_init(void) PM->MCCTRL = OSC_SRC_PLL0; } -void z_arm_platform_init(void) +void soc_reset_hook(void) { #if defined(CONFIG_WDT_DISABLE_AT_BOOT) wdt_set_ctrl(WDT->CTRL & ~WDT_CTRL_EN); diff --git a/soc/atmel/sam/sam4s/Kconfig b/soc/atmel/sam/sam4s/Kconfig index 26836bc509b..79458560782 100644 --- a/soc/atmel/sam/sam4s/Kconfig +++ b/soc/atmel/sam/sam4s/Kconfig @@ -10,5 +10,5 @@ config SOC_SERIES_SAM4S select CPU_CORTEX_M4 select CPU_CORTEX_M_HAS_DWT select CPU_HAS_ARM_MPU - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select HAS_POWEROFF diff --git a/soc/atmel/sam/sam4s/soc.c b/soc/atmel/sam/sam4s/soc.c index 09c42eae391..a98fd79b312 100644 --- a/soc/atmel/sam/sam4s/soc.c +++ b/soc/atmel/sam/sam4s/soc.c @@ -95,7 +95,7 @@ static ALWAYS_INLINE void clock_init(void) } } -void z_arm_platform_init(void) +void soc_reset_hook(void) { if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_WAIT_MODE)) { /* diff --git a/soc/atmel/sam/same70/Kconfig b/soc/atmel/sam/same70/Kconfig index f799cd43c69..bea8055cbbd 100644 --- a/soc/atmel/sam/same70/Kconfig +++ b/soc/atmel/sam/same70/Kconfig @@ -13,7 +13,7 @@ config SOC_SERIES_SAME70 select CPU_HAS_ICACHE select CPU_HAS_DCACHE select INIT_ARCH_HW_AT_BOOT - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select HAS_SWO select XIP select HAS_POWEROFF diff --git a/soc/atmel/sam/same70/soc.c b/soc/atmel/sam/same70/soc.c index 4db92e8cebf..a9d886c8a87 100644 --- a/soc/atmel/sam/same70/soc.c +++ b/soc/atmel/sam/same70/soc.c @@ -105,7 +105,7 @@ static ALWAYS_INLINE void clock_init(void) } } -void z_arm_platform_init(void) +void soc_reset_hook(void) { if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_WAIT_MODE)) { /* diff --git a/soc/atmel/sam/samv71/Kconfig b/soc/atmel/sam/samv71/Kconfig index 682adb4a715..347c798bb2d 100644 --- a/soc/atmel/sam/samv71/Kconfig +++ b/soc/atmel/sam/samv71/Kconfig @@ -13,7 +13,7 @@ config SOC_SERIES_SAMV71 select CPU_HAS_ICACHE select CPU_HAS_DCACHE select INIT_ARCH_HW_AT_BOOT - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select HAS_SWO select XIP select HAS_POWEROFF diff --git a/soc/atmel/sam/samv71/soc.c b/soc/atmel/sam/samv71/soc.c index e5129e30e80..8527e1b85a2 100644 --- a/soc/atmel/sam/samv71/soc.c +++ b/soc/atmel/sam/samv71/soc.c @@ -102,7 +102,7 @@ static ALWAYS_INLINE void clock_init(void) } } -void z_arm_platform_init(void) +void soc_reset_hook(void) { if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_WAIT_MODE)) { /* diff --git a/soc/atmel/sam0/common/soc_samc2x.c b/soc/atmel/sam0/common/soc_samc2x.c index 69c7b5bfae6..d133ee97187 100644 --- a/soc/atmel/sam0/common/soc_samc2x.c +++ b/soc/atmel/sam0/common/soc_samc2x.c @@ -43,7 +43,7 @@ static void gclks_init(void) | GCLK_GENCTRL_GENEN; } -void z_arm_platform_init(void) +void soc_reset_hook(void) { flash_waitstates_init(); osc48m_init(); diff --git a/soc/atmel/sam0/common/soc_samd2x.c b/soc/atmel/sam0/common/soc_samd2x.c index 6f86ac1a8a7..f915459a576 100644 --- a/soc/atmel/sam0/common/soc_samd2x.c +++ b/soc/atmel/sam0/common/soc_samd2x.c @@ -286,7 +286,7 @@ static inline void osc8m_disable(void) } #endif -void z_arm_platform_init(void) +void soc_reset_hook(void) { osc8m_init(); osc32k_init(); diff --git a/soc/atmel/sam0/common/soc_samd5x.c b/soc/atmel/sam0/common/soc_samd5x.c index d8a71386f66..c18f4e37b9a 100644 --- a/soc/atmel/sam0/common/soc_samd5x.c +++ b/soc/atmel/sam0/common/soc_samd5x.c @@ -105,7 +105,7 @@ static void gclk_connect(uint8_t gclk, uint8_t src, uint8_t div) | GCLK_GENCTRL_GENEN; } -void z_arm_platform_init(void) +void soc_reset_hook(void) { uint8_t dfll_div; diff --git a/soc/atmel/sam0/common/soc_saml2x.c b/soc/atmel/sam0/common/soc_saml2x.c index e7d4746fcb1..3dd657a52f2 100644 --- a/soc/atmel/sam0/common/soc_saml2x.c +++ b/soc/atmel/sam0/common/soc_saml2x.c @@ -251,7 +251,7 @@ static inline void pause_for_debug(void) static inline void pause_for_debug(void) {} #endif -void z_arm_platform_init(void) +void soc_reset_hook(void) { pause_for_debug(); diff --git a/soc/atmel/sam0/samc20/Kconfig b/soc/atmel/sam0/samc20/Kconfig index 8c9345e000f..98a68c63e3f 100644 --- a/soc/atmel/sam0/samc20/Kconfig +++ b/soc/atmel/sam0/samc20/Kconfig @@ -9,4 +9,4 @@ config SOC_SERIES_SAMC20 select CPU_CORTEX_M0PLUS select CPU_CORTEX_M_HAS_SYSTICK select CPU_CORTEX_M_HAS_VTOR - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK diff --git a/soc/atmel/sam0/samc21/Kconfig b/soc/atmel/sam0/samc21/Kconfig index 51637a0b4ba..ea774ca51a1 100644 --- a/soc/atmel/sam0/samc21/Kconfig +++ b/soc/atmel/sam0/samc21/Kconfig @@ -10,4 +10,4 @@ config SOC_SERIES_SAMC21 select CPU_CORTEX_M_HAS_SYSTICK select CPU_CORTEX_M_HAS_VTOR select CPU_HAS_ARM_MPU - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK diff --git a/soc/atmel/sam0/samd20/Kconfig b/soc/atmel/sam0/samd20/Kconfig index 1fea4396b5f..709104ecddb 100644 --- a/soc/atmel/sam0/samd20/Kconfig +++ b/soc/atmel/sam0/samd20/Kconfig @@ -9,4 +9,4 @@ config SOC_SERIES_SAMD20 select CPU_CORTEX_M0PLUS select CPU_CORTEX_M_HAS_SYSTICK select CPU_CORTEX_M_HAS_VTOR - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK diff --git a/soc/atmel/sam0/samd21/Kconfig b/soc/atmel/sam0/samd21/Kconfig index f968f52246a..8350b4b580f 100644 --- a/soc/atmel/sam0/samd21/Kconfig +++ b/soc/atmel/sam0/samd21/Kconfig @@ -9,4 +9,4 @@ config SOC_SERIES_SAMD21 select CPU_CORTEX_M0PLUS select CPU_CORTEX_M_HAS_SYSTICK select CPU_CORTEX_M_HAS_VTOR - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK diff --git a/soc/atmel/sam0/samd51/Kconfig b/soc/atmel/sam0/samd51/Kconfig index fb846ef9c64..6922da88d3b 100644 --- a/soc/atmel/sam0/samd51/Kconfig +++ b/soc/atmel/sam0/samd51/Kconfig @@ -10,4 +10,4 @@ config SOC_SERIES_SAMD51 select CPU_CORTEX_M_HAS_DWT select CPU_HAS_ARM_MPU select CPU_HAS_FPU - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK diff --git a/soc/atmel/sam0/same51/Kconfig b/soc/atmel/sam0/same51/Kconfig index 35aa9996a7b..8f23c451382 100644 --- a/soc/atmel/sam0/same51/Kconfig +++ b/soc/atmel/sam0/same51/Kconfig @@ -10,4 +10,4 @@ config SOC_SERIES_SAME51 select CPU_CORTEX_M_HAS_DWT select CPU_HAS_ARM_MPU select CPU_HAS_FPU - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK diff --git a/soc/atmel/sam0/same53/Kconfig b/soc/atmel/sam0/same53/Kconfig index 670f155e926..188502a60e7 100644 --- a/soc/atmel/sam0/same53/Kconfig +++ b/soc/atmel/sam0/same53/Kconfig @@ -10,4 +10,4 @@ config SOC_SERIES_SAME53 select CPU_CORTEX_M_HAS_DWT select CPU_HAS_ARM_MPU select CPU_HAS_FPU - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK diff --git a/soc/atmel/sam0/same54/Kconfig b/soc/atmel/sam0/same54/Kconfig index 2bd2359eb2e..7042634562b 100644 --- a/soc/atmel/sam0/same54/Kconfig +++ b/soc/atmel/sam0/same54/Kconfig @@ -10,4 +10,4 @@ config SOC_SERIES_SAME54 select CPU_CORTEX_M_HAS_DWT select CPU_HAS_ARM_MPU select CPU_HAS_FPU - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK diff --git a/soc/atmel/sam0/saml21/Kconfig b/soc/atmel/sam0/saml21/Kconfig index 1fbc5336a57..bc5026fb903 100644 --- a/soc/atmel/sam0/saml21/Kconfig +++ b/soc/atmel/sam0/saml21/Kconfig @@ -9,4 +9,4 @@ config SOC_SERIES_SAML21 select CPU_CORTEX_M0PLUS select CPU_CORTEX_M_HAS_SYSTICK select CPU_CORTEX_M_HAS_VTOR - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK diff --git a/soc/atmel/sam0/samr21/Kconfig b/soc/atmel/sam0/samr21/Kconfig index 823be5d13ea..d02e4872a28 100644 --- a/soc/atmel/sam0/samr21/Kconfig +++ b/soc/atmel/sam0/samr21/Kconfig @@ -9,4 +9,4 @@ config SOC_SERIES_SAMR21 select CPU_CORTEX_M0PLUS select CPU_CORTEX_M_HAS_SYSTICK select CPU_CORTEX_M_HAS_VTOR - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK diff --git a/soc/atmel/sam0/samr34/Kconfig b/soc/atmel/sam0/samr34/Kconfig index 05675901e4f..86e0ec52169 100644 --- a/soc/atmel/sam0/samr34/Kconfig +++ b/soc/atmel/sam0/samr34/Kconfig @@ -9,4 +9,4 @@ config SOC_SERIES_SAMR34 select CPU_CORTEX_M0PLUS select CPU_CORTEX_M_HAS_SYSTICK select CPU_CORTEX_M_HAS_VTOR - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK diff --git a/soc/atmel/sam0/samr35/Kconfig b/soc/atmel/sam0/samr35/Kconfig index c5fa8e5d048..50196a2460b 100644 --- a/soc/atmel/sam0/samr35/Kconfig +++ b/soc/atmel/sam0/samr35/Kconfig @@ -9,4 +9,4 @@ config SOC_SERIES_SAMR35 select CPU_CORTEX_M0PLUS select CPU_CORTEX_M_HAS_SYSTICK select CPU_CORTEX_M_HAS_VTOR - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK diff --git a/soc/gd/gd32/gd32a50x/Kconfig b/soc/gd/gd32/gd32a50x/Kconfig index 8cd903e86ad..2d9eafd5da7 100644 --- a/soc/gd/gd32/gd32a50x/Kconfig +++ b/soc/gd/gd32/gd32a50x/Kconfig @@ -9,4 +9,4 @@ config SOC_SERIES_GD32A50X select CPU_CORTEX_M33 select GD32_HAS_AF_PINMUX select GD32_HAS_IRC_40K - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK diff --git a/soc/gd/gd32/gd32a50x/soc.c b/soc/gd/gd32/gd32a50x/soc.c index 5f8024f7fd6..d19045f946c 100644 --- a/soc/gd/gd32/gd32a50x/soc.c +++ b/soc/gd/gd32/gd32a50x/soc.c @@ -8,7 +8,7 @@ #include /* initial ecc memory */ -void z_arm_platform_init(void) +void soc_reset_hook(void) { register unsigned r0 __asm("r0") = DT_REG_ADDR(DT_CHOSEN(zephyr_sram)); register unsigned r1 __asm("r1") = diff --git a/soc/infineon/cat3/Kconfig b/soc/infineon/cat3/Kconfig index 8720e3a27b2..3985b85ada0 100644 --- a/soc/infineon/cat3/Kconfig +++ b/soc/infineon/cat3/Kconfig @@ -5,7 +5,7 @@ config SOC_FAMILY_INFINEON_XMC select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK if SOC_FAMILY_INFINEON_XMC diff --git a/soc/infineon/cat3/xmc4xxx/soc.c b/soc/infineon/cat3/xmc4xxx/soc.c index 44e83a63c6f..dc5bd8ba7df 100644 --- a/soc/infineon/cat3/xmc4xxx/soc.c +++ b/soc/infineon/cat3/xmc4xxx/soc.c @@ -17,7 +17,7 @@ #define PMU_FLASH_WS (0x4U) #endif -void z_arm_platform_init(void) +void soc_reset_hook(void) { uint32_t temp; diff --git a/soc/nordic/Kconfig b/soc/nordic/Kconfig index c26aaf71e16..e0063b858ed 100644 --- a/soc/nordic/Kconfig +++ b/soc/nordic/Kconfig @@ -8,7 +8,7 @@ config SOC_FAMILY_NORDIC_NRF select SOC_COMPATIBLE_NRF - select PLATFORM_SPECIFIC_INIT if ARM + select SOC_RESET_HOOK if ARM if SOC_FAMILY_NORDIC_NRF diff --git a/soc/nordic/common/CMakeLists.txt b/soc/nordic/common/CMakeLists.txt index 37f27e250de..38c55c614e9 100644 --- a/soc/nordic/common/CMakeLists.txt +++ b/soc/nordic/common/CMakeLists.txt @@ -4,8 +4,8 @@ add_subdirectory_ifdef(CONFIG_RISCV_CORE_NORDIC_VPR vpr) if(CONFIG_ARM) - # Let SystemInit() be called in place of z_arm_platform_init() by default. - zephyr_linker_symbol(SYMBOL z_arm_platform_init EXPR "@SystemInit@") + # Let SystemInit() be called in place of soc_reset_hook() by default. + zephyr_linker_symbol(SYMBOL soc_reset_hook EXPR "@SystemInit@") # This file is used when the CMake linker script generator is disabled. zephyr_linker_sources(SECTIONS arm_platform_init.ld) diff --git a/soc/nordic/common/arm_platform_init.ld b/soc/nordic/common/arm_platform_init.ld index 9773ada3dcf..96313547943 100644 --- a/soc/nordic/common/arm_platform_init.ld +++ b/soc/nordic/common/arm_platform_init.ld @@ -4,5 +4,5 @@ * SPDX-License-Identifier: Apache-2.0 */ -/* Let SystemInit() be called in place of z_arm_platform_init() by default. */ -PROVIDE(z_arm_platform_init = SystemInit); +/* Let SystemInit() be called in place of soc_reset_hook() by default. */ +PROVIDE(soc_reset_hook = SystemInit); diff --git a/soc/nuvoton/numaker/Kconfig b/soc/nuvoton/numaker/Kconfig index d2a03b31a4d..a6abd847a8a 100644 --- a/soc/nuvoton/numaker/Kconfig +++ b/soc/nuvoton/numaker/Kconfig @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 config SOC_FAMILY_NUMAKER - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK if SOC_FAMILY_NUMAKER diff --git a/soc/nuvoton/numaker/m2l31x/soc.c b/soc/nuvoton/numaker/m2l31x/soc.c index f3274504bb2..e72249641a5 100644 --- a/soc/nuvoton/numaker/m2l31x/soc.c +++ b/soc/nuvoton/numaker/m2l31x/soc.c @@ -9,7 +9,7 @@ /* Hardware and starter kit includes. */ #include -void z_arm_platform_init(void) +void soc_reset_hook(void) { SystemInit(); diff --git a/soc/nuvoton/numaker/m46x/soc.c b/soc/nuvoton/numaker/m46x/soc.c index 889e93c3594..89d561c27f8 100644 --- a/soc/nuvoton/numaker/m46x/soc.c +++ b/soc/nuvoton/numaker/m46x/soc.c @@ -9,7 +9,7 @@ /* Hardware and starter kit includes. */ #include -void z_arm_platform_init(void) +void soc_reset_hook(void) { SystemInit(); diff --git a/soc/nuvoton/numicro/Kconfig b/soc/nuvoton/numicro/Kconfig index 6f80bd23cf7..f8dde67ebe0 100644 --- a/soc/nuvoton/numicro/Kconfig +++ b/soc/nuvoton/numicro/Kconfig @@ -4,7 +4,7 @@ # Author: Saravanan Sekar config SOC_FAMILY_NUMICRO - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK if SOC_FAMILY_NUMICRO diff --git a/soc/nuvoton/numicro/m48x/soc.c b/soc/nuvoton/numicro/m48x/soc.c index 3ac1490f7d8..fd482eef981 100644 --- a/soc/nuvoton/numicro/m48x/soc.c +++ b/soc/nuvoton/numicro/m48x/soc.c @@ -8,7 +8,7 @@ #include #include -void z_arm_platform_init(void) +void soc_reset_hook(void) { SYS_UnlockReg(); diff --git a/soc/nxp/imxrt/imxrt10xx/Kconfig b/soc/nxp/imxrt/imxrt10xx/Kconfig index 689abea38b0..05eb7b5e8ac 100644 --- a/soc/nxp/imxrt/imxrt10xx/Kconfig +++ b/soc/nxp/imxrt/imxrt10xx/Kconfig @@ -6,7 +6,7 @@ config SOC_SERIES_IMXRT10XX select CPU_CORTEX_M_HAS_DWT select CPU_HAS_ICACHE select CPU_HAS_DCACHE - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select CPU_HAS_CUSTOM_FIXED_SOC_MPU_REGIONS select ARM select CLOCK_CONTROL diff --git a/soc/nxp/imxrt/imxrt10xx/soc.c b/soc/nxp/imxrt/imxrt10xx/soc.c index edc5d38f01e..9b197163567 100644 --- a/soc/nxp/imxrt/imxrt10xx/soc.c +++ b/soc/nxp/imxrt/imxrt10xx/soc.c @@ -353,8 +353,8 @@ static int imxrt_init(void) return 0; } -#ifdef CONFIG_PLATFORM_SPECIFIC_INIT -void z_arm_platform_init(void) +#ifdef CONFIG_SOC_RESET_HOOK +void soc_reset_hook(void) { /* Call CMSIS SystemInit */ SystemInit(); diff --git a/soc/nxp/imxrt/imxrt118x/Kconfig b/soc/nxp/imxrt/imxrt118x/Kconfig index c0cfb0ba713..10c8180c300 100644 --- a/soc/nxp/imxrt/imxrt118x/Kconfig +++ b/soc/nxp/imxrt/imxrt118x/Kconfig @@ -3,7 +3,7 @@ config SOC_SERIES_IMXRT118X select CPU_CORTEX_M_HAS_DWT - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select INIT_ARCH_HW_AT_BOOT if SOC_MIMXRT1189_CM33 select ARM select CLOCK_CONTROL diff --git a/soc/nxp/imxrt/imxrt118x/soc.c b/soc/nxp/imxrt/imxrt118x/soc.c index a81f3ed6ea8..2576c858b9e 100644 --- a/soc/nxp/imxrt/imxrt118x/soc.c +++ b/soc/nxp/imxrt/imxrt118x/soc.c @@ -413,8 +413,8 @@ static int imxrt_init(void) return 0; } -#ifdef CONFIG_PLATFORM_SPECIFIC_INIT -void z_arm_platform_init(void) +#ifdef CONFIG_SOC_RESET_HOOK +void soc_reset_hook(void) { SystemInit(); } diff --git a/soc/nxp/imxrt/imxrt11xx/Kconfig b/soc/nxp/imxrt/imxrt11xx/Kconfig index 493bc7a0a1b..434a22a5e15 100644 --- a/soc/nxp/imxrt/imxrt11xx/Kconfig +++ b/soc/nxp/imxrt/imxrt11xx/Kconfig @@ -4,7 +4,7 @@ config SOC_SERIES_IMXRT11XX select CPU_HAS_CUSTOM_FIXED_SOC_MPU_REGIONS select CPU_CORTEX_M_HAS_DWT - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select ARM select CLOCK_CONTROL select HAS_MCUX_CACHE diff --git a/soc/nxp/imxrt/imxrt11xx/soc.c b/soc/nxp/imxrt/imxrt11xx/soc.c index b13f7df2434..7648052177b 100644 --- a/soc/nxp/imxrt/imxrt11xx/soc.c +++ b/soc/nxp/imxrt/imxrt11xx/soc.c @@ -729,8 +729,8 @@ static int imxrt_init(void) return 0; } -#ifdef CONFIG_PLATFORM_SPECIFIC_INIT -void z_arm_platform_init(void) +#ifdef CONFIG_SOC_RESET_HOOK +void soc_reset_hook(void) { SystemInit(); diff --git a/soc/nxp/imxrt/imxrt5xx/Kconfig b/soc/nxp/imxrt/imxrt5xx/Kconfig index 75f695d5cc5..dcaf50b03b1 100644 --- a/soc/nxp/imxrt/imxrt5xx/Kconfig +++ b/soc/nxp/imxrt/imxrt5xx/Kconfig @@ -12,7 +12,7 @@ config SOC_MIMXRT595S_CM33 select CPU_HAS_ARM_SAU select CPU_HAS_ARM_MPU select CPU_HAS_FPU - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select ARMV8_M_DSP select ARM_TRUSTZONE_M select CPU_CORTEX_M_HAS_SYSTICK diff --git a/soc/nxp/imxrt/imxrt5xx/cm33/soc.c b/soc/nxp/imxrt/imxrt5xx/cm33/soc.c index a5bb2a5d78d..c10b404ed48 100644 --- a/soc/nxp/imxrt/imxrt5xx/cm33/soc.c +++ b/soc/nxp/imxrt/imxrt5xx/cm33/soc.c @@ -187,7 +187,7 @@ static void usb_device_clock_init(void) #endif -void z_arm_platform_init(void) +void soc_reset_hook(void) { #ifndef CONFIG_NXP_IMXRT_BOOT_HEADER /* diff --git a/soc/nxp/imxrt/imxrt6xx/Kconfig b/soc/nxp/imxrt/imxrt6xx/Kconfig index 151e99dde15..b68855292e3 100644 --- a/soc/nxp/imxrt/imxrt6xx/Kconfig +++ b/soc/nxp/imxrt/imxrt6xx/Kconfig @@ -6,7 +6,7 @@ config SOC_MIMXRT685S_CM33 select CPU_CORTEX_M33 select CPU_CORTEX_M_HAS_DWT select CLOCK_CONTROL - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select HAS_PM select CPU_HAS_ARM_SAU select CPU_HAS_ARM_MPU diff --git a/soc/nxp/imxrt/imxrt6xx/cm33/soc.c b/soc/nxp/imxrt/imxrt6xx/cm33/soc.c index 9683aec26ea..3bbf672c372 100644 --- a/soc/nxp/imxrt/imxrt6xx/cm33/soc.c +++ b/soc/nxp/imxrt/imxrt6xx/cm33/soc.c @@ -376,9 +376,9 @@ static int nxp_rt600_init(void) return 0; } -#ifdef CONFIG_PLATFORM_SPECIFIC_INIT +#ifdef CONFIG_SOC_RESET_HOOK -void z_arm_platform_init(void) +void soc_reset_hook(void) { #ifndef CONFIG_NXP_IMXRT_BOOT_HEADER /* diff --git a/soc/nxp/kinetis/k2x/Kconfig b/soc/nxp/kinetis/k2x/Kconfig index 29317c2239c..cf61f57132b 100644 --- a/soc/nxp/kinetis/k2x/Kconfig +++ b/soc/nxp/kinetis/k2x/Kconfig @@ -13,7 +13,7 @@ config SOC_SERIES_KINETIS_K2X select CPU_CORTEX_M4 select CPU_CORTEX_M_HAS_DWT select CLOCK_CONTROL - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK config SOC_MK22F51212 select HAS_MCUX diff --git a/soc/nxp/kinetis/k2x/soc.c b/soc/nxp/kinetis/k2x/soc.c index d5108fb49d9..82aecf9b687 100644 --- a/soc/nxp/kinetis/k2x/soc.c +++ b/soc/nxp/kinetis/k2x/soc.c @@ -129,13 +129,13 @@ static int fsl_frdm_k22f_init(void) return 0; } -#ifdef CONFIG_PLATFORM_SPECIFIC_INIT +#ifdef CONFIG_SOC_RESET_HOOK -void z_arm_platform_init(void) +void soc_reset_hook(void) { SystemInit(); } -#endif /* CONFIG_PLATFORM_SPECIFIC_INIT */ +#endif /* CONFIG_SOC_RESET_HOOK */ SYS_INIT(fsl_frdm_k22f_init, PRE_KERNEL_1, 0); diff --git a/soc/nxp/kinetis/k6x/Kconfig b/soc/nxp/kinetis/k6x/Kconfig index 4f7bd55078d..5ec9c9acf21 100644 --- a/soc/nxp/kinetis/k6x/Kconfig +++ b/soc/nxp/kinetis/k6x/Kconfig @@ -10,7 +10,7 @@ config SOC_SERIES_KINETIS_K6X select CPU_HAS_NXP_MPU select HAS_MCUX_PIT select CLOCK_CONTROL - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK config SOC_MK64F12 select HAS_MCUX diff --git a/soc/nxp/kinetis/k6x/soc.c b/soc/nxp/kinetis/k6x/soc.c index 2463b5ddc28..41708af7954 100644 --- a/soc/nxp/kinetis/k6x/soc.c +++ b/soc/nxp/kinetis/k6x/soc.c @@ -166,13 +166,13 @@ static int k6x_init(void) return 0; } -#ifdef CONFIG_PLATFORM_SPECIFIC_INIT +#ifdef CONFIG_SOC_RESET_HOOK -void z_arm_platform_init(void) +void soc_reset_hook(void) { SystemInit(); } -#endif /* CONFIG_PLATFORM_SPECIFIC_INIT */ +#endif /* CONFIG_SOC_RESET_HOOK */ SYS_INIT(k6x_init, PRE_KERNEL_1, 0); diff --git a/soc/nxp/kinetis/k8x/Kconfig b/soc/nxp/kinetis/k8x/Kconfig index ad8c4c85589..649300c3dba 100644 --- a/soc/nxp/kinetis/k8x/Kconfig +++ b/soc/nxp/kinetis/k8x/Kconfig @@ -26,7 +26,7 @@ config SOC_SERIES_KINETIS_K8X select HAS_MCUX_PIT select HAS_MCUX_RCM select HAS_MCUX_CACHE - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK if SOC_SERIES_KINETIS_K8X diff --git a/soc/nxp/kinetis/k8x/soc.c b/soc/nxp/kinetis/k8x/soc.c index 50fa7c1b109..19d6f2df341 100644 --- a/soc/nxp/kinetis/k8x/soc.c +++ b/soc/nxp/kinetis/k8x/soc.c @@ -120,13 +120,13 @@ static int k8x_init(void) return 0; } -#ifdef CONFIG_PLATFORM_SPECIFIC_INIT +#ifdef CONFIG_SOC_RESET_HOOK -void z_arm_platform_init(void) +void soc_reset_hook(void) { SystemInit(); } -#endif /* CONFIG_PLATFORM_SPECIFIC_INIT */ +#endif /* CONFIG_SOC_RESET_HOOK */ SYS_INIT(k8x_init, PRE_KERNEL_1, 0); diff --git a/soc/nxp/kinetis/ke1xf/Kconfig b/soc/nxp/kinetis/ke1xf/Kconfig index 0c5d740624d..a89888edaad 100644 --- a/soc/nxp/kinetis/ke1xf/Kconfig +++ b/soc/nxp/kinetis/ke1xf/Kconfig @@ -29,7 +29,7 @@ config SOC_SERIES_KINETIS_KE1XF select HAS_MCUX_EDMA select HAS_MCUX_PWT select HAS_MCUX_RCM - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select HAS_PM config SOC_MKE16F16 diff --git a/soc/nxp/kinetis/ke1xf/soc.c b/soc/nxp/kinetis/ke1xf/soc.c index b2c0ce95c56..7ada4249dfa 100644 --- a/soc/nxp/kinetis/ke1xf/soc.c +++ b/soc/nxp/kinetis/ke1xf/soc.c @@ -268,7 +268,7 @@ static int ke1xf_init(void) return 0; } -#ifdef CONFIG_PLATFORM_SPECIFIC_INIT +#ifdef CONFIG_SOC_RESET_HOOK #ifdef CONFIG_WDOG_INIT @@ -307,12 +307,12 @@ void z_arm_watchdog_init(void) #endif /* CONFIG_WDOG_INIT */ -void z_arm_platform_init(void) +void soc_reset_hook(void) { /* SystemInit is provided by the NXP SDK */ SystemInit(); } -#endif /* CONFIG_PLATFORM_SPECIFIC_INIT */ +#endif /* CONFIG_SOC_RESET_HOOK */ SYS_INIT(ke1xf_init, PRE_KERNEL_1, 0); diff --git a/soc/nxp/kinetis/ke1xz/Kconfig b/soc/nxp/kinetis/ke1xz/Kconfig index 751257fa4d9..2563a220041 100644 --- a/soc/nxp/kinetis/ke1xz/Kconfig +++ b/soc/nxp/kinetis/ke1xz/Kconfig @@ -11,5 +11,5 @@ config SOC_SERIES_KE1XZ select CPU_CORTEX_M_HAS_VTOR select CLOCK_CONTROL select HAS_MCUX - select PLATFORM_SPECIFIC_INIT select HAS_PM + select SOC_RESET_HOOK diff --git a/soc/nxp/kinetis/ke1xz/soc.c b/soc/nxp/kinetis/ke1xz/soc.c index d5c09b034ed..38521bccc85 100644 --- a/soc/nxp/kinetis/ke1xz/soc.c +++ b/soc/nxp/kinetis/ke1xz/soc.c @@ -153,14 +153,14 @@ static int ke1xz_init(void) return 0; } -#ifdef CONFIG_PLATFORM_SPECIFIC_INIT +#ifdef CONFIG_SOC_RESET_HOOK -void z_arm_platform_init(void) +void soc_reset_hook(void) { /* SystemInit is provided by the NXP SDK */ SystemInit(); } -#endif /* CONFIG_PLATFORM_SPECIFIC_INIT */ +#endif /* CONFIG_SOC_RESET_HOOK */ SYS_INIT(ke1xz_init, PRE_KERNEL_1, 0); diff --git a/soc/nxp/kinetis/kl2x/Kconfig b/soc/nxp/kinetis/kl2x/Kconfig index 6e88ad79fc2..c2e5255e00a 100644 --- a/soc/nxp/kinetis/kl2x/Kconfig +++ b/soc/nxp/kinetis/kl2x/Kconfig @@ -9,7 +9,7 @@ config SOC_SERIES_KINETIS_KL2X select CPU_CORTEX_M_HAS_SYSTICK select CPU_CORTEX_M_HAS_VTOR select CLOCK_CONTROL - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK config SOC_MKL25Z4 select CPU_CORTEX_M0PLUS diff --git a/soc/nxp/kinetis/kl2x/soc.c b/soc/nxp/kinetis/kl2x/soc.c index 3bb71d03e14..9a525b2632c 100644 --- a/soc/nxp/kinetis/kl2x/soc.c +++ b/soc/nxp/kinetis/kl2x/soc.c @@ -87,13 +87,13 @@ static int kl2x_init(void) return 0; } -#ifdef CONFIG_PLATFORM_SPECIFIC_INIT +#ifdef CONFIG_SOC_RESET_HOOK -void z_arm_platform_init(void) +void soc_reset_hook(void) { SystemInit(); } -#endif /* CONFIG_PLATFORM_SPECIFIC_INIT */ +#endif /* CONFIG_SOC_RESET_HOOK */ SYS_INIT(kl2x_init, PRE_KERNEL_1, 0); diff --git a/soc/nxp/kinetis/kv5x/Kconfig b/soc/nxp/kinetis/kv5x/Kconfig index 93a48b3caba..6c9cd6f34ef 100644 --- a/soc/nxp/kinetis/kv5x/Kconfig +++ b/soc/nxp/kinetis/kv5x/Kconfig @@ -21,4 +21,4 @@ config SOC_SERIES_KINETIS_KV5X select HAS_OSC select HAS_MCG select HAS_MCUX_RCM - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK diff --git a/soc/nxp/kinetis/kv5x/soc.c b/soc/nxp/kinetis/kv5x/soc.c index 59b77f1c172..91c4823e4e2 100644 --- a/soc/nxp/kinetis/kv5x/soc.c +++ b/soc/nxp/kinetis/kv5x/soc.c @@ -97,13 +97,13 @@ static int kv5x_init(void) return 0; } -#ifdef CONFIG_PLATFORM_SPECIFIC_INIT +#ifdef CONFIG_SOC_RESET_HOOK -void z_arm_platform_init(void) +void soc_reset_hook(void) { SystemInit(); } -#endif /* CONFIG_PLATFORM_SPECIFIC_INIT */ +#endif /* CONFIG_SOC_RESET_HOOK */ SYS_INIT(kv5x_init, PRE_KERNEL_1, 0); diff --git a/soc/nxp/kinetis/kwx/Kconfig b/soc/nxp/kinetis/kwx/Kconfig index d3e209e3f96..49a9f78c04b 100644 --- a/soc/nxp/kinetis/kwx/Kconfig +++ b/soc/nxp/kinetis/kwx/Kconfig @@ -8,7 +8,7 @@ config SOC_SERIES_KINETIS_KWX select CPU_CORTEX_M_HAS_SYSTICK select CPU_CORTEX_M_HAS_VTOR select CLOCK_CONTROL - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK config SOC_MKW22D5 select CPU_CORTEX_M4 diff --git a/soc/nxp/kinetis/kwx/soc_kw2xd.c b/soc/nxp/kinetis/kwx/soc_kw2xd.c index 8a6b0f8045b..95e5a955acc 100644 --- a/soc/nxp/kinetis/kwx/soc_kw2xd.c +++ b/soc/nxp/kinetis/kwx/soc_kw2xd.c @@ -158,13 +158,13 @@ static int kw2xd_init(void) return 0; } -#ifdef CONFIG_PLATFORM_SPECIFIC_INIT +#ifdef CONFIG_SOC_RESET_HOOK -void z_arm_platform_init(void) +void soc_reset_hook(void) { SystemInit(); } -#endif /* CONFIG_PLATFORM_SPECIFIC_INIT */ +#endif /* CONFIG_SOC_RESET_HOOK */ SYS_INIT(kw2xd_init, PRE_KERNEL_1, 0); diff --git a/soc/nxp/kinetis/kwx/soc_kw4xz.c b/soc/nxp/kinetis/kwx/soc_kw4xz.c index f9d4845eb27..a14fe28c165 100644 --- a/soc/nxp/kinetis/kwx/soc_kw4xz.c +++ b/soc/nxp/kinetis/kwx/soc_kw4xz.c @@ -87,13 +87,13 @@ static int kwx_init(void) return 0; } -#ifdef CONFIG_PLATFORM_SPECIFIC_INIT +#ifdef CONFIG_SOC_RESET_HOOK -void z_arm_platform_init(void) +void soc_reset_hook(void) { SystemInit(); } -#endif /* CONFIG_PLATFORM_SPECIFIC_INIT */ +#endif /* CONFIG_SOC_RESET_HOOK */ SYS_INIT(kwx_init, PRE_KERNEL_1, 0); diff --git a/soc/nxp/lpc/lpc51u68/Kconfig b/soc/nxp/lpc/lpc51u68/Kconfig index fc920bb89e4..8a2436d1237 100644 --- a/soc/nxp/lpc/lpc51u68/Kconfig +++ b/soc/nxp/lpc/lpc51u68/Kconfig @@ -15,7 +15,7 @@ config SOC_SERIES_LPC51U68 select HAS_MCUX_SCTIMER select CPU_CORTEX_M_HAS_SYSTICK select CPU_CORTEX_M_HAS_VTOR - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK config SOC_LPC51U68 select CLOCK_CONTROL diff --git a/soc/nxp/lpc/lpc51u68/soc.c b/soc/nxp/lpc/lpc51u68/soc.c index c4b7b58131a..b38b601baaa 100644 --- a/soc/nxp/lpc/lpc51u68/soc.c +++ b/soc/nxp/lpc/lpc51u68/soc.c @@ -46,13 +46,13 @@ int soc_init(void) return 0; } -#ifdef CONFIG_PLATFORM_SPECIFIC_INIT +#ifdef CONFIG_SOC_RESET_HOOK -void z_arm_platform_init(void) +void soc_reset_hook(void) { SystemInit(); } -#endif /* CONFIG_PLATFORM_SPECIFIC_INIT */ +#endif /* CONFIG_SOC_RESET_HOOK */ SYS_INIT(soc_init, PRE_KERNEL_1, 0); diff --git a/soc/nxp/lpc/lpc54xxx/CMakeLists.txt b/soc/nxp/lpc/lpc54xxx/CMakeLists.txt index d8fab22133d..0ebb2f31a79 100644 --- a/soc/nxp/lpc/lpc54xxx/CMakeLists.txt +++ b/soc/nxp/lpc/lpc54xxx/CMakeLists.txt @@ -6,7 +6,7 @@ zephyr_library() zephyr_library_sources(soc.c) -zephyr_library_sources_ifdef(CONFIG_PLATFORM_SPECIFIC_INIT gcc/startup_LPC54114_cm4.S) +zephyr_library_sources_ifdef(CONFIG_SOC_RESET_HOOK gcc/startup_LPC54114_cm4.S) zephyr_library_include_directories( ${ZEPHYR_BASE}/kernel/include diff --git a/soc/nxp/lpc/lpc54xxx/Kconfig b/soc/nxp/lpc/lpc54xxx/Kconfig index 78997d6504b..1d0ee31d806 100644 --- a/soc/nxp/lpc/lpc54xxx/Kconfig +++ b/soc/nxp/lpc/lpc54xxx/Kconfig @@ -9,14 +9,14 @@ config SOC_SERIES_LPC54XXX select HAS_MCUX_FLEXCOMM select HAS_MCUX_SYSCON select CPU_CORTEX_M_HAS_SYSTICK - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK config SOC_LPC54114_M4 select CPU_CORTEX_M4 select CPU_CORTEX_M_HAS_DWT select CPU_HAS_ARM_MPU select CPU_HAS_FPU - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select CLOCK_CONTROL select HAS_MCUX_IAP_LEGACY diff --git a/soc/nxp/lpc/lpc54xxx/gcc/startup_LPC54114_cm4.S b/soc/nxp/lpc/lpc54xxx/gcc/startup_LPC54114_cm4.S index 2c7a6b22372..d65b83b0ef2 100644 --- a/soc/nxp/lpc/lpc54xxx/gcc/startup_LPC54114_cm4.S +++ b/soc/nxp/lpc/lpc54xxx/gcc/startup_LPC54114_cm4.S @@ -11,7 +11,7 @@ #include #include -#if defined(CONFIG_PLATFORM_SPECIFIC_INIT) && defined(CONFIG_SOC_LPC54114_M4) +#if defined(CONFIG_SOC_RESET_HOOK) && defined(CONFIG_SOC_LPC54114_M4) .syntax unified .arch armv7-m @@ -26,8 +26,8 @@ rel_vals: .short 0x0FFF .short 0x0C24 -GTEXT(z_arm_platform_init) -SECTION_FUNC(TEXT,z_arm_platform_init) +GTEXT(soc_reset_hook) +SECTION_FUNC(TEXT,soc_reset_hook) /* Both the M0+ and M4 core come via this shared startup code, * but the M0+ and M4 core have different vector tables. diff --git a/soc/nxp/lpc/lpc54xxx/soc.c b/soc/nxp/lpc/lpc54xxx/soc.c index f5a353d2ad3..a18e6e300c7 100644 --- a/soc/nxp/lpc/lpc54xxx/soc.c +++ b/soc/nxp/lpc/lpc54xxx/soc.c @@ -116,17 +116,17 @@ static int nxp_lpc54114_init(void) SYS_INIT(nxp_lpc54114_init, PRE_KERNEL_1, 0); -#if defined(CONFIG_PLATFORM_SPECIFIC_INIT) && defined(CONFIG_SOC_LPC54114_M0) +#if defined(CONFIG_SOC_RESET_HOOK) && defined(CONFIG_SOC_LPC54114_M0) /* M4 core has a custom platform initialization routine in assembly, * but M0 core does not. install one here to call SystemInit. */ -void z_arm_platform_init(void) +void soc_reset_hook(void) { SystemInit(); } -#endif /* CONFIG_PLATFORM_SPECIFIC_INIT */ +#endif /* CONFIG_SOC_RESET_HOOK */ #if defined(CONFIG_SECOND_CORE_MCUX) && defined(CONFIG_SOC_LPC54114_M4) diff --git a/soc/nxp/lpc/lpc55xxx/Kconfig b/soc/nxp/lpc/lpc55xxx/Kconfig index 351b2bb0036..16d23aab6d4 100644 --- a/soc/nxp/lpc/lpc55xxx/Kconfig +++ b/soc/nxp/lpc/lpc55xxx/Kconfig @@ -8,7 +8,7 @@ config SOC_SERIES_LPC55XXX select HAS_MCUX_WWDT select CPU_CORTEX_M_HAS_SYSTICK select CPU_CORTEX_M_HAS_DWT - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK config SOC_LPC55S06 select CPU_CORTEX_M33 diff --git a/soc/nxp/lpc/lpc55xxx/soc.c b/soc/nxp/lpc/lpc55xxx/soc.c index f920168b365..9224821e8a2 100644 --- a/soc/nxp/lpc/lpc55xxx/soc.c +++ b/soc/nxp/lpc/lpc55xxx/soc.c @@ -369,9 +369,9 @@ static int nxp_lpc55xxx_init(void) return 0; } -#ifdef CONFIG_PLATFORM_SPECIFIC_INIT +#ifdef CONFIG_SOC_RESET_HOOK -void z_arm_platform_init(void) +void soc_reset_hook(void) { SystemInit(); @@ -385,7 +385,7 @@ void z_arm_platform_init(void) #endif } -#endif /* CONFIG_PLATFORM_SPECIFIC_INIT */ +#endif /* CONFIG_SOC_RESET_HOOK */ SYS_INIT(nxp_lpc55xxx_init, PRE_KERNEL_1, 0); diff --git a/soc/nxp/mcx/mcxn/Kconfig b/soc/nxp/mcx/mcxn/Kconfig index 04b41f75ef3..0379358ca95 100644 --- a/soc/nxp/mcx/mcxn/Kconfig +++ b/soc/nxp/mcx/mcxn/Kconfig @@ -9,7 +9,7 @@ config SOC_SERIES_MCXN select HAS_MCUX_FLEXCOMM select CPU_CORTEX_M_HAS_SYSTICK select CPU_CORTEX_M_HAS_DWT - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK config SOC_MCXN947_CPU0 select CPU_CORTEX_M33 diff --git a/soc/nxp/mcx/mcxn/soc.c b/soc/nxp/mcx/mcxn/soc.c index 784721b2850..8ea0f6f923f 100644 --- a/soc/nxp/mcx/mcxn/soc.c +++ b/soc/nxp/mcx/mcxn/soc.c @@ -17,9 +17,9 @@ #include #include -#ifdef CONFIG_PLATFORM_SPECIFIC_INIT +#ifdef CONFIG_SOC_RESET_HOOK -void z_arm_platform_init(void) +void soc_reset_hook(void) { SystemInit(); } diff --git a/soc/nxp/rw/Kconfig b/soc/nxp/rw/Kconfig index b32ec7660f2..e67d0013721 100644 --- a/soc/nxp/rw/Kconfig +++ b/soc/nxp/rw/Kconfig @@ -6,7 +6,7 @@ config SOC_SERIES_RW6XX select CPU_CORTEX_M33 select CPU_CORTEX_M_HAS_DWT select CLOCK_CONTROL - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select CPU_HAS_ARM_SAU select CPU_HAS_ARM_MPU select CPU_HAS_FPU diff --git a/soc/nxp/rw/soc.c b/soc/nxp/rw/soc.c index 4d948b22786..8aa3d6f6dee 100644 --- a/soc/nxp/rw/soc.c +++ b/soc/nxp/rw/soc.c @@ -309,7 +309,7 @@ static int nxp_rw600_init(void) return 0; } -void z_arm_platform_init(void) +void soc_reset_hook(void) { /* This is provided by the SDK */ SystemInit(); diff --git a/soc/nxp/s32/s32k3/CMakeLists.txt b/soc/nxp/s32/s32k3/CMakeLists.txt index dda4a9833cf..320d82d06fd 100644 --- a/soc/nxp/s32/s32k3/CMakeLists.txt +++ b/soc/nxp/s32/s32k3/CMakeLists.txt @@ -10,6 +10,6 @@ zephyr_library_sources_ifdef(CONFIG_DT_HAS_NXP_S32K3_PMC_ENABLED pmc.c) zephyr_library_sources_ifdef(CONFIG_CPU_HAS_CUSTOM_FIXED_SOC_MPU_REGIONS mpu_regions.c) zephyr_linker_sources(SECTIONS sections.ld) -zephyr_library_sources_ifdef(CONFIG_PLATFORM_SPECIFIC_INIT s32k3xx_startup.S) +zephyr_library_sources_ifdef(CONFIG_SOC_RESET_HOOK s32k3xx_startup.S) set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "") diff --git a/soc/nxp/s32/s32k3/Kconfig b/soc/nxp/s32/s32k3/Kconfig index 32393d9af7a..fdf0bba2687 100644 --- a/soc/nxp/s32/s32k3/Kconfig +++ b/soc/nxp/s32/s32k3/Kconfig @@ -12,7 +12,7 @@ config SOC_SERIES_S32K3 select CPU_HAS_ICACHE select CPU_HAS_DCACHE select CPU_HAS_CUSTOM_FIXED_SOC_MPU_REGIONS - select PLATFORM_SPECIFIC_INIT if XIP + select SOC_RESET_HOOK if XIP select USE_DT_CODE_PARTITION if XIP select CLOCK_CONTROL select HAS_MCUX diff --git a/soc/nxp/s32/s32k3/s32k3xx_startup.S b/soc/nxp/s32/s32k3/s32k3xx_startup.S index d9cbc53ea37..d3e03328c96 100644 --- a/soc/nxp/s32/s32k3/s32k3xx_startup.S +++ b/soc/nxp/s32/s32k3/s32k3xx_startup.S @@ -14,9 +14,9 @@ _ASM_FILE_PROLOGUE -GTEXT(z_arm_platform_init) +GTEXT(soc_reset_hook) -SECTION_FUNC(TEXT, z_arm_platform_init) +SECTION_FUNC(TEXT, soc_reset_hook) /* * On destructive reset, SRAM and TCM memories must be initialized to a known value using a diff --git a/soc/nxp/s32/s32ze/Kconfig b/soc/nxp/s32/s32ze/Kconfig index eee441df0b0..69fc9b8327e 100644 --- a/soc/nxp/s32/s32ze/Kconfig +++ b/soc/nxp/s32/s32ze/Kconfig @@ -11,7 +11,7 @@ config SOC_SERIES_S32ZE select CPU_HAS_ARM_MPU select GIC_SINGLE_SECURITY_STATE select VFP_DP_D16 - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select CLOCK_CONTROL select HAS_NXP_S32_HAL select HAS_MCUX diff --git a/soc/nxp/s32/s32ze/soc.c b/soc/nxp/s32/s32ze/soc.c index 871536a26c6..801e0173ae3 100644 --- a/soc/nxp/s32/s32ze/soc.c +++ b/soc/nxp/s32/s32ze/soc.c @@ -12,7 +12,7 @@ #include -void z_arm_platform_init(void) +void soc_reset_hook(void) { /* enable peripheral port access at EL1 and EL0 */ __asm__ volatile("mrc p15, 0, r0, c15, c0, 0\n"); diff --git a/soc/renesas/rcar/rcar_gen3/Kconfig b/soc/renesas/rcar/rcar_gen3/Kconfig index c4bf5a2a161..9c92b97e370 100644 --- a/soc/renesas/rcar/rcar_gen3/Kconfig +++ b/soc/renesas/rcar/rcar_gen3/Kconfig @@ -7,7 +7,7 @@ config SOC_SERIES_RCAR_GEN3 config SOC_R8A77951_R7 select ARM select CPU_CORTEX_R7 - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select CPU_HAS_DCLS config SOC_R8A77951_A57 diff --git a/soc/renesas/rcar/rcar_gen3/r7/soc.c b/soc/renesas/rcar/rcar_gen3/r7/soc.c index 9dc79e0394d..4bdbf6cf39c 100644 --- a/soc/renesas/rcar/rcar_gen3/r7/soc.c +++ b/soc/renesas/rcar/rcar_gen3/r7/soc.c @@ -9,7 +9,7 @@ #include #include -void z_arm_platform_init(void) +void soc_reset_hook(void) { L1C_DisableCaches(); L1C_DisableBTAC(); diff --git a/soc/renesas/smartbond/da1469x/Kconfig b/soc/renesas/smartbond/da1469x/Kconfig index b07c4274ad6..024120268ab 100644 --- a/soc/renesas/smartbond/da1469x/Kconfig +++ b/soc/renesas/smartbond/da1469x/Kconfig @@ -12,6 +12,6 @@ config SOC_SERIES_DA1469X select HAS_PM select CLOCK_CONTROL select CLOCK_CONTROL_SMARTBOND - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select PM_DEVICE if PM imply TIMER_READS_ITS_FREQUENCY_AT_RUNTIME diff --git a/soc/renesas/smartbond/da1469x/soc.c b/soc/renesas/smartbond/da1469x/soc.c index a6626aa9598..40bb55ebd0d 100644 --- a/soc/renesas/smartbond/da1469x/soc.c +++ b/soc/renesas/smartbond/da1469x/soc.c @@ -109,7 +109,7 @@ static void z_renesas_configure_cache(void) } #endif /* CONFIG_HAS_FLASH_LOAD_OFFSET */ -void z_arm_platform_init(void) +void soc_reset_hook(void) { #if defined(CONFIG_PM) uint32_t *ivt; diff --git a/soc/xlnx/zynq7000/Kconfig.defconfig b/soc/xlnx/zynq7000/Kconfig.defconfig index 8976925507f..f675bd07f32 100644 --- a/soc/xlnx/zynq7000/Kconfig.defconfig +++ b/soc/xlnx/zynq7000/Kconfig.defconfig @@ -21,7 +21,7 @@ config FLASH_SIZE config FLASH_BASE_ADDRESS default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH)) -config PLATFORM_SPECIFIC_INIT +config SOC_RESET_HOOK default y endif # SOC_FAMILY_XILINX_ZYNQ7000 diff --git a/soc/xlnx/zynq7000/xc7zxxx/soc.c b/soc/xlnx/zynq7000/xc7zxxx/soc.c index a8d3eab7c73..37d30b02426 100644 --- a/soc/xlnx/zynq7000/xc7zxxx/soc.c +++ b/soc/xlnx/zynq7000/xc7zxxx/soc.c @@ -71,7 +71,7 @@ const struct arm_mmu_config mmu_config = { /* Platform-specific early initialization */ -void z_arm_platform_init(void) +void soc_reset_hook(void) { /* * When coming out of u-boot rather than downloading the Zephyr binary diff --git a/soc/xlnx/zynq7000/xc7zxxxs/soc.c b/soc/xlnx/zynq7000/xc7zxxxs/soc.c index 66e17b56bc9..a46d9a21784 100644 --- a/soc/xlnx/zynq7000/xc7zxxxs/soc.c +++ b/soc/xlnx/zynq7000/xc7zxxxs/soc.c @@ -71,7 +71,7 @@ const struct arm_mmu_config mmu_config = { /* Platform-specific early initialization */ -void z_arm_platform_init(void) +void soc_reset_hook(void) { /* * When coming out of u-boot rather than downloading the Zephyr binary diff --git a/soc/xlnx/zynqmp/Kconfig b/soc/xlnx/zynqmp/Kconfig index f28454573c6..3c88e5aa90e 100644 --- a/soc/xlnx/zynqmp/Kconfig +++ b/soc/xlnx/zynqmp/Kconfig @@ -5,6 +5,6 @@ config SOC_XILINX_ZYNQMP_RPU select ARM select CPU_CORTEX_R5 - select PLATFORM_SPECIFIC_INIT + select SOC_RESET_HOOK select CPU_HAS_ARM_MPU select VFP_DP_D16 diff --git a/soc/xlnx/zynqmp/soc.c b/soc/xlnx/zynqmp/soc.c index 242557ed725..db03b639912 100644 --- a/soc/xlnx/zynqmp/soc.c +++ b/soc/xlnx/zynqmp/soc.c @@ -10,7 +10,7 @@ #include -void z_arm_platform_init(void) +void soc_reset_hook(void) { /* * Use normal exception vectors address range (0x0-0x1C).