soc: ae350: Port to HWMv2
Ports the ae350 SoC configuration to hardware model version 2 Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
committed by
Carles Cufi
parent
282204758a
commit
ef82a8255c
@@ -9,6 +9,8 @@ if(_SOC_IS_IN_TREE)
|
||||
endif()
|
||||
unset(_SOC_IS_IN_TREE)
|
||||
|
||||
add_subdirectory(common)
|
||||
|
||||
if(HWMv1)
|
||||
if(EXISTS ${SOC_DIR}/${ARCH}/CMakeLists.txt)
|
||||
add_subdirectory(${SOC_DIR}/${ARCH} soc/${ARCH})
|
||||
|
||||
@@ -15,6 +15,9 @@ osource "soc/soc_legacy/$(ARCH)/Kconfig"
|
||||
# Source Zephyr Kconfig specifics from SoC roots.
|
||||
osource "$(KCONFIG_BINARY_DIR)/soc/Kconfig"
|
||||
|
||||
# Source common Kconfig file
|
||||
osource "soc/common/Kconfig"
|
||||
|
||||
module = SOC
|
||||
module-str = SOC
|
||||
source "subsys/logging/Kconfig.template.log_config"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2024 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
source "soc/soc_legacy/riscv/andes_v5/*/Kconfig.series"
|
||||
rsource "*/Kconfig"
|
||||
@@ -1,15 +1,8 @@
|
||||
# Copyright (c) 2024 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config SOC_FAMILY_ANDES_V5
|
||||
bool
|
||||
|
||||
if SOC_FAMILY_ANDES_V5
|
||||
|
||||
config SOC_FAMILY
|
||||
string
|
||||
default "andes_v5"
|
||||
|
||||
source "soc/soc_legacy/riscv/andes_v5/*/Kconfig.soc"
|
||||
rsource "*/Kconfig.defconfig"
|
||||
|
||||
endif # SOC_FAMILY_ANDES_V5
|
||||
10
soc/andes/Kconfig.soc
Normal file
10
soc/andes/Kconfig.soc
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2024 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config SOC_FAMILY_ANDES_V5
|
||||
bool
|
||||
|
||||
config SOC_FAMILY
|
||||
default "andes_v5" if SOC_FAMILY_ANDES_V5
|
||||
|
||||
rsource "*/Kconfig.soc"
|
||||
@@ -1,12 +1,12 @@
|
||||
# Copyright (c) 2021 Andes Technology Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice
|
||||
prompt "Andes V5 SoC Selection"
|
||||
depends on SOC_SERIES_ANDES_AE350
|
||||
config SOC_SERIES_ANDES_AE350
|
||||
select RISCV
|
||||
select RISCV_PRIVILEGED
|
||||
select RISCV_HAS_PLIC
|
||||
|
||||
config SOC_ANDES_AE350
|
||||
bool "Andes AE350 SoC implementation"
|
||||
select ATOMIC_OPERATIONS_BUILTIN
|
||||
select INCLUDE_RESET_VECTOR
|
||||
select RISCV_ISA_EXT_M
|
||||
@@ -16,8 +16,6 @@ config SOC_ANDES_AE350
|
||||
select CPU_HAS_ICACHE
|
||||
select RISCV_PMP
|
||||
|
||||
endchoice
|
||||
|
||||
if SOC_SERIES_ANDES_AE350
|
||||
|
||||
choice
|
||||
@@ -6,10 +6,7 @@ if SOC_SERIES_ANDES_AE350
|
||||
# Kconfig picks the first default with a satisfied condition.
|
||||
# SoC defaults should be parsed before SoC Series defaults, because SoCs usually
|
||||
# overrides SoC Series values.
|
||||
source "soc/soc_legacy/riscv/andes_v5/ae350/Kconfig.defconfig.ae*"
|
||||
|
||||
config SOC_SERIES
|
||||
default "ae350"
|
||||
rsource "Kconfig.defconfig.ae*"
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default 60000000
|
||||
@@ -3,9 +3,6 @@
|
||||
|
||||
if SOC_ANDES_AE350
|
||||
|
||||
config SOC
|
||||
default "ae350"
|
||||
|
||||
config SYS_CLOCK_TICKS_PER_SEC
|
||||
default 100 if (!ICACHE || XIP)
|
||||
|
||||
20
soc/andes/ae350/Kconfig.soc
Normal file
20
soc/andes/ae350/Kconfig.soc
Normal file
@@ -0,0 +1,20 @@
|
||||
# Copyright (c) 2021 Andes Technology Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config SOC_SERIES_ANDES_AE350
|
||||
bool
|
||||
select SOC_FAMILY_ANDES_V5
|
||||
help
|
||||
Andes V5 AE350 SoC Series Implementation"
|
||||
|
||||
config SOC_ANDES_AE350
|
||||
bool
|
||||
select SOC_SERIES_ANDES_AE350
|
||||
help
|
||||
Andes AE350 SoC implementation"
|
||||
|
||||
config SOC_SERIES
|
||||
default "ae350" if SOC_SERIES_ANDES_AE350
|
||||
|
||||
config SOC
|
||||
default "ae350" if SOC_ANDES_AE350
|
||||
6
soc/andes/soc.yml
Normal file
6
soc/andes/soc.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
family:
|
||||
- name: andes_v5
|
||||
series:
|
||||
- name: ae350
|
||||
socs:
|
||||
- name: ae350
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2024 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
source "soc/soc_legacy/riscv/andes_v5/*/Kconfig.defconfig.series"
|
||||
add_subdirectory_ifdef(CONFIG_RISCV_PRIVILEGED riscv-privileged)
|
||||
@@ -1,4 +1,8 @@
|
||||
# Copyright (c) 2024 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
source "soc/soc_legacy/riscv/common/riscv-privileged/Kconfig"
|
||||
|
||||
if RISCV_PRIVILEGED
|
||||
|
||||
rsource "riscv-privileged/Kconfig"
|
||||
|
||||
endif # RISCV_PRIVILEGED
|
||||
@@ -1,7 +1,5 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
add_subdirectory(common)
|
||||
|
||||
if(SOC_FAMILY)
|
||||
add_subdirectory(${SOC_FAMILY})
|
||||
else()
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# Copyright (c) 2021 Andes Technology Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config SOC_SERIES_ANDES_AE350
|
||||
bool "Andes V5 AE350 SoC Series Implementation"
|
||||
select RISCV
|
||||
select RISCV_PRIVILEGED
|
||||
select RISCV_HAS_PLIC
|
||||
select SOC_FAMILY_ANDES_V5
|
||||
help
|
||||
Enable support for Andes V5 AE350 SoC Series
|
||||
@@ -1 +0,0 @@
|
||||
add_subdirectory_ifdef(CONFIG_RISCV_PRIVILEGED riscv-privileged)
|
||||
Reference in New Issue
Block a user