summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2024-05-31 08:36:35 -0700
committerTom Rini <trini@konsulko.com>2024-09-05 12:12:51 -0600
commit1f239b6febf1bf8dd914419856638b2d94e13f97 (patch)
tree294b9d2322351bf475e458b099706caa97c34972
parent150481e5baf861802aab34069405e5dcbcbb106f (diff)
venice: show emmc boot hardware partition
To aid in understanding what emmc hardware partition is being used to boot on power-up, display the hardware partition name in the SPL. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
-rw-r--r--board/gateworks/venice/spl.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/board/gateworks/venice/spl.c b/board/gateworks/venice/spl.c
index 05911ce9dd9..fa6f8b1ac08 100644
--- a/board/gateworks/venice/spl.c
+++ b/board/gateworks/venice/spl.c
@@ -363,16 +363,24 @@ unsigned long board_spl_mmc_get_uboot_raw_sector(struct mmc *mmc, unsigned long
const char *spl_board_loader_name(u32 boot_device)
{
+ static char name[16];
+ struct mmc *mmc;
+
switch (boot_device) {
/* SDHC2 */
case BOOT_DEVICE_MMC1:
- return "eMMC";
+ 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;
/* SDHC3 */
case BOOT_DEVICE_MMC2:
- return "SD card";
- default:
- return NULL;
+ sprintf(name, "SD card");
+ return name;
}
+
+ return NULL;
}
void spl_board_init(void)