aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorMichael Walle2022-08-23 11:30:16 +0200
committerPeng Fan2022-09-06 09:10:41 +0800
commit9f461171238e1c32ae99e7485f4dd81247470505 (patch)
treee66e5df223799285891a0bddffea1e6d3cd1c560 /board
parent67b5dab2637196cac82329ccc2ebf2bd95ca26e2 (diff)
board: sl28: add user friendly names for the boot sources
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>
Diffstat (limited to 'board')
-rw-r--r--board/kontron/sl28/spl.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/board/kontron/sl28/spl.c b/board/kontron/sl28/spl.c
index b1fefc22b2c..ffaf517a8bb 100644
--- a/board/kontron/sl28/spl.c
+++ b/board/kontron/sl28/spl.c
@@ -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)