From: Tim Harvey <tharvey@gateworks.com>
To: Fabio Estevam <festevam@gmail.com>, u-boot@lists.denx.de
Cc: Tim Harvey <tharvey@gateworks.com>
Subject: [PATCH] venice: show emmc boot hardware partition
Date: Fri, 26 Apr 2024 09:55:54 -0700 [thread overview]
Message-ID: <20240426165554.1376497-1-tharvey@gateworks.com> (raw)
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>
---
board/gateworks/venice/spl.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/board/gateworks/venice/spl.c b/board/gateworks/venice/spl.c
index 3b0f11f2fd0f..531bad260b6d 100644
--- a/board/gateworks/venice/spl.c
+++ b/board/gateworks/venice/spl.c
@@ -366,9 +366,25 @@ unsigned long board_spl_mmc_get_uboot_raw_sector(struct mmc *mmc, unsigned long
const char *spl_board_loader_name(u32 boot_device)
{
+ struct mmc *mmc;
+ int part;
+
switch (boot_device) {
/* SDHC2 */
case BOOT_DEVICE_MMC1:
+ mmc_init_device(0);
+ mmc = find_mmc_device(0);
+ mmc_init(mmc);
+ part = EXT_CSD_EXTRACT_BOOT_PART(mmc->part_config);
+ switch (part) {
+ case 1:
+ return "eMMC boot0";
+ case 2:
+ return "eMMC boot1";
+ case 0:
+ case 7:
+ return "eMMC user";
+ }
return "eMMC";
/* SDHC3 */
case BOOT_DEVICE_MMC2:
--
2.25.1
next reply other threads:[~2024-04-26 16:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-26 16:55 Tim Harvey [this message]
2024-04-26 19:26 ` [PATCH] venice: show emmc boot hardware partition Dragan Simic
2024-04-27 0:08 ` Tim Harvey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240426165554.1376497-1-tharvey@gateworks.com \
--to=tharvey@gateworks.com \
--cc=festevam@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.