summaryrefslogtreecommitdiff
path: root/board/kontron
diff options
context:
space:
mode:
authorFrieder Schrempf <[email protected]>2025-11-04 11:30:08 +0100
committerFabio Estevam <[email protected]>2025-11-04 12:45:51 -0300
commit7aa1efa622dfa31c99b86997a7da97bcd553715f (patch)
tree27d3dd030f4059abddaf678f3ecb6e0a59e1339d /board/kontron
parent03584081047df5b5f24f4a0f6c1b0645036bf73e (diff)
imx: kontron-sl-mx8mm: Implement spl_board_loader_name()
This allows to print user-friendly names for the boot device probed by SPL to the console. Signed-off-by: Frieder Schrempf <[email protected]>
Diffstat (limited to 'board/kontron')
-rw-r--r--board/kontron/sl-mx8mm/spl.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/board/kontron/sl-mx8mm/spl.c b/board/kontron/sl-mx8mm/spl.c
index 50eb0eb13e1..a5cdd2ab6d1 100644
--- a/board/kontron/sl-mx8mm/spl.c
+++ b/board/kontron/sl-mx8mm/spl.c
@@ -206,6 +206,33 @@ unsigned long board_spl_mmc_get_uboot_raw_sector(struct mmc *mmc, unsigned long
return raw_sect;
}
+const char *spl_board_loader_name(u32 boot_device)
+{
+ static char name[16];
+ struct mmc *mmc;
+
+ switch (boot_device) {
+ case BOOT_DEVICE_SPI:
+ sprintf(name, "SPI NOR");
+ return name;
+ case BOOT_DEVICE_MMC1:
+ mmc_init_device(0);
+ mmc = find_mmc_device(0);
+ mmc_init(mmc);
+ snprintf(name, sizeof(name), "eMMC %s",
+ emmc_hwpart_names[EXT_CSD_EXTRACT_BOOT_PART(mmc->part_config)]);
+ return name;
+ case BOOT_DEVICE_MMC2:
+ sprintf(name, "SD card");
+ return name;
+ case BOOT_DEVICE_BOARD:
+ sprintf(name, "USB OTG");
+ return name;
+ }
+
+ return NULL;
+}
+
void board_init_f(ulong dummy)
{
int ret;