arch: arc: replace ARC_EARLY_SOC_INIT with PLATFORM_RESET_HOOK
Use generic hook infrastrucutre instead of custom Kconfig and hooks for ARC. Replace soc_early_asm_init_percpu() with platform_reset() Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
81cf87001c
commit
8c32a82e47
6 changed files with 24 additions and 23 deletions
|
@ -374,7 +374,9 @@ config ARC_EXCEPTION_STACK_SIZE
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
config ARC_EARLY_SOC_INIT
|
config ARC_EARLY_SOC_INIT
|
||||||
bool "Make early stage SoC-specific initialization"
|
bool "Make early stage SoC-specific initialization [DEPRECATED]"
|
||||||
|
select SOC_RESET_HOOK
|
||||||
|
select DEPRECATED
|
||||||
help
|
help
|
||||||
Call SoC per-core setup code on early stage initialization
|
Call SoC per-core setup code on early stage initialization
|
||||||
(before C runtime initialization). Setup code is called in form of
|
(before C runtime initialization). Setup code is called in form of
|
||||||
|
|
|
@ -16,8 +16,9 @@
|
||||||
#include <zephyr/arch/cpu.h>
|
#include <zephyr/arch/cpu.h>
|
||||||
#include <swap_macros.h>
|
#include <swap_macros.h>
|
||||||
#include <zephyr/arch/arc/asm-compat/assembler.h>
|
#include <zephyr/arch/arc/asm-compat/assembler.h>
|
||||||
#ifdef CONFIG_ARC_EARLY_SOC_INIT
|
|
||||||
#include <soc_ctrl.h>
|
#if defined(CONFIG_SOC_RESET_HOOK)
|
||||||
|
GTEXT(soc_reset_hook)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GDATA(z_interrupt_stacks)
|
GDATA(z_interrupt_stacks)
|
||||||
|
@ -112,8 +113,8 @@ done_icache_invalidate:
|
||||||
|
|
||||||
done_dcache_invalidate:
|
done_dcache_invalidate:
|
||||||
|
|
||||||
#ifdef CONFIG_ARC_EARLY_SOC_INIT
|
#ifdef CONFIG_SOC_RESET_HOOK
|
||||||
soc_early_asm_init_percpu
|
bl soc_reset_hook
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_dsp_extension_probe
|
_dsp_extension_probe
|
||||||
|
|
|
@ -16,5 +16,6 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
zephyr_include_directories(.)
|
zephyr_include_directories(.)
|
||||||
|
zephyr_library_sources_ifdef(CONFIG_SOC_RESET_HOOK soc_ctrl.S)
|
||||||
|
|
||||||
set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "")
|
set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "")
|
||||||
|
|
|
@ -44,7 +44,7 @@ config UART_NS16550_ACCESS_WORD_ONLY
|
||||||
config ARC_HAS_ACCL_REGS
|
config ARC_HAS_ACCL_REGS
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config ARC_EARLY_SOC_INIT
|
config SOC_RESET_HOOK
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config ARC_HAS_STACK_CHECKING
|
config ARC_HAS_STACK_CHECKING
|
||||||
|
|
14
soc/snps/hsdk4xd/soc_ctrl.S
Normal file
14
soc/snps/hsdk4xd/soc_ctrl.S
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Synopsys, Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <zephyr/toolchain.h>
|
||||||
|
#include <zephyr/linker/sections.h>
|
||||||
|
#include <zephyr/arch/cpu.h>
|
||||||
|
|
||||||
|
GTEXT(soc_reset_hook)
|
||||||
|
SECTION_FUNC(TEXT, soc_reset_hook)
|
||||||
|
mov r0, 1 /* disable LPB for HS4XD */
|
||||||
|
sr r0, [_ARC_V2_LPB_CTRL]
|
|
@ -1,17 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2023 Synopsys, Inc. All rights reserved.
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _ARC_HSDK4XD_SOC_CTRL_H_
|
|
||||||
#define _ARC_HSDK4XD_SOC_CTRL_H_
|
|
||||||
|
|
||||||
#ifdef _ASMLANGUAGE
|
|
||||||
.macro soc_early_asm_init_percpu
|
|
||||||
mov r0, 1 /* disable LPB for HS4XD */
|
|
||||||
sr r0, [_ARC_V2_LPB_CTRL]
|
|
||||||
.endm
|
|
||||||
#endif /* _ASMLANGUAGE */
|
|
||||||
|
|
||||||
#endif /* _ARC_HSDK4XD_SOC_CTRL_H_ */
|
|
Loading…
Add table
Add a link
Reference in a new issue