Skip to contentSkip to conversation

andes: rearrange defconfig and dts

PATCH Superseded Randolph 3 participants 7 messages Sep 18, 2023 – Sep 20, 2023 RISC-V

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Randolph

author
#0 lore raw

v2 cover andes: rearrange defconfig and dts

Changes in v2:
- Split the original patch into three smaller ones

Randolph (3):
configs: andes: add vender prefix for target name
configs: andes: rearrange SPL mode memory layout
dts: andes: add SPL config option for itb layout

 arch/riscv/Kconfig                   |  4 ++--
 arch/riscv/dts/Makefile              |  2 +-
 arch/riscv/dts/ae350-u-boot.dtsi     |  1 +
 arch/riscv/dts/ae350_32.dts          |  1 -
 arch/riscv/dts/ae350_64.dts          |  1 -
 board/AndesTech/ae350/Kconfig        |  8 +++++++-
 configs/ae350_rv32_defconfig         |  3 ++-
 configs/ae350_rv32_spl_defconfig     | 10 ++++++----
 configs/ae350_rv32_spl_xip_defconfig |  8 +++++---
 configs/ae350_rv32_xip_defconfig     |  3 ++-
 configs/ae350_rv64_defconfig         |  3 ++-
 configs/ae350_rv64_spl_defconfig     | 10 ++++++----
 configs/ae350_rv64_spl_xip_defconfig |  8 +++++---
 configs/ae350_rv64_xip_defconfig     |  3 ++-
 14 files changed, 41 insertions(+), 24 deletions(-)
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH v2 1/3 configs: andes: add vender prefix for target name

Modify "CONFIG_TARGET_AE350" to "CONFIG_TARGET_ANDES_AE350"

---
 arch/riscv/Kconfig                   | 4 ++--
 arch/riscv/dts/Makefile              | 2 +-
 board/AndesTech/ae350/Kconfig        | 2 +-
 configs/ae350_rv32_defconfig         | 2 +-
 configs/ae350_rv32_spl_defconfig     | 2 +-
 configs/ae350_rv32_spl_xip_defconfig | 2 +-
 configs/ae350_rv32_xip_defconfig     | 2 +-
 configs/ae350_rv64_defconfig         | 2 +-
 configs/ae350_rv64_spl_defconfig     | 2 +-
 configs/ae350_rv64_spl_xip_defconfig | 2 +-
 configs/ae350_rv64_xip_defconfig     | 2 +-
 11 files changed, 12 insertions(+), 12 deletions(-)
arch/riscv/Kconfig +2 -2
index 6771d8d919..aff1f33665 100644
@@ -8,8 +8,8 @@ choice
 	prompt "Target select"
 	optional
 
-config TARGET_AE350
-	bool "Support ae350"
+config TARGET_ANDES_AE350
+	bool "Support Andes ae350"
 
 config TARGET_MICROCHIP_ICICLE
 	bool "Support Microchip PolarFire-SoC Icicle Board"
arch/riscv/dts/Makefile +1 -1
index f1525cb668..be6c8a4227 100644
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 
-dtb-$(CONFIG_TARGET_AE350) += ae350_32.dtb ae350_64.dtb
+dtb-$(CONFIG_TARGET_ANDES_AE350) += ae350_32.dtb ae350_64.dtb
 dtb-$(CONFIG_TARGET_MICROCHIP_ICICLE) += mpfs-icicle-kit.dtb
 dtb-$(CONFIG_TARGET_QEMU_VIRT) += qemu-virt32.dtb qemu-virt64.dtb
 dtb-$(CONFIG_TARGET_OPENPITON_RISCV64) += openpiton-riscv64.dtb
board/AndesTech/ae350/Kconfig +1 -1
index 75815bf99a..a85e7d6351 100644
@@ -1,4 +1,4 @@
-if TARGET_AE350
+if TARGET_ANDES_AE350
 
 config SYS_CPU
 	default "andesv5"
configs/ae350_rv32_defconfig +1 -1
index 06a683d986..2fbb87a9b3 100644
@@ -9,7 +9,7 @@ CONFIG_DEFAULT_DEVICE_TREE="ae350_32"
 CONFIG_SYS_PROMPT="RISC-V # "
 CONFIG_SYS_MONITOR_LEN=786432
 CONFIG_SYS_LOAD_ADDR=0x100000
