]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mach-sc5xx: Rename SC_BOOT_MODE
authorGreg Malysa <malysagreg@gmail.com>
Thu, 11 Dec 2025 08:03:53 +0000 (03:03 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 23 Jan 2026 20:20:58 +0000 (14:20 -0600)
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@analog.com>
Signed-off-by: Greg Malysa <malysagreg@gmail.com>
arch/arm/mach-sc5xx/Kconfig
arch/arm/mach-sc5xx/config.mk

index 70c7e5e0631b2054141bc1409eb3364af8769d24..170177f4e10a3f204c1a4a98b99db1cbeaec4f78 100644 (file)
@@ -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"
index 266d2e3a77752a25a9071a38d6c17b4bdd3f9dc3..b4eb1c428106c420554c661539373ca5540d32eb 100644 (file)
@@ -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