From d3ef2204605d3d6bf05dcc7b484bfeb98355f96e Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Thu, 11 Jan 2024 13:54:45 +0000 Subject: [PATCH] soc: nios2-qemu: Port to HWMv2 Ports the nios2-qemu SoC configuration to hardware model version 2 Signed-off-by: Jamie McCrae --- .../nios2-qemu => v2/altera/qemu_nios2}/CMakeLists.txt | 3 +++ .../Kconfig.soc => v2/altera/qemu_nios2/Kconfig} | 4 ++-- .../nios2-qemu => v2/altera/qemu_nios2}/Kconfig.defconfig | 6 ++---- soc/v2/altera/qemu_nios2/Kconfig.soc | 8 ++++++++ .../nios2-qemu => v2/altera/qemu_nios2}/include/layout.h | 0 .../nios2-qemu => v2/altera/qemu_nios2}/include/linker.h | 0 .../nios2-qemu => v2/altera/qemu_nios2}/include/system.h | 0 soc/{nios2/nios2-qemu => v2/altera/qemu_nios2}/linker.ld | 0 soc/{nios2/nios2-qemu => v2/altera/qemu_nios2}/soc.h | 0 soc/v2/altera/qemu_nios2/soc.yml | 2 ++ 10 files changed, 17 insertions(+), 6 deletions(-) rename soc/{nios2/nios2-qemu => v2/altera/qemu_nios2}/CMakeLists.txt (68%) rename soc/{nios2/nios2-qemu/Kconfig.soc => v2/altera/qemu_nios2/Kconfig} (66%) rename soc/{nios2/nios2-qemu => v2/altera/qemu_nios2}/Kconfig.defconfig (63%) create mode 100644 soc/v2/altera/qemu_nios2/Kconfig.soc rename soc/{nios2/nios2-qemu => v2/altera/qemu_nios2}/include/layout.h (100%) rename soc/{nios2/nios2-qemu => v2/altera/qemu_nios2}/include/linker.h (100%) rename soc/{nios2/nios2-qemu => v2/altera/qemu_nios2}/include/system.h (100%) rename soc/{nios2/nios2-qemu => v2/altera/qemu_nios2}/linker.ld (100%) rename soc/{nios2/nios2-qemu => v2/altera/qemu_nios2}/soc.h (100%) create mode 100644 soc/v2/altera/qemu_nios2/soc.yml diff --git a/soc/nios2/nios2-qemu/CMakeLists.txt b/soc/v2/altera/qemu_nios2/CMakeLists.txt similarity index 68% rename from soc/nios2/nios2-qemu/CMakeLists.txt rename to soc/v2/altera/qemu_nios2/CMakeLists.txt index b6dd454d035..8afc2e70196 100644 --- a/soc/nios2/nios2-qemu/CMakeLists.txt +++ b/soc/v2/altera/qemu_nios2/CMakeLists.txt @@ -1,4 +1,7 @@ +# Copyright (c) 2018 Intel Corporation # SPDX-License-Identifier: Apache-2.0 zephyr_include_directories(include) +zephyr_include_directories(.) + set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "") diff --git a/soc/nios2/nios2-qemu/Kconfig.soc b/soc/v2/altera/qemu_nios2/Kconfig similarity index 66% rename from soc/nios2/nios2-qemu/Kconfig.soc rename to soc/v2/altera/qemu_nios2/Kconfig index 0f670e4e4c6..3d64aa15b77 100644 --- a/soc/nios2/nios2-qemu/Kconfig.soc +++ b/soc/v2/altera/qemu_nios2/Kconfig @@ -1,7 +1,7 @@ +# Copyright (c) 2018 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -config SOC_NIOS2_QEMU - bool "Nios II - Experimental QEMU emulation" +config SOC_QEMU_NIOS2 select NIOS2 select HAS_MUL_INSTRUCTION select HAS_DIV_INSTRUCTION diff --git a/soc/nios2/nios2-qemu/Kconfig.defconfig b/soc/v2/altera/qemu_nios2/Kconfig.defconfig similarity index 63% rename from soc/nios2/nios2-qemu/Kconfig.defconfig rename to soc/v2/altera/qemu_nios2/Kconfig.defconfig index 453af05cd8c..7584fb7af4b 100644 --- a/soc/nios2/nios2-qemu/Kconfig.defconfig +++ b/soc/v2/altera/qemu_nios2/Kconfig.defconfig @@ -1,9 +1,7 @@ +# Copyright (c) 2018 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -if SOC_NIOS2_QEMU - -config SOC - default "nios2-qemu" +if SOC_QEMU_NIOS2 config SYS_CLOCK_HW_CYCLES_PER_SEC default 50000000 diff --git a/soc/v2/altera/qemu_nios2/Kconfig.soc b/soc/v2/altera/qemu_nios2/Kconfig.soc new file mode 100644 index 00000000000..1455b3ae7ac --- /dev/null +++ b/soc/v2/altera/qemu_nios2/Kconfig.soc @@ -0,0 +1,8 @@ +# Copyright (c) 2018 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +config SOC_QEMU_NIOS2 + bool + +config SOC + default "qemu_nios2" if SOC_QEMU_NIOS2 diff --git a/soc/nios2/nios2-qemu/include/layout.h b/soc/v2/altera/qemu_nios2/include/layout.h similarity index 100% rename from soc/nios2/nios2-qemu/include/layout.h rename to soc/v2/altera/qemu_nios2/include/layout.h diff --git a/soc/nios2/nios2-qemu/include/linker.h b/soc/v2/altera/qemu_nios2/include/linker.h similarity index 100% rename from soc/nios2/nios2-qemu/include/linker.h rename to soc/v2/altera/qemu_nios2/include/linker.h diff --git a/soc/nios2/nios2-qemu/include/system.h b/soc/v2/altera/qemu_nios2/include/system.h similarity index 100% rename from soc/nios2/nios2-qemu/include/system.h rename to soc/v2/altera/qemu_nios2/include/system.h diff --git a/soc/nios2/nios2-qemu/linker.ld b/soc/v2/altera/qemu_nios2/linker.ld similarity index 100% rename from soc/nios2/nios2-qemu/linker.ld rename to soc/v2/altera/qemu_nios2/linker.ld diff --git a/soc/nios2/nios2-qemu/soc.h b/soc/v2/altera/qemu_nios2/soc.h similarity index 100% rename from soc/nios2/nios2-qemu/soc.h rename to soc/v2/altera/qemu_nios2/soc.h diff --git a/soc/v2/altera/qemu_nios2/soc.yml b/soc/v2/altera/qemu_nios2/soc.yml new file mode 100644 index 00000000000..414892bcc3f --- /dev/null +++ b/soc/v2/altera/qemu_nios2/soc.yml @@ -0,0 +1,2 @@ +socs: + - name: qemu_nios2