arch: arm: replace PLATFORM_SPECIFIC_INIT with PLATFORM_RESET_HOOK
Use generic hook infrastrucutre instead of custom Kconfig and hooks for
ARM.
Replace z_arm_platform_init() with platform_reset().
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
diff --git a/arch/arm/core/Kconfig b/arch/arm/core/Kconfig
index 41c2b1f..8d677d9 100644
--- a/arch/arm/core/Kconfig
+++ b/arch/arm/core/Kconfig
@@ -166,11 +166,15 @@
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 5cba6cb..efb04d2 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_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 @@
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 332f1a6..bc75ccf 100644
--- a/arch/arm/core/cortex_m/reset.S
+++ b/arch/arm/core/cortex_m/reset.S
@@ -24,8 +24,8 @@
#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 @@
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 c8dd340..8f1092a 100644
--- a/drivers/clock_control/clock_control_numaker_scc.c
+++ b/drivers/clock_control/clock_control_numaker_scc.c
@@ -136,7 +136,7 @@
#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 9823a47..633d81f 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 e0a369e..ffe8ef3 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 8c960fc..1933f35 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 f36a959..acf7e44 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 61136d8..a40fc6f 100644
--- a/soc/arm/fvp_aemv8r/Kconfig
+++ b/soc/arm/fvp_aemv8r/Kconfig
@@ -13,5 +13,5 @@
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 56532ce..4d6544d 100644
--- a/soc/arm/fvp_aemv8r/aarch32/soc.c
+++ b/soc/arm/fvp_aemv8r/aarch32/soc.c
@@ -8,7 +8,7 @@
#include <cmsis_core.h>
#include <zephyr/sys/barrier.h>
-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 5d28220..aab2e8b 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 f443fcd..5df1ca2 100644
--- a/soc/aspeed/ast10x0/soc.c
+++ b/soc/aspeed/ast10x0/soc.c
@@ -84,7 +84,7 @@
.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 1f66f4e..4dc448a 100644
--- a/soc/atmel/sam/sam3x/Kconfig
+++ b/soc/atmel/sam/sam3x/Kconfig
@@ -11,5 +11,5 @@
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 08e803c..969b603 100644
--- a/soc/atmel/sam/sam3x/soc.c
+++ b/soc/atmel/sam/sam3x/soc.c
@@ -97,7 +97,7 @@
}
}
-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 57441f1ea..e150ff3 100644
--- a/soc/atmel/sam/sam4e/Kconfig
+++ b/soc/atmel/sam/sam4e/Kconfig
@@ -11,5 +11,5 @@
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 82468f4..59bb24a 100644
--- a/soc/atmel/sam/sam4e/soc.c
+++ b/soc/atmel/sam/sam4e/soc.c
@@ -89,7 +89,7 @@
}
}
-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 15ad8ba..eae8f9a 100644
--- a/soc/atmel/sam/sam4l/Kconfig
+++ b/soc/atmel/sam/sam4l/Kconfig
@@ -6,5 +6,5 @@
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 c4e7b48..3836d99 100644
--- a/soc/atmel/sam/sam4l/soc.c
+++ b/soc/atmel/sam/sam4l/soc.c
@@ -253,7 +253,7 @@
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 26836bc..7945856 100644
--- a/soc/atmel/sam/sam4s/Kconfig
+++ b/soc/atmel/sam/sam4s/Kconfig
@@ -10,5 +10,5 @@
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 09c42ea..a98fd79 100644
--- a/soc/atmel/sam/sam4s/soc.c
+++ b/soc/atmel/sam/sam4s/soc.c
@@ -95,7 +95,7 @@
}
}
-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 f799cd4..bea8055 100644
--- a/soc/atmel/sam/same70/Kconfig
+++ b/soc/atmel/sam/same70/Kconfig
@@ -13,7 +13,7 @@
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 4db92e8..a9d886c 100644
--- a/soc/atmel/sam/same70/soc.c
+++ b/soc/atmel/sam/same70/soc.c
@@ -105,7 +105,7 @@
}
}
-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 682adb4..347c798 100644
--- a/soc/atmel/sam/samv71/Kconfig
+++ b/soc/atmel/sam/samv71/Kconfig
@@ -13,7 +13,7 @@
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 e5129e3..8527e1b 100644
--- a/soc/atmel/sam/samv71/soc.c
+++ b/soc/atmel/sam/samv71/soc.c
@@ -102,7 +102,7 @@
}
}
-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 69c7b5b..d133ee9 100644
--- a/soc/atmel/sam0/common/soc_samc2x.c
+++ b/soc/atmel/sam0/common/soc_samc2x.c
@@ -43,7 +43,7 @@
| 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 6f86ac1..f915459 100644
--- a/soc/atmel/sam0/common/soc_samd2x.c
+++ b/soc/atmel/sam0/common/soc_samd2x.c
@@ -286,7 +286,7 @@
}
#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 d8a7138..c18f4e3 100644
--- a/soc/atmel/sam0/common/soc_samd5x.c
+++ b/soc/atmel/sam0/common/soc_samd5x.c
@@ -105,7 +105,7 @@
| 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 e7d4746..3dd657a 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) {}
#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 8c9345e..98a68c6 100644
--- a/soc/atmel/sam0/samc20/Kconfig
+++ b/soc/atmel/sam0/samc20/Kconfig
@@ -9,4 +9,4 @@
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 51637a0..ea774ca 100644
--- a/soc/atmel/sam0/samc21/Kconfig
+++ b/soc/atmel/sam0/samc21/Kconfig
@@ -10,4 +10,4 @@
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 1fea439..709104e 100644
--- a/soc/atmel/sam0/samd20/Kconfig
+++ b/soc/atmel/sam0/samd20/Kconfig
@@ -9,4 +9,4 @@
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 f968f52..8350b4b 100644
--- a/soc/atmel/sam0/samd21/Kconfig
+++ b/soc/atmel/sam0/samd21/Kconfig
@@ -9,4 +9,4 @@
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 fb846ef..6922da8 100644
--- a/soc/atmel/sam0/samd51/Kconfig
+++ b/soc/atmel/sam0/samd51/Kconfig
@@ -10,4 +10,4 @@
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 35aa999..8f23c45 100644
--- a/soc/atmel/sam0/same51/Kconfig
+++ b/soc/atmel/sam0/same51/Kconfig
@@ -10,4 +10,4 @@
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 670f155..188502a 100644
--- a/soc/atmel/sam0/same53/Kconfig
+++ b/soc/atmel/sam0/same53/Kconfig
@@ -10,4 +10,4 @@
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 2bd2359..7042634 100644
--- a/soc/atmel/sam0/same54/Kconfig
+++ b/soc/atmel/sam0/same54/Kconfig
@@ -10,4 +10,4 @@
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 1fbc533..bc5026f 100644
--- a/soc/atmel/sam0/saml21/Kconfig
+++ b/soc/atmel/sam0/saml21/Kconfig
@@ -9,4 +9,4 @@
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 823be5d..d02e487 100644
--- a/soc/atmel/sam0/samr21/Kconfig
+++ b/soc/atmel/sam0/samr21/Kconfig
@@ -9,4 +9,4 @@
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 0567590..86e0ec5 100644
--- a/soc/atmel/sam0/samr34/Kconfig
+++ b/soc/atmel/sam0/samr34/Kconfig
@@ -9,4 +9,4 @@
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 c5fa8e5..50196a2 100644
--- a/soc/atmel/sam0/samr35/Kconfig
+++ b/soc/atmel/sam0/samr35/Kconfig
@@ -9,4 +9,4 @@
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 8cd903e..2d9eafd 100644
--- a/soc/gd/gd32/gd32a50x/Kconfig
+++ b/soc/gd/gd32/gd32a50x/Kconfig
@@ -9,4 +9,4 @@
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 5f8024f..d19045f 100644
--- a/soc/gd/gd32/gd32a50x/soc.c
+++ b/soc/gd/gd32/gd32a50x/soc.c
@@ -8,7 +8,7 @@
#include <soc.h>
/* 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 8720e3a..3985b85 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 44e83a6..dc5bd8b 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 c26aaf7..e0063b8 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 37f27e2..38c55c6 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 9773ada..9631354 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 d2a03b3..a6abd84 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 f327450..e722496 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 <NuMicro.h>
-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 889e93c..89d561c 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 <NuMicro.h>
-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 6f80bd2..f8dde67 100644
--- a/soc/nuvoton/numicro/Kconfig
+++ b/soc/nuvoton/numicro/Kconfig
@@ -4,7 +4,7 @@
# Author: Saravanan Sekar <saravanan@linumiz.com>
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 3ac1490..fd482ee 100644
--- a/soc/nuvoton/numicro/m48x/soc.c
+++ b/soc/nuvoton/numicro/m48x/soc.c
@@ -8,7 +8,7 @@
#include <zephyr/init.h>
#include <zephyr/kernel.h>
-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 689abea..05eb7b5 100644
--- a/soc/nxp/imxrt/imxrt10xx/Kconfig
+++ b/soc/nxp/imxrt/imxrt10xx/Kconfig
@@ -6,7 +6,7 @@
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 edc5d38..9b19716 100644
--- a/soc/nxp/imxrt/imxrt10xx/soc.c
+++ b/soc/nxp/imxrt/imxrt10xx/soc.c
@@ -353,8 +353,8 @@
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 c0cfb0b..10c8180 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 a81f3ed..2576c85 100644
--- a/soc/nxp/imxrt/imxrt118x/soc.c
+++ b/soc/nxp/imxrt/imxrt118x/soc.c
@@ -413,8 +413,8 @@
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 493bc7a..434a22a 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 b13f7df..7648052 100644
--- a/soc/nxp/imxrt/imxrt11xx/soc.c
+++ b/soc/nxp/imxrt/imxrt11xx/soc.c
@@ -729,8 +729,8 @@
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 75f695d..dcaf50b 100644
--- a/soc/nxp/imxrt/imxrt5xx/Kconfig
+++ b/soc/nxp/imxrt/imxrt5xx/Kconfig
@@ -12,7 +12,7 @@
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 a5bb2a5..c10b404 100644
--- a/soc/nxp/imxrt/imxrt5xx/cm33/soc.c
+++ b/soc/nxp/imxrt/imxrt5xx/cm33/soc.c
@@ -187,7 +187,7 @@
#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 151e99d..b688552 100644
--- a/soc/nxp/imxrt/imxrt6xx/Kconfig
+++ b/soc/nxp/imxrt/imxrt6xx/Kconfig
@@ -6,7 +6,7 @@
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 9683aec..3bbf672 100644
--- a/soc/nxp/imxrt/imxrt6xx/cm33/soc.c
+++ b/soc/nxp/imxrt/imxrt6xx/cm33/soc.c
@@ -376,9 +376,9 @@
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 29317c2..cf61f57 100644
--- a/soc/nxp/kinetis/k2x/Kconfig
+++ b/soc/nxp/kinetis/k2x/Kconfig
@@ -13,7 +13,7 @@
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 d5108fb..82aecf9 100644
--- a/soc/nxp/kinetis/k2x/soc.c
+++ b/soc/nxp/kinetis/k2x/soc.c
@@ -129,13 +129,13 @@
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 4f7bd55..5ec9c9a 100644
--- a/soc/nxp/kinetis/k6x/Kconfig
+++ b/soc/nxp/kinetis/k6x/Kconfig
@@ -10,7 +10,7 @@
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 2463b5d..41708af 100644
--- a/soc/nxp/kinetis/k6x/soc.c
+++ b/soc/nxp/kinetis/k6x/soc.c
@@ -166,13 +166,13 @@
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 ad8c4c8..649300c 100644
--- a/soc/nxp/kinetis/k8x/Kconfig
+++ b/soc/nxp/kinetis/k8x/Kconfig
@@ -26,7 +26,7 @@
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 50fa7c1..19d6f2d 100644
--- a/soc/nxp/kinetis/k8x/soc.c
+++ b/soc/nxp/kinetis/k8x/soc.c
@@ -120,13 +120,13 @@
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 0c5d740..a89888e 100644
--- a/soc/nxp/kinetis/ke1xf/Kconfig
+++ b/soc/nxp/kinetis/ke1xf/Kconfig
@@ -29,7 +29,7 @@
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 b2c0ce9..7ada424 100644
--- a/soc/nxp/kinetis/ke1xf/soc.c
+++ b/soc/nxp/kinetis/ke1xf/soc.c
@@ -268,7 +268,7 @@
return 0;
}
-#ifdef CONFIG_PLATFORM_SPECIFIC_INIT
+#ifdef CONFIG_SOC_RESET_HOOK
#ifdef CONFIG_WDOG_INIT
@@ -307,12 +307,12 @@
#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 751257f..2563a22 100644
--- a/soc/nxp/kinetis/ke1xz/Kconfig
+++ b/soc/nxp/kinetis/ke1xz/Kconfig
@@ -11,5 +11,5 @@
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 d5c09b0..38521bc 100644
--- a/soc/nxp/kinetis/ke1xz/soc.c
+++ b/soc/nxp/kinetis/ke1xz/soc.c
@@ -153,14 +153,14 @@
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 6e88ad7..c2e5255 100644
--- a/soc/nxp/kinetis/kl2x/Kconfig
+++ b/soc/nxp/kinetis/kl2x/Kconfig
@@ -9,7 +9,7 @@
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 3bb71d0..9a525b2 100644
--- a/soc/nxp/kinetis/kl2x/soc.c
+++ b/soc/nxp/kinetis/kl2x/soc.c
@@ -87,13 +87,13 @@
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 93a48b3..6c9cd6f 100644
--- a/soc/nxp/kinetis/kv5x/Kconfig
+++ b/soc/nxp/kinetis/kv5x/Kconfig
@@ -21,4 +21,4 @@
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 59b77f1..91c4823 100644
--- a/soc/nxp/kinetis/kv5x/soc.c
+++ b/soc/nxp/kinetis/kv5x/soc.c
@@ -97,13 +97,13 @@
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 d3e209e..49a9f78 100644
--- a/soc/nxp/kinetis/kwx/Kconfig
+++ b/soc/nxp/kinetis/kwx/Kconfig
@@ -8,7 +8,7 @@
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 8a6b0f8..95e5a95 100644
--- a/soc/nxp/kinetis/kwx/soc_kw2xd.c
+++ b/soc/nxp/kinetis/kwx/soc_kw2xd.c
@@ -158,13 +158,13 @@
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 f9d4845..a14fe28 100644
--- a/soc/nxp/kinetis/kwx/soc_kw4xz.c
+++ b/soc/nxp/kinetis/kwx/soc_kw4xz.c
@@ -87,13 +87,13 @@
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 fc920bb..8a2436d 100644
--- a/soc/nxp/lpc/lpc51u68/Kconfig
+++ b/soc/nxp/lpc/lpc51u68/Kconfig
@@ -15,7 +15,7 @@
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 c4b7b58..b38b601 100644
--- a/soc/nxp/lpc/lpc51u68/soc.c
+++ b/soc/nxp/lpc/lpc51u68/soc.c
@@ -46,13 +46,13 @@
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 d8fab22..0ebb2f3 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 78997d6..1d0ee31 100644
--- a/soc/nxp/lpc/lpc54xxx/Kconfig
+++ b/soc/nxp/lpc/lpc54xxx/Kconfig
@@ -9,14 +9,14 @@
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 2c7a6b2..d65b83b 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 <zephyr/linker/sections.h>
#include <zephyr/arch/cpu.h>
-#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 @@
.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 f5a353d..a18e6e3 100644
--- a/soc/nxp/lpc/lpc54xxx/soc.c
+++ b/soc/nxp/lpc/lpc54xxx/soc.c
@@ -116,17 +116,17 @@
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 351b2bb..16d23aa 100644
--- a/soc/nxp/lpc/lpc55xxx/Kconfig
+++ b/soc/nxp/lpc/lpc55xxx/Kconfig
@@ -8,7 +8,7 @@
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 f920168..9224821 100644
--- a/soc/nxp/lpc/lpc55xxx/soc.c
+++ b/soc/nxp/lpc/lpc55xxx/soc.c
@@ -369,9 +369,9 @@
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 @@
#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 04b41f7..0379358 100644
--- a/soc/nxp/mcx/mcxn/Kconfig
+++ b/soc/nxp/mcx/mcxn/Kconfig
@@ -9,7 +9,7 @@
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 784721b..8ea0f6f 100644
--- a/soc/nxp/mcx/mcxn/soc.c
+++ b/soc/nxp/mcx/mcxn/soc.c
@@ -17,9 +17,9 @@
#include <zephyr/init.h>
#include <soc.h>
-#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 b32ec76..e67d001 100644
--- a/soc/nxp/rw/Kconfig
+++ b/soc/nxp/rw/Kconfig
@@ -6,7 +6,7 @@
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 4d948b2..8aa3d6f 100644
--- a/soc/nxp/rw/soc.c
+++ b/soc/nxp/rw/soc.c
@@ -309,7 +309,7 @@
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 dda4a98..320d82d 100644
--- a/soc/nxp/s32/s32k3/CMakeLists.txt
+++ b/soc/nxp/s32/s32k3/CMakeLists.txt
@@ -10,6 +10,6 @@
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 32393d9..fdf0bba 100644
--- a/soc/nxp/s32/s32k3/Kconfig
+++ b/soc/nxp/s32/s32k3/Kconfig
@@ -12,7 +12,7 @@
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 d9cbc53..d3e0332 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 eee441d..69fc9b8 100644
--- a/soc/nxp/s32/s32ze/Kconfig
+++ b/soc/nxp/s32/s32ze/Kconfig
@@ -11,7 +11,7 @@
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 871536a..801e017 100644
--- a/soc/nxp/s32/s32ze/soc.c
+++ b/soc/nxp/s32/s32ze/soc.c
@@ -12,7 +12,7 @@
#include <OsIf.h>
-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 c4bf5a2..9c92b97 100644
--- a/soc/renesas/rcar/rcar_gen3/Kconfig
+++ b/soc/renesas/rcar/rcar_gen3/Kconfig
@@ -7,7 +7,7 @@
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 9dc79e0..4bdbf6c 100644
--- a/soc/renesas/rcar/rcar_gen3/r7/soc.c
+++ b/soc/renesas/rcar/rcar_gen3/r7/soc.c
@@ -9,7 +9,7 @@
#include <zephyr/device.h>
#include <zephyr/sys/barrier.h>
-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 b07c427..0241202 100644
--- a/soc/renesas/smartbond/da1469x/Kconfig
+++ b/soc/renesas/smartbond/da1469x/Kconfig
@@ -12,6 +12,6 @@
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 a6626aa..40bb55e 100644
--- a/soc/renesas/smartbond/da1469x/soc.c
+++ b/soc/renesas/smartbond/da1469x/soc.c
@@ -109,7 +109,7 @@
}
#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 8976925..f675bd0 100644
--- a/soc/xlnx/zynq7000/Kconfig.defconfig
+++ b/soc/xlnx/zynq7000/Kconfig.defconfig
@@ -21,7 +21,7 @@
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 a8d3eab..37d30b0 100644
--- a/soc/xlnx/zynq7000/xc7zxxx/soc.c
+++ b/soc/xlnx/zynq7000/xc7zxxx/soc.c
@@ -71,7 +71,7 @@
/* 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 66e17b5..a46d9a2 100644
--- a/soc/xlnx/zynq7000/xc7zxxxs/soc.c
+++ b/soc/xlnx/zynq7000/xc7zxxxs/soc.c
@@ -71,7 +71,7 @@
/* 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 f284545..3c88e5a 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 242557e..db03b63 100644
--- a/soc/xlnx/zynqmp/soc.c
+++ b/soc/xlnx/zynqmp/soc.c
@@ -10,7 +10,7 @@
#include <cmsis_core.h>
-void z_arm_platform_init(void)
+void soc_reset_hook(void)
{
/*
* Use normal exception vectors address range (0x0-0x1C).