0003-spl-Kconfig-support-U-Boot-load-from-raw-NAND.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From 8acea298bb82c38b20855cd46a46b9e418dc1fb0 Mon Sep 17 00:00:00 2001
  2. From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
  3. Date: Tue, 20 May 2025 10:54:16 +0200
  4. Subject: [PATCH] spl: Kconfig: support U-Boot load from raw NAND
  5. Commit 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options") breaks
  6. the boot of the BSH SMM S2 board. As stated in the commit itself, "Some
  7. boards use this value even though MMC is not enabled in SPL, for example
  8. imx8mn_bsh_smm_s2".
  9. Support load of the U-Boot image from raw NAND sector. This is equivalent
  10. to load from MMC raw sector.
  11. Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
  12. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
  13. Upstream: https://source.denx.de/u-boot/u-boot/-/commit/8acea298bb82c38b20855cd46a46b9e418dc1fb0
  14. ---
  15. common/spl/Kconfig | 15 +++++++++++++++
  16. 1 file changed, 15 insertions(+)
  17. diff --git a/common/spl/Kconfig b/common/spl/Kconfig
  18. index aa3a85eea54d..77cf04d38ed0 100644
  19. --- a/common/spl/Kconfig
  20. +++ b/common/spl/Kconfig
  21. @@ -974,6 +974,21 @@ config SPL_NAND_SUPPORT
  22. This enables the drivers in drivers/mtd/nand/raw as part of an SPL
  23. build.
  24. +config SPL_NAND_RAW_U_BOOT_USE_SECTOR
  25. + bool "NAND raw mode: by sector"
  26. + depends on SPL_NAND_SUPPORT
  27. + select SPL_LOAD_BLOCK
  28. + help
  29. + Use sector number for specifying U-Boot location on NAND in
  30. + raw mode.
  31. +
  32. +config SPL_NAND_RAW_U_BOOT_SECTOR
  33. + hex "Address on the NAND to load U-Boot from"
  34. + depends on SPL_NAND_RAW_U_BOOT_USE_SECTOR
  35. + help
  36. + Address on the NAND to load U-Boot from, when the NAND is being used
  37. + in raw mode. Units: NAND disk sectors (1 sector = 512 bytes).
  38. +
  39. config SPL_NAND_RAW_ONLY
  40. bool "Support to boot only raw u-boot.bin images"
  41. depends on SPL_NAND_SUPPORT
  42. --
  43. 2.43.0