[PATCH 02/12] mach-sc5xx: Rename SC_BOOT_MODE

Greg Malysa malysagreg at gmail.com
Tue Nov 18 07:39:35 CET 2025


The symbol SC_BOOT_MODE was named incorrectly and inconsistently with
its usage. The selected boot mode is set only by hardware and cannot be
adjusted through software (apart from the use of FORCE_BMODE to instruct
the boot rom to ignore the hardware setting when loading uboot proper,
but this cannot change how SPL is loaded).

This symbol actually controlled the BCODE (easily confused with BMODE,
shorthand for boot mode), so this renames it to SC_BCODE and updates the
help text to reflect its actual usage: the BCODE is an SoC- and boot
mode-specific setting that affects how the boot rom configures QSPI or
OSPI in order to read an LDR file from the associated peripheral.

Reported-by: Philip Molloy <Philip.Molloy at analog.com>
Signed-off-by: Greg Malysa <malysagreg at gmail.com>

---

Changes in v2:
- New

 arch/arm/mach-sc5xx/Kconfig   | 14 ++++++++------
 arch/arm/mach-sc5xx/config.mk |  2 +-
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-sc5xx/Kconfig b/arch/arm/mach-sc5xx/Kconfig
index 70c7e5e0631..170177f4e10 100644
--- a/arch/arm/mach-sc5xx/Kconfig
+++ b/arch/arm/mach-sc5xx/Kconfig
@@ -153,14 +153,16 @@ config ADI_IMAGE
 	  The image built by the ADI ADSP Linux build system.
 	  Is one of tiny, minimal, full.
 
-config SC_BOOT_MODE
-	int "SC5XX boot mode select"
+config SC_BCODE
+	int "SC5XX SPI BCODE select"
 	default 1
-	range 0 7
+	range 0 15
 	help
-	  Mode 0: do nothing, just idle
-	  Mode 1: boot ldr out of serial flash
-	  Mode 7: boot ldr over uart
+	  This sets the BCODE option for the generated LDR file. The BCODE
+	  is only used in SPI boots (QSPI/OSPI) but is set with no impact
+	  in other boot modes so that one LDR file may be reused from any
+	  boot media. The interpretation of this value is SoC and boot mode
+	  specific, so you must refer to the HRM to interpret it.
 
 config SC_BOOT_SPI_BUS
 	int "sc5xx spi boot bus"
diff --git a/arch/arm/mach-sc5xx/config.mk b/arch/arm/mach-sc5xx/config.mk
index 266d2e3a777..b4eb1c42810 100644
--- a/arch/arm/mach-sc5xx/config.mk
+++ b/arch/arm/mach-sc5xx/config.mk
@@ -14,5 +14,5 @@ endif
 
 INPUTS-y += u-boot.ldr
 
-LDR_FLAGS += --bcode=$(CONFIG_SC_BOOT_MODE)
+LDR_FLAGS += --bcode=$(CONFIG_SC_BCODE)
 LDR_FLAGS += --use-vmas
-- 
2.49.1



More information about the U-Boot mailing list