Skip to contentSkip to conversation

ARM: mvebu: Correct SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR usage

PATCH In review Tom Rini 2 participants 3 messages Mar 15, 2025 – Apr 16, 2025

Subsystems (3)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 ARM: mvebu: Correct SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR usage

As the code is today, we get a warning about "select" statements on "choice" options not doing anything. However, it also works as intended because SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is the default option within that choice statement. To guard against future regressions, make the choice statement in common/spl/Kconfig have an explicit default if MVEBU_SPL_BOOT_DEVICE_MMC.

---
Cc: Stefan Roese <[email protected]>
Cc: "Marek Behún" <[email protected]>
Cc: Chris Packham <[email protected]>

---
 arch/arm/mach-mvebu/Kconfig | 1 -
 common/spl/Kconfig          | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-mvebu/Kconfig +0 -1
index adb816982f87..c4be5d6e93e0 100644
@@ -394,7 +394,6 @@ config MVEBU_SPL_BOOT_DEVICE_MMC
 	imply SPL_LIBDISK_SUPPORT
 	imply SPL_MMC
 	select SUPPORT_EMMC_BOOT if SPL_MMC
-	select SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR if SPL_MMC
 	select SPL_BOOTROM_SUPPORT
 
 config MVEBU_SPL_BOOT_DEVICE_SATA
common/spl/Kconfig +1 -0
index 97f542fcc8a5..c4715de0a582 100644
@@ -538,6 +538,7 @@ if SPL_SYS_MMCSD_RAW_MODE
 
 choice
 	prompt "Method for locating next phase of boot (e.g. U-Boot)"
+	default SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR if MVEBU_SPL_BOOT_DEVICE_MMC
 
 config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
 	bool "MMC raw mode: by sector"
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Tom Rini

As the code is today, we get a warning about "select" statements on "choice" options not doing anything. However, it also works as intended because SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is the default option within that choice statement. To guard against future regressions, make the choice statement in common/spl/Kconfig have an explicit default if MVEBU_SPL_BOOT_DEVICE_MMC.

Quoted 5 lines

---
Cc: Stefan Roese <[email protected]>
Cc: "Marek Behún" <[email protected]>
Cc: Chris Packham <[email protected]>

Thanks,
Stefan

Quoted 29 lines
---
  arch/arm/mach-mvebu/Kconfig | 1 -
  common/spl/Kconfig          | 1 +
  2 files changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-mvebu/Kconfig +0 -1
index adb816982f87..c4be5d6e93e0 100644
@@ -394,7 +394,6 @@ config MVEBU_SPL_BOOT_DEVICE_MMC
  	imply SPL_LIBDISK_SUPPORT
  	imply SPL_MMC
  	select SUPPORT_EMMC_BOOT if SPL_MMC
-	select SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR if SPL_MMC
  	select SPL_BOOTROM_SUPPORT
 
  config MVEBU_SPL_BOOT_DEVICE_SATA
common/spl/Kconfig +1 -0
index 97f542fcc8a5..c4715de0a582 100644
@@ -538,6 +538,7 @@ if SPL_SYS_MMCSD_RAW_MODE
 
  choice
  	prompt "Method for locating next phase of boot (e.g. U-Boot)"
+	default SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR if MVEBU_SPL_BOOT_DEVICE_MMC
 
  config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
  	bool "MMC raw mode: by sector"
#2 lore raw
In reply to Tom Rini
Quoted 8 lines · Tom Rini

As the code is today, we get a warning about "select" statements on "choice" options not doing anything. However, it also works as intended because SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is the default option within that choice statement. To guard against future regressions, make the choice statement in common/spl/Kconfig have an explicit default if MVEBU_SPL_BOOT_DEVICE_MMC.

Applied to u-boot-marvell/master

Thanks,
Stefan

Quoted 26 lines

---
Cc: Stefan Roese <[email protected]>
Cc: "Marek Behún" <[email protected]>
Cc: Chris Packham <[email protected]>

---
  arch/arm/mach-mvebu/Kconfig | 1 -
  common/spl/Kconfig          | 1 +
  2 files changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-mvebu/Kconfig +0 -1
index adb816982f87..c4be5d6e93e0 100644
@@ -394,7 +394,6 @@ config MVEBU_SPL_BOOT_DEVICE_MMC
  	imply SPL_LIBDISK_SUPPORT
  	imply SPL_MMC
  	select SUPPORT_EMMC_BOOT if SPL_MMC
-	select SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR if SPL_MMC
  	select SPL_BOOTROM_SUPPORT
 
  config MVEBU_SPL_BOOT_DEVICE_SATA
common/spl/Kconfig +0 -0
index 97f542fcc8a5..c4715de0a582 100644

common/spl/Kconfig if SPL_SYS_MMCSD_RAW_MODE · line 544

Quoted 7 lines
common/spl/Kconfig +1 -0
@@ -538,6 +538,7 @@ if SPL_SYS_MMCSD_RAW_MODE
 
  choice
  	prompt "Method for locating next phase of boot (e.g. U-Boot)"
+	default SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR if MVEBU_SPL_BOOT_DEVICE_MMC
 
  config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
  	bool "MMC raw mode: by sector"

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]