Skip to contentSkip to conversation

spl: ram: hide SPL_RAM_SUPPORT

PATCH Superseded Jerome Forissier 2 participants 3 messages Sep 10, 2024

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spl: ram: hide SPL_RAM_SUPPORT

Make SPL_RAM_SUPPORT a hidden Kconfig symbol, automatically selected by SPL_RAM_DEVICE or SPL_DFU. Avoids the situation where SPL_RAM_SUPPORT may be enabled without the other two being enabled, which results in the following build warning:

common/spl/spl_ram.c:19:14: warning: ‘spl_ram_load_read’ defined but not used [-Wunused-function]
19 | static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector,

      |              ^~~~~~~~~~~~~~~~~
---
 common/spl/Kconfig | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Replaces "spl: ram: fix build warning when neither RAM_DEVICE nor DFU are enabled" [1].

[1] https://lists.denx.de/pipermail/u-boot/2024-September/564302.html

common/spl/Kconfig +2 -6
index c08ff064493..885a012461c 100644
@@ -1238,15 +1238,11 @@ config SPL_POWER_DOMAIN
 	  the drivers in drivers/power/domain as part of a SPL build.
 
 config SPL_RAM_SUPPORT
-	bool "Support booting from RAM"
-	default y if MICROBLAZE || ARCH_SOCFPGA || ARCH_TEGRA || ARCH_ZYNQ
-	help
-	  Enable booting of an image in RAM. The image can be preloaded or
-	  it can be loaded by SPL directly into RAM (e.g. using USB).
+	bool
 
 config SPL_RAM_DEVICE
 	bool "Support booting from preloaded image in RAM"
-	depends on SPL_RAM_SUPPORT
+	select SPL_RAM_SUPPORT
 	default y if MICROBLAZE || ARCH_SOCFPGA || ARCH_TEGRA || ARCH_ZYNQ
 	help
 	  Enable booting of an image already loaded in RAM. The image has to
Signature · 1 line
2.40.1
#1 lore raw
Quoted 31 lines · Jerome Forissier

Make SPL_RAM_SUPPORT a hidden Kconfig symbol, automatically selected by SPL_RAM_DEVICE or SPL_DFU. Avoids the situation where SPL_RAM_SUPPORT may be enabled without the other two being enabled, which results in the following build warning:

common/spl/spl_ram.c:19:14: warning: ‘spl_ram_load_read’ defined but not used [-Wunused-function]
19 | static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector,
| ^~~~~~~~~~~~~~~~~

---
  common/spl/Kconfig | 8 ++------
  1 file changed, 2 insertions(+), 6 deletions(-)

Replaces "spl: ram: fix build warning when neither RAM_DEVICE nor DFU are enabled" [1].

[1] https://lists.denx.de/pipermail/u-boot/2024-September/564302.html

common/spl/Kconfig +0 -4
index c08ff064493..885a012461c 100644
@@ -1238,15 +1238,11 @@ config SPL_POWER_DOMAIN
  	  the drivers in drivers/power/domain as part of a SPL build.
 
  config SPL_RAM_SUPPORT
-	bool "Support booting from RAM"
-	default y if MICROBLAZE || ARCH_SOCFPGA || ARCH_TEGRA || ARCH_ZYNQ
-	help
-	  Enable booting of an image in RAM. The image can be preloaded or

common/spl/Kconfig config SPL_POWER_DOMAIN · line 1248

Quoted 10 lines
common/spl/Kconfig +2 -2
-	  it can be loaded by SPL directly into RAM (e.g. using USB).
+	bool
 
  config SPL_RAM_DEVICE
  	bool "Support booting from preloaded image in RAM"
-	depends on SPL_RAM_SUPPORT
+	select SPL_RAM_SUPPORT
  	default y if MICROBLAZE || ARCH_SOCFPGA || ARCH_TEGRA || ARCH_ZYNQ
  	help
  	  Enable booting of an image already loaded in RAM. The image has to

I think SPL_DFU should also select SPL_RAM_SUPPORT

--Sean

#2 lore raw
Quoted 34 lines · Sean Anderson
Quoted 33 lines · Jerome Forissier

Make SPL_RAM_SUPPORT a hidden Kconfig symbol, automatically selected by SPL_RAM_DEVICE or SPL_DFU. Avoids the situation where SPL_RAM_SUPPORT may be enabled without the other two being enabled, which results in the following build warning:

common/spl/spl_ram.c:19:14: warning: ‘spl_ram_load_read’ defined but not used [-Wunused-function] 19 | static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector, |              ^~~~~~~~~~~~~~~~~

---
  common/spl/Kconfig | 8 ++------

  1 file changed, 2 insertions(+), 6 deletions(-)

Replaces "spl: ram: fix build warning when neither RAM_DEVICE nor DFU are enabled" [1].

[1] https://lists.denx.de/pipermail/u-boot/2024-September/564302.html

common/spl/Kconfig +0 -0
index c08ff064493..885a012461c 100644
@@ -1238,15 +1238,11 @@ config SPL_POWER_DOMAIN

        the drivers in drivers/power/domain as part of a SPL build. config SPL_RAM_SUPPORT
-    bool "Support booting from RAM"
-    default y if MICROBLAZE || ARCH_SOCFPGA || ARCH_TEGRA || ARCH_ZYNQ -    help
-      Enable booting of an image in RAM. The image can be preloaded or -      it can be loaded by SPL directly into RAM (e.g. using USB). +    bool
    config SPL_RAM_DEVICE

Quoted 8 lines
Quoted 6 lines

      bool "Support booting from preloaded image in RAM"
-    depends on SPL_RAM_SUPPORT
+    select SPL_RAM_SUPPORT
      default y if MICROBLAZE || ARCH_SOCFPGA || ARCH_TEGRA || ARCH_ZYNQ help
        Enable booting of an image already loaded in RAM. The image has to

I think SPL_DFU should also select SPL_RAM_SUPPORT

Indeed, my mistake. v2 coming shortly.

Signature · 1 line
Jerome