-CONFIG_TARGET_AE350=y
+CONFIG_TARGET_ANDES_AE350=y
 CONFIG_FIT=y
 CONFIG_SYS_MONITOR_BASE=0x88000000
 CONFIG_DISTRO_DEFAULTS=y
configs/ae350_rv32_spl_defconfig +1 -1
index 75e55ba724..4adc1134ba 100644
@@ -11,7 +11,7 @@ CONFIG_SYS_MONITOR_LEN=786432
 CONFIG_SPL_SYS_MALLOC_F_LEN=0x100000
 CONFIG_SPL=y
 CONFIG_SYS_LOAD_ADDR=0x100000
-CONFIG_TARGET_AE350=y
+CONFIG_TARGET_ANDES_AE350=y
 CONFIG_RISCV_SMODE=y
 # CONFIG_AVAILABLE_HARTS is not set
 CONFIG_FIT=y
configs/ae350_rv32_spl_xip_defconfig +1 -1
index c2221b891e..e19eb546a6 100644
@@ -12,7 +12,7 @@ CONFIG_SYS_MONITOR_LEN=786432
 CONFIG_SPL_SYS_MALLOC_F_LEN=0x100000
 CONFIG_SPL=y
 CONFIG_SYS_LOAD_ADDR=0x100000
-CONFIG_TARGET_AE350=y
+CONFIG_TARGET_ANDES_AE350=y
 CONFIG_RISCV_SMODE=y
 CONFIG_SPL_XIP=y
 CONFIG_FIT=y
configs/ae350_rv32_xip_defconfig +1 -1
index 6d19400c2d..f1c1e5bc00 100644
@@ -9,7 +9,7 @@ CONFIG_DEFAULT_DEVICE_TREE="ae350_32"
 CONFIG_SYS_PROMPT="RISC-V # "
 CONFIG_SYS_MONITOR_LEN=786432
 CONFIG_SYS_LOAD_ADDR=0x100000
-CONFIG_TARGET_AE350=y
+CONFIG_TARGET_ANDES_AE350=y
 CONFIG_XIP=y
 CONFIG_FIT=y
 CONFIG_SYS_MONITOR_BASE=0x88000000
configs/ae350_rv64_defconfig +1 -1
index 0d7f0a552e..3f30842a8e 100644
@@ -8,7 +8,7 @@ CONFIG_ENV_SECT_SIZE=0x1000
 CONFIG_DEFAULT_DEVICE_TREE="ae350_64"
 CONFIG_SYS_PROMPT="RISC-V # "
 CONFIG_SYS_LOAD_ADDR=0x100000
-CONFIG_TARGET_AE350=y
+CONFIG_TARGET_ANDES_AE350=y
 CONFIG_ARCH_RV64I=y
 CONFIG_FIT=y
 CONFIG_SYS_MONITOR_BASE=0x88000000
configs/ae350_rv64_spl_defconfig +1 -1
index 6a72b5a047..629c5bab77 100644
@@ -10,7 +10,7 @@ CONFIG_SYS_PROMPT="RISC-V # "
 CONFIG_SPL_SYS_MALLOC_F_LEN=0x100000
 CONFIG_SPL=y
 CONFIG_SYS_LOAD_ADDR=0x100000
-CONFIG_TARGET_AE350=y
+CONFIG_TARGET_ANDES_AE350=y
 CONFIG_ARCH_RV64I=y
 CONFIG_RISCV_SMODE=y
 # CONFIG_AVAILABLE_HARTS is not set
configs/ae350_rv64_spl_xip_defconfig +1 -1
index 43581c79b1..4557e05445 100644
@@ -11,7 +11,7 @@ CONFIG_SYS_PROMPT="RISC-V # "
 CONFIG_SPL_SYS_MALLOC_F_LEN=0x100000
 CONFIG_SPL=y
 CONFIG_SYS_LOAD_ADDR=0x100000
-CONFIG_TARGET_AE350=y
+CONFIG_TARGET_ANDES_AE350=y
 CONFIG_ARCH_RV64I=y
 CONFIG_RISCV_SMODE=y
 CONFIG_SPL_XIP=y
configs/ae350_rv64_xip_defconfig +1 -1
index 02d7694489..cabbf75f84 100644
@@ -8,7 +8,7 @@ CONFIG_ENV_SECT_SIZE=0x1000
 CONFIG_DEFAULT_DEVICE_TREE="ae350_64"
 CONFIG_SYS_PROMPT="RISC-V # "
 CONFIG_SYS_LOAD_ADDR=0x100000
