]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
spl: Kconfig: support U-Boot load from raw NAND
authorDario Binacchi <dario.binacchi@amarulasolutions.com>
Tue, 20 May 2025 08:54:16 +0000 (10:54 +0200)
committerFabio Estevam <festevam@gmail.com>
Wed, 21 May 2025 10:52:29 +0000 (07:52 -0300)
Commit 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options") breaks
the boot of the BSH SMM S2 board. As stated in the commit itself, "Some
boards use this value even though MMC is not enabled in SPL, for example
imx8mn_bsh_smm_s2".

Support load of the U-Boot image from raw NAND sector. This is equivalent
to load from MMC raw sector.

Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
common/spl/Kconfig

index aa3a85eea54d851b9ab8cf54b019c0001c58d1b6..77cf04d38ed0f7642702f09c73d0ab45f34dbf57 100644 (file)
@@ -974,6 +974,21 @@ config SPL_NAND_SUPPORT
          This enables the drivers in drivers/mtd/nand/raw as part of an SPL
          build.
 
+config SPL_NAND_RAW_U_BOOT_USE_SECTOR
+       bool "NAND raw mode: by sector"
+       depends on SPL_NAND_SUPPORT
+       select SPL_LOAD_BLOCK
+       help
+         Use sector number for specifying U-Boot location on NAND in
+         raw mode.
+
+config SPL_NAND_RAW_U_BOOT_SECTOR
+       hex "Address on the NAND to load U-Boot from"
+       depends on SPL_NAND_RAW_U_BOOT_USE_SECTOR
+       help
+         Address on the NAND to load U-Boot from, when the NAND is being used
+         in raw mode. Units: NAND disk sectors (1 sector = 512 bytes).
+
 config SPL_NAND_RAW_ONLY
        bool "Support to boot only raw u-boot.bin images"
        depends on SPL_NAND_SUPPORT