0001-omap34xx-SPL-enable-MMC-raw-boot-with-u-boot.img.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From a49275a3cc03970939585610ebcf3b3d7e547037 Mon Sep 17 00:00:00 2001
  2. From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
  3. Date: Sat, 9 Nov 2019 18:53:40 +0100
  4. Subject: [PATCH] omap34xx: SPL: enable MMC raw boot with u-boot.img
  5. The following commit enabled raw SPL booting:
  6. 22d90d560a omap3: Use raw SPL by default for mmc1
  7. but it was reverted by the following commit:
  8. 821c89d38c Revert "omap3: Use raw SPL by default for mmc1"
  9. because SPL is unable to distinguish between RAW images and
  10. garbage.
  11. However if CONFIG_SPL_RAW_IMAGE_SUPPORT is disabled, SPL does
  12. identify if there is a valid image with spl_parse_image_header.
  13. With this change, and CONFIG_SPL_RAW_IMAGE_SUPPORT disabled,
  14. raw MMC boot will be tried first, and if it fails, it FS will
  15. be tried.
  16. The two scenarios have been tested on a BeagleBoard XM Revision C1.
  17. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
  18. ---
  19. arch/arm/mach-omap2/boot-common.c | 2 ++
  20. 1 file changed, 2 insertions(+)
  21. diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c
  22. index 734fa9d9e6..a48244e1c5 100644
  23. --- a/arch/arm/mach-omap2/boot-common.c
  24. +++ b/arch/arm/mach-omap2/boot-common.c
  25. @@ -132,8 +132,10 @@ void save_omap_boot_params(void)
  26. (boot_device <= MMC_BOOT_DEVICES_END)) {
  27. switch (boot_device) {
  28. case BOOT_DEVICE_MMC1:
  29. +#ifdef CONFIG_SPL_RAW_IMAGE_SUPPORT
  30. boot_mode = MMCSD_MODE_FS;
  31. break;
  32. +#endif
  33. case BOOT_DEVICE_MMC2:
  34. boot_mode = MMCSD_MODE_RAW;
  35. break;
  36. --
  37. 2.24.0