From patchwork Mon May 13 23:29:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Harvey X-Patchwork-Id: 1934837 X-Patchwork-Delegate: jh80.chung@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VdbLH60gYz20d6 for ; Tue, 14 May 2024 09:29:43 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7F21887C2D; Tue, 14 May 2024 01:29:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 472E188228; Tue, 14 May 2024 01:29:22 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from finn.localdomain (finn.gateworks.com [108.161.129.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B8CDF87D08 for ; Tue, 14 May 2024 01:29:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tharvey@gateworks.com Received: from syn-068-189-091-139.biz.spectrum.com ([68.189.91.139] helo=tharvey.pdc.gateworks.com) by finn.localdomain with esmtp (Exim 4.95) (envelope-from ) id 1s6f6X-007JY8-Vb; Mon, 13 May 2024 23:29:14 +0000 From: Tim Harvey To: Tom Rini , Tim Harvey , Simon Glass , Marek Vasut , Fabio Estevam , Jaehoon Chung , u-boot@lists.denx.de, Dragan Simic , Ulf Hansson , Avri Altman Subject: [PATCH 3/3 v4] venice: show emmc boot hardware partition Date: Mon, 13 May 2024 16:29:07 -0700 Message-Id: <20240513232907.2738959-4-tharvey@gateworks.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240513232907.2738959-1-tharvey@gateworks.com> References: <20240513232907.2738959-1-tharvey@gateworks.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean 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 --- v4: - include previous stand-alone patch in series - use emmc hw partition enum and names --- board/gateworks/venice/spl.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/board/gateworks/venice/spl.c b/board/gateworks/venice/spl.c index 6f6dea84feee..ad3af93143d9 100644 --- a/board/gateworks/venice/spl.c +++ b/board/gateworks/venice/spl.c @@ -366,16 +366,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)