Skip to content

Commit f519dd1

Browse files
nashifcarlescufi
authored andcommitted
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 <[email protected]>
1 parent e260d03 commit f519dd1

File tree

105 files changed

+150
-146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+150
-146
lines changed

arch/arm/core/Kconfig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,15 @@ config RUNTIME_NMI
166166
needed, enable this option and attach it via z_arm_nmi_set_handler().
167167

168168
config PLATFORM_SPECIFIC_INIT
169-
bool "Platform (SOC) specific startup hook"
169+
bool "Platform (SOC) specific startup hook [DEPRECATED]"
170+
select DEPRECATED
171+
select SOC_RESET_HOOK
170172
help
171173
The platform specific initialization code (z_arm_platform_init) is
172174
executed at the beginning of the startup code (__start).
173175

176+
This option is deprecated, use SOC_RESET_HOOK instead.
177+
174178
config FAULT_DUMP
175179
int "Fault dump level"
176180
default 2

arch/arm/core/cortex_a_r/reset.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ GDATA(z_arm_sys_stack)
3030
GDATA(z_arm_fiq_stack)
3131
GDATA(z_arm_abort_stack)
3232
GDATA(z_arm_undef_stack)
33-
#if defined(CONFIG_PLATFORM_SPECIFIC_INIT)
34-
GTEXT(z_arm_platform_init)
33+
#if defined(CONFIG_SOC_RESET_HOOK)
34+
GTEXT(soc_reset_hook)
3535
#endif
3636

3737
/**
@@ -305,9 +305,9 @@ _primary_core:
305305
msr CPSR_c, #(MODE_SYS | I_BIT | F_BIT)
306306
mov sp, r10
307307

308-
#if defined(CONFIG_PLATFORM_SPECIFIC_INIT)
308+
#if defined(CONFIG_SOC_RESET_HOOK)
309309
/* Execute platform-specific initialisation if applicable */
310-
bl z_arm_platform_init
310+
bl soc_reset_hook
311311
#endif
312312

313313
#if defined(CONFIG_WDOG_INIT)

arch/arm/core/cortex_m/reset.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ GDATA(z_interrupt_stacks)
2424
#if defined(CONFIG_DEBUG_THREAD_INFO)
2525
GDATA(z_sys_post_kernel)
2626
#endif
27-
#if defined(CONFIG_PLATFORM_SPECIFIC_INIT)
28-
GTEXT(z_arm_platform_init)
27+
#if defined(CONFIG_SOC_RESET_HOOK)
28+
GTEXT(soc_reset_hook)
2929
#endif
3030
#if defined(CONFIG_INIT_ARCH_HW_AT_BOOT)
3131
GTEXT(z_arm_init_arch_hw_at_boot)
@@ -93,8 +93,8 @@ SECTION_SUBSEC_FUNC(TEXT,_reset_section,__start)
9393
bl arch_pm_s2ram_resume
9494
#endif /* CONFIG_PM_S2RAM */
9595

96-
#if defined(CONFIG_PLATFORM_SPECIFIC_INIT)
97-
bl z_arm_platform_init
96+
#if defined(CONFIG_SOC_RESET_HOOK)
97+
bl soc_reset_hook
9898
#endif
9999

100100
#if defined(CONFIG_INIT_ARCH_HW_AT_BOOT)

drivers/clock_control/clock_control_numaker_scc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ static int numaker_scc_init(const struct device *dev)
136136
#endif
137137

138138
/*
139-
* z_arm_platform_init() will respect above configurations and
139+
* soc_reset_hook() will respect above configurations and
140140
* actually take charge of system clock control initialization.
141141
*/
142142

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CONFIG_STDOUT_CONSOLE=n
22
CONFIG_PRINTK=n
33
CONFIG_IPM=y
4-
CONFIG_PLATFORM_SPECIFIC_INIT=n
4+
CONFIG_SOC_RESET_HOOK=n
55
CONFIG_SECOND_CORE_MCUX=y
66
CONFIG_BUILD_OUTPUT_HEX=y

samples/subsys/ipc/openamp/remote/prj.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CONFIG_STDOUT_CONSOLE=n
22
CONFIG_PRINTK=n
33
CONFIG_IPM=y
4-
CONFIG_PLATFORM_SPECIFIC_INIT=n
4+
CONFIG_SOC_RESET_HOOK=n
55
CONFIG_HEAP_MEM_POOL_SIZE=4096
66
CONFIG_OPENAMP=y
77
CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=4096

samples/subsys/ipc/openamp_rsc_table/boards/colibri_imx7d_mcimx7d_m4.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CONFIG_IPM=y
22
CONFIG_IPM_IMX_MAX_DATA_SIZE_4=y
33
CONFIG_OPENAMP_WITH_DCACHE=y
4-
CONFIG_PLATFORM_SPECIFIC_INIT=n
4+
CONFIG_SOC_RESET_HOOK=n
55
CONFIG_OPENAMP=y
66
CONFIG_OPENAMP_RSC_TABLE_NUM_RPMSG_BUFF=32
77
CONFIG_OPENAMP_RSC_TABLE=y
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
CONFIG_PLATFORM_SPECIFIC_INIT=n
1+
CONFIG_SOC_RESET_HOOK=n

soc/arm/fvp_aemv8r/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ config SOC_FVP_AEMV8R_AARCH32
1313
select CPU_HAS_MPU
1414
select VFP_DP_D32_FP16_FMAC if !USE_SWITCH
1515
select GIC_SINGLE_SECURITY_STATE
16-
select PLATFORM_SPECIFIC_INIT
16+
select SOC_RESET_HOOK
1717
select ARM

soc/arm/fvp_aemv8r/aarch32/soc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <cmsis_core.h>
99
#include <zephyr/sys/barrier.h>
1010

11-
void z_arm_platform_init(void)
11+
void soc_reset_hook(void)
1212
{
1313
if (IS_ENABLED(CONFIG_ICACHE)) {
1414
if (!(__get_SCTLR() & SCTLR_I_Msk)) {

0 commit comments

Comments
 (0)