-CONFIG_TARGET_AE350=y
+CONFIG_TARGET_ANDES_AE350=y
 CONFIG_ARCH_RV64I=y
 CONFIG_XIP=y
 CONFIG_FIT=y
Signature · 1 line
2.34.1
author
#3 lore raw

PATCH v2 2/3 configs: andes: rearrange SPL mode memory layout

In reply to Randolph

Unify the memory layout for u-boot SPL mode
Add "CONFIG_SPL_OPENSBI_SCRATCH_OPTIONS"

---
 configs/ae350_rv32_spl_defconfig     | 7 ++++---
 configs/ae350_rv32_spl_xip_defconfig | 5 +++--
 configs/ae350_rv64_spl_defconfig     | 7 ++++---
 configs/ae350_rv64_spl_xip_defconfig | 5 +++--
 4 files changed, 14 insertions(+), 10 deletions(-)
configs/ae350_rv32_spl_defconfig +4 -3
index 4adc1134ba..b28a0a84fb 100644
@@ -8,14 +8,14 @@ CONFIG_ENV_SECT_SIZE=0x1000
 CONFIG_DEFAULT_DEVICE_TREE="ae350_32"
 CONFIG_SYS_PROMPT="RISC-V # "
 CONFIG_SYS_MONITOR_LEN=786432
-CONFIG_SPL_SYS_MALLOC_F_LEN=0x100000
+CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000000
 CONFIG_SPL=y
 CONFIG_SYS_LOAD_ADDR=0x100000
 CONFIG_TARGET_ANDES_AE350=y
 CONFIG_RISCV_SMODE=y
 # CONFIG_AVAILABLE_HARTS is not set
 CONFIG_FIT=y
-CONFIG_SPL_LOAD_FIT_ADDRESS=0x00200000
+CONFIG_SPL_LOAD_FIT_ADDRESS=0x10000000
 CONFIG_SYS_MONITOR_BASE=0x88000000
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_BOOTDELAY=3
@@ -23,9 +23,10 @@ CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_MAX_SIZE=0x100000
-CONFIG_SPL_BSS_START_ADDR=0x4000000
+CONFIG_SPL_BSS_START_ADDR=0x400000
 CONFIG_SPL_BOARD_INIT=y
 CONFIG_SPL_CACHE=y
+CONFIG_SPL_OPENSBI_SCRATCH_OPTIONS=0x0
 CONFIG_SYS_PBSIZE=1050
 CONFIG_SYS_BOOTM_LEN=0x4000000
 CONFIG_CMD_IMLS=y
configs/ae350_rv32_spl_xip_defconfig +3 -2
index e19eb546a6..5e8f1b3631 100644
@@ -9,7 +9,7 @@ CONFIG_DEFAULT_DEVICE_TREE="ae350_32"
 CONFIG_SPL_TEXT_BASE=0x80000000
 CONFIG_SYS_PROMPT="RISC-V # "
 CONFIG_SYS_MONITOR_LEN=786432
-CONFIG_SPL_SYS_MALLOC_F_LEN=0x100000
+CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000000
 CONFIG_SPL=y
 CONFIG_SYS_LOAD_ADDR=0x100000
 CONFIG_TARGET_ANDES_AE350=y
@@ -24,9 +24,10 @@ CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_MAX_SIZE=0x100000
-CONFIG_SPL_BSS_START_ADDR=0x4000000
+CONFIG_SPL_BSS_START_ADDR=0x400000
 CONFIG_SPL_BOARD_INIT=y
 CONFIG_SPL_CACHE=y
+CONFIG_SPL_OPENSBI_SCRATCH_OPTIONS=0x0
 CONFIG_SYS_PBSIZE=1050
 CONFIG_SYS_BOOTM_LEN=0x4000000
 CONFIG_CMD_IMLS=y
configs/ae350_rv64_spl_defconfig +4 -3
index 629c5bab77..1592ec811a 100644
@@ -7,7 +7,7 @@ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x10000000
 CONFIG_ENV_SECT_SIZE=0x1000
 CONFIG_DEFAULT_DEVICE_TREE="ae350_64"
 CONFIG_SYS_PROMPT="RISC-V # "
-CONFIG_SPL_SYS_MALLOC_F_LEN=0x100000
+CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000000
 CONFIG_SPL=y
 CONFIG_SYS_LOAD_ADDR=0x100000
 CONFIG_TARGET_ANDES_AE350=y
@@ -15,7 +15,7 @@ CONFIG_ARCH_RV64I=y
 CONFIG_RISCV_SMODE=y
 # CONFIG_AVAILABLE_HARTS is not set
 CONFIG_FIT=y
-CONFIG_SPL_LOAD_FIT_ADDRESS=0x00200000
+CONFIG_SPL_LOAD_FIT_ADDRESS=0x10000000
 CONFIG_SYS_MONITOR_BASE=0x88000000
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_BOOTDELAY=3
@@ -23,9 +23,10 @@ CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_MAX_SIZE=0x100000
-CONFIG_SPL_BSS_START_ADDR=0x4000000
+CONFIG_SPL_BSS_START_ADDR=0x400000
 CONFIG_SPL_BOARD_INIT=y
 CONFIG_SPL_CACHE=y
+CONFIG_SPL_OPENSBI_SCRATCH_OPTIONS=0x0
 CONFIG_SYS_PBSIZE=1050
 CONFIG_SYS_BOOTM_LEN=0x4000000
 CONFIG_CMD_IMLS=y
configs/ae350_rv64_spl_xip_defconfig +3 -2
index 4557e05445..97f961b6c9 100644
@@ -8,7 +8,7 @@ CONFIG_ENV_SECT_SIZE=0x1000
 CONFIG_DEFAULT_DEVICE_TREE="ae350_64"
 CONFIG_SPL_TEXT_BASE=0x80000000
 CONFIG_SYS_PROMPT="RISC-V # "
-CONFIG_SPL_SYS_MALLOC_F_LEN=0x100000
+CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000000
 CONFIG_SPL=y
 CONFIG_SYS_LOAD_ADDR=0x100000
 CONFIG_TARGET_ANDES_AE350=y
@@ -24,9 +24,10 @@ CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_MAX_SIZE=0x100000
-CONFIG_SPL_BSS_START_ADDR=0x4000000
+CONFIG_SPL_BSS_START_ADDR=0x400000
 CONFIG_SPL_BOARD_INIT=y
 CONFIG_SPL_CACHE=y
+CONFIG_SPL_OPENSBI_SCRATCH_OPTIONS=0x0
 CONFIG_SYS_PBSIZE=1050
 CONFIG_SYS_BOOTM_LEN=0x4000000
 CONFIG_CMD_IMLS=y
Signature · 1 line
2.34.1
author
#4 lore raw

PATCH v2 3/3 dts: andes: add SPL config option for itb layout

In reply to Randolph

Add SPL_LOAD_FIT_CONFIG for binman itb layout selection

---
 arch/riscv/dts/ae350-u-boot.dtsi     | 1 +
 arch/riscv/dts/ae350_32.dts          | 1 -
 arch/riscv/dts/ae350_64.dts          | 1 -
 board/AndesTech/ae350/Kconfig        | 6 ++++++
 configs/ae350_rv32_defconfig         | 1 +
 configs/ae350_rv32_spl_defconfig     | 1 +
 configs/ae350_rv32_spl_xip_defconfig | 1 +
 configs/ae350_rv32_xip_defconfig     | 1 +
 configs/ae350_rv64_defconfig         | 1 +
 configs/ae350_rv64_spl_defconfig     | 1 +
 configs/ae350_rv64_spl_xip_defconfig | 1 +
 configs/ae350_rv64_xip_defconfig     | 1 +
 12 files changed, 15 insertions(+), 2 deletions(-)
arch/riscv/dts/ae350-u-boot.dtsi +1 -0
index aef9159b7a..ff5725501f 100644
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
+#include CONFIG_SPL_LOAD_FIT_CONFIG
 
 / {
 	cpus {
arch/riscv/dts/ae350_32.dts +0 -1
index 61af6d5465..2caabad888 100644
@@ -2,7 +2,6 @@
 
 /dts-v1/;
 
-#include "binman.dtsi"
 #include "ae350-u-boot.dtsi"
 
 / {
arch/riscv/dts/ae350_64.dts +0 -1
index 8c7db29b4f..9d5f6c743c 100644
@@ -2,7 +2,6 @@
 
 /dts-v1/;
 
-#include "binman.dtsi"
 #include "ae350-u-boot.dtsi"
 
 / {
board/AndesTech/ae350/Kconfig +6 -0
index a85e7d6351..49a2f8ec23 100644
@@ -41,4 +41,10 @@ config BOARD_SPECIFIC_OPTIONS # dummy
 	imply SPL_RAM_DEVICE
 	imply OF_HAS_PRIOR_STAGE
 
+config SPL_LOAD_FIT_CONFIG
+	string "Default FIT configuration for SPL"
+	depends on SPL_LOAD_FIT
+	help
+	  Specify corresponding FIT configuration for SPL modes.
+
 endif
configs/ae350_rv32_defconfig +1 -0
index 2fbb87a9b3..eea919249d 100644
@@ -10,6 +10,7 @@ CONFIG_SYS_PROMPT="RISC-V # "
 CONFIG_SYS_MONITOR_LEN=786432
 CONFIG_SYS_LOAD_ADDR=0x100000
 CONFIG_TARGET_ANDES_AE350=y
+CONFIG_SPL_LOAD_FIT_CONFIG="binman.dtsi"
 CONFIG_FIT=y
 CONFIG_SYS_MONITOR_BASE=0x88000000
 CONFIG_DISTRO_DEFAULTS=y
configs/ae350_rv32_spl_defconfig +1 -0
index b28a0a84fb..0d100bdbb1 100644
@@ -13,6 +13,7 @@ CONFIG_SPL=y
 CONFIG_SYS_LOAD_ADDR=0x100000
 CONFIG_TARGET_ANDES_AE350=y
 CONFIG_RISCV_SMODE=y
+CONFIG_SPL_LOAD_FIT_CONFIG="binman.dtsi"
 # CONFIG_AVAILABLE_HARTS is not set
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x10000000
configs/ae350_rv32_spl_xip_defconfig +1 -0
index 5e8f1b3631..0284d18e58 100644
@@ -14,6 +14,7 @@ CONFIG_SPL=y
 CONFIG_SYS_LOAD_ADDR=0x100000
 CONFIG_TARGET_ANDES_AE350=y
 CONFIG_RISCV_SMODE=y
+CONFIG_SPL_LOAD_FIT_CONFIG="binman.dtsi"
 CONFIG_SPL_XIP=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x80010000
configs/ae350_rv32_xip_defconfig +1 -0
index f1c1e5bc00..1b01b881ed 100644
@@ -10,6 +10,7 @@ CONFIG_SYS_PROMPT="RISC-V # "
 CONFIG_SYS_MONITOR_LEN=786432
 CONFIG_SYS_LOAD_ADDR=0x100000
 CONFIG_TARGET_ANDES_AE350=y
+CONFIG_SPL_LOAD_FIT_CONFIG="binman.dtsi"
 CONFIG_XIP=y
 CONFIG_FIT=y
 CONFIG_SYS_MONITOR_BASE=0x88000000
configs/ae350_rv64_defconfig +1 -0
index 3f30842a8e..cd13fc58a5 100644
@@ -9,6 +9,7 @@ CONFIG_DEFAULT_DEVICE_TREE="ae350_64"
 CONFIG_SYS_PROMPT="RISC-V # "
 CONFIG_SYS_LOAD_ADDR=0x100000
 CONFIG_TARGET_ANDES_AE350=y
+CONFIG_SPL_LOAD_FIT_CONFIG="binman.dtsi"
 CONFIG_ARCH_RV64I=y
 CONFIG_FIT=y
 CONFIG_SYS_MONITOR_BASE=0x88000000
configs/ae350_rv64_spl_defconfig +1 -0
index 1592ec811a..2d32aea041 100644
@@ -13,6 +13,7 @@ CONFIG_SYS_LOAD_ADDR=0x100000
 CONFIG_TARGET_ANDES_AE350=y
 CONFIG_ARCH_RV64I=y
 CONFIG_RISCV_SMODE=y
+CONFIG_SPL_LOAD_FIT_CONFIG="binman.dtsi"
 # CONFIG_AVAILABLE_HARTS is not set
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x10000000
configs/ae350_rv64_spl_xip_defconfig +1 -0
index 97f961b6c9..f2fea9d28e 100644
@@ -14,6 +14,7 @@ CONFIG_SYS_LOAD_ADDR=0x100000
 CONFIG_TARGET_ANDES_AE350=y
 CONFIG_ARCH_RV64I=y
 CONFIG_RISCV_SMODE=y
+CONFIG_SPL_LOAD_FIT_CONFIG="binman.dtsi"
 CONFIG_SPL_XIP=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x80010000
configs/ae350_rv64_xip_defconfig +1 -0
index cabbf75f84..88c3869f75 100644
@@ -9,6 +9,7 @@ CONFIG_DEFAULT_DEVICE_TREE="ae350_64"
 CONFIG_SYS_PROMPT="RISC-V # "
 CONFIG_SYS_LOAD_ADDR=0x100000
 CONFIG_TARGET_ANDES_AE350=y
+CONFIG_SPL_LOAD_FIT_CONFIG="binman.dtsi"
 CONFIG_ARCH_RV64I=y
 CONFIG_XIP=y
 CONFIG_FIT=y
Signature · 1 line
2.34.1
#5 lore raw

Re: [PATCH V2 3/3] dts: andes: add SPL config option for itb layout

Quoted 17 lines · Randolph

Add SPL_LOAD_FIT_CONFIG for binman itb layout selection

---
 arch/riscv/dts/ae350-u-boot.dtsi     | 1 +
 arch/riscv/dts/ae350_32.dts          | 1 -
 arch/riscv/dts/ae350_64.dts          | 1 -
 board/AndesTech/ae350/Kconfig        | 6 ++++++
 configs/ae350_rv32_defconfig         | 1 +
 configs/ae350_rv32_spl_defconfig     | 1 +
 configs/ae350_rv32_spl_xip_defconfig | 1 +
 configs/ae350_rv32_xip_defconfig     | 1 +
 configs/ae350_rv64_defconfig         | 1 +
 configs/ae350_rv64_spl_defconfig     | 1 +
 configs/ae350_rv64_spl_xip_defconfig | 1 +
 configs/ae350_rv64_xip_defconfig     | 1 +
 12 files changed, 15 insertions(+), 2 deletions(-)

So this is where I have a problem. It's not clear why you need to change anything here, as there's no example given for doing something other than what you do today, and there's no documentation about it either. From other contexts, it seems like you're trying to re-implement CONFIG_SPL_OS_BOOT but not explaining why you can't use the existing framework.

Signature · 1 line
Tom
#6 lore raw

Re: [PATCH V2 3/3] dts: andes: add SPL config option for itb layout

Hi Tom,

Tom Rini <[email protected]> 於 2023年9月18日 週一 下午11:04寫道:

Quoted 28 lines · Randolph
Quoted 4 lines

Add SPL_LOAD_FIT_CONFIG for binman itb layout selection

Quoted 14 lines
---
 arch/riscv/dts/ae350-u-boot.dtsi     | 1 +
 arch/riscv/dts/ae350_32.dts          | 1 -
 arch/riscv/dts/ae350_64.dts          | 1 -
 board/AndesTech/ae350/Kconfig        | 6 ++++++
 configs/ae350_rv32_defconfig         | 1 +
 configs/ae350_rv32_spl_defconfig     | 1 +
 configs/ae350_rv32_spl_xip_defconfig | 1 +
 configs/ae350_rv32_xip_defconfig     | 1 +
 configs/ae350_rv64_defconfig         | 1 +
 configs/ae350_rv64_spl_defconfig     | 1 +
 configs/ae350_rv64_spl_xip_defconfig | 1 +
 configs/ae350_rv64_xip_defconfig     | 1 +
 12 files changed, 15 insertions(+), 2 deletions(-)

So this is where I have a problem. It's not clear why you need to change anything here, as there's no example given for doing something other than what you do today, and there's no documentation about it either. From other contexts, it seems like you're trying to re-implement CONFIG_SPL_OS_BOOT but not explaining why you can't use the existing framework.

Quoted 2 lines

--
Tom

We want to add our binman.dtsi (very similar to SPL_OS_BOOT) in the future,
but this may affect other vendors' code under arch/riscv. To take a step back and reduce the gap, we just want to rearrange our code now (in this patch).

We are not re-implementing SPL_OS_BOOT, the goal (skip loading u-boot proper)
is the same, the method is different. For example, in ARM architecture, the Falcon mode (by enabling SPL_OS_BOOT), the boot flow is u-boot SPL jump to Linux kernel. In RISC-V architecture, most SOCs require OpenSBI, the boot flow should be u-boot SPL -> OpenSBI -> Linux kernel. Apart from the boot flow, the code flow is also different, "jump_to_image_linux" is not necessary and the names are not quite right in the RISC-V architecture. The CONFIG_SPL_ARGS_ADDR macro is also not required when building RISC-V u-boot. That's why we need to create another way for OpenSBI to do the actions like CONFIG_SPL_OS_BOOT.

Randolph
Sincerely