]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: sl28: add user friendly names for the boot sources
authorMichael Walle <michael@walle.cc>
Tue, 23 Aug 2022 09:30:16 +0000 (11:30 +0200)
committerPeng Fan <peng.fan@nxp.com>
Tue, 6 Sep 2022 01:10:41 +0000 (09:10 +0800)
During startup the SPL will print where the u-boot proper is read from.
Instead of using the default names, provide more user friendly names.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
board/kontron/sl28/spl.c

index b1fefc22b2c7627f0668cd21a26826d7f189eea4..ffaf517a8bbe05e354cdb3aa7eca04c2dcb3d109 100644 (file)
@@ -95,6 +95,22 @@ unsigned int spl_spi_get_uboot_offs(struct spi_flash *flash)
        }
 }
 
+const char *spl_board_loader_name(u32 boot_device)
+{
+       enum boot_source src = sl28_boot_source();
+
+       switch (src) {
+       case BOOT_SOURCE_SDHC:
+               return "SD card (Test mode)";
+       case BOOT_SOURCE_SPI:
+               return "Failsafe SPI flash";
+       case BOOT_SOURCE_I2C:
+               return "SPI flash";
+       case BOOT_SOURCE_MMC:
+               return "eMMC";
+       default:
+               return "(unknown)";
+       }
 }
 
 int board_early_init_f(void)