Skip to content

Commit

Permalink
soc: riscv: andes_v5: reorganize SoC folder
Browse files Browse the repository at this point in the history
Split out from riscv-privileged folder, and create a new family.

(cherry picked from commit 8027689)

Original-Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
GitOrigin-RevId: 8027689
Change-Id: Ie26c768ccd94c3e1f156b53184ffadfab13f6416
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5180660
Commit-Queue: Tristan Honscheid <honscheid@google.com>
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Reviewed-by: Tristan Honscheid <honscheid@google.com>
Tested-by: Tristan Honscheid <honscheid@google.com>
  • Loading branch information
gmarull authored and Chromeos LUCI committed Jan 10, 2024
1 parent 4de2960 commit dd4d16d
Show file tree
Hide file tree
Showing 25 changed files with 55 additions and 26 deletions.
2 changes: 1 addition & 1 deletion boards/riscv/adp_xc7k_ae350/Kconfig.board
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

config BOARD_ADP_XC7K_AE350
bool "Andes ADP-XC7K AE350 Platform"
depends on SOC_RISCV_ANDES_AE350
depends on SOC_ANDES_AE350
4 changes: 2 additions & 2 deletions boards/riscv/adp_xc7k_ae350/adp_xc7k_ae350_defconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CONFIG_SOC_SERIES_RISCV_ANDES_V5=y
CONFIG_SOC_RISCV_ANDES_AE350=y
CONFIG_SOC_SERIES_ANDES_AE350=y
CONFIG_SOC_ANDES_AE350=y
CONFIG_BOARD_ADP_XC7K_AE350=y
CONFIG_XIP=n
CONFIG_CONSOLE=y
Expand Down
2 changes: 1 addition & 1 deletion drivers/hwinfo/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ config HWINFO_GECKO
config HWINFO_ANDES
bool "Andes system ID"
default y
depends on SOC_SERIES_RISCV_ANDES_V5
depends on SOC_FAMILY_ANDES_V5
help
Enable Andes hwinfo driver

Expand Down
4 changes: 4 additions & 0 deletions soc/riscv/andes_v5/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) 2024 Nordic Semiconductor
# SPDX-License-Identifier: Apache-2.0

add_subdirectory(${SOC_SERIES})
15 changes: 15 additions & 0 deletions soc/riscv/andes_v5/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 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/riscv/andes_v5/*/Kconfig.soc"

endif # SOC_FAMILY_ANDES_V5
4 changes: 4 additions & 0 deletions soc/riscv/andes_v5/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

source "soc/riscv/andes_v5/*/Kconfig.defconfig.series"
4 changes: 4 additions & 0 deletions soc/riscv/andes_v5/Kconfig.soc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

source "soc/riscv/andes_v5/*/Kconfig.series"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_include_directories(${CONFIG_SOC})
zephyr_include_directories(.)

zephyr_sources(
start.S
Expand All @@ -24,6 +24,6 @@ if(CONFIG_SOC_ANDES_V5_EXECIT)
zephyr_ld_options(-Wl,--mexecit)
endif()

if(CONFIG_SOC_RISCV_ANDES_AE350)
set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/ae350/linker.ld CACHE INTERNAL "")
if(CONFIG_SOC_ANDES_AE350)
set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "")
endif()
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2021 Andes Technology Corporation
# SPDX-License-Identifier: Apache-2.0

if SOC_RISCV_ANDES_AE350
if SOC_ANDES_AE350

config SOC
default "ae350"
Expand All @@ -25,4 +25,4 @@ config MP_MAX_NUM_CPUS
default 1
range 1 8

endif # SOC_RISCV_ANDES_AE350
endif # SOC_ANDES_AE350
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Copyright (c) 2021 Andes Technology Corporation
# SPDX-License-Identifier: Apache-2.0

if SOC_SERIES_RISCV_ANDES_V5
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/riscv/riscv-privileged/andes_v5/Kconfig.defconfig.ae*"
source "soc/riscv/andes_v5/ae350/Kconfig.defconfig.ae*"

config SOC_SERIES
default "andes_v5"
default "ae350"

config SYS_CLOCK_HW_CYCLES_PER_SEC
default 60000000
Expand Down Expand Up @@ -45,4 +45,4 @@ config MAX_IRQ_PER_AGGREGATOR
config NUM_IRQS
default 64

endif # SOC_SERIES_RISCV_ANDES_V5
endif # SOC_SERIES_ANDES_AE350
11 changes: 11 additions & 0 deletions soc/riscv/andes_v5/ae350/Kconfig.series
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 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_PRIVILEGED_STANDALONE
select SOC_FAMILY_ANDES_V5
help
Enable support for Andes V5 AE350 SoC Series
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

choice
prompt "Andes V5 SoC Selection"
depends on SOC_SERIES_RISCV_ANDES_V5
depends on SOC_SERIES_ANDES_AE350

config SOC_RISCV_ANDES_AE350
config SOC_ANDES_AE350
bool "Andes AE350 SoC implementation"
select ATOMIC_OPERATIONS_BUILTIN
select INCLUDE_RESET_VECTOR
Expand All @@ -18,7 +18,7 @@ config SOC_RISCV_ANDES_AE350

endchoice

if SOC_SERIES_RISCV_ANDES_V5
if SOC_SERIES_ANDES_AE350

choice
prompt "Base CPU ISA options"
Expand Down Expand Up @@ -121,4 +121,4 @@ config SOC_ANDES_V5_IOCP
between cache and external non-caching master, such as DMA
controller.

endif # SOC_SERIES_RISCV_ANDES_V5
endif # SOC_SERIES_ANDES_AE350
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 0 additions & 9 deletions soc/riscv/riscv-privileged/andes_v5/Kconfig.series

This file was deleted.

0 comments on commit dd4d16d

Please sign in to comment.