This allows to print user-friendly names for the boot device
probed by SPL to the console.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
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;