Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 54C24C32772 for ; Tue, 23 Aug 2022 09:31:24 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 69B1284810; Tue, 23 Aug 2022 11:30:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=walle.cc header.i=@walle.cc header.b="OYr2hmtP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 314F383FC6; Tue, 23 Aug 2022 11:30:29 +0200 (CEST) Received: from mail.3ffe.de (0001.3ffe.de [159.69.201.130]) (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 BF8908460C for ; Tue, 23 Aug 2022 11:30:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michael@walle.cc Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 372B89960; Tue, 23 Aug 2022 11:30:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1661247024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eeUVYBKS6Zwhg71aR54jIuus7/VghxpACzXRHY2eaS4=; b=OYr2hmtPxA839c5haxxeUyy76qjhCPQ0CdIyn1bmPB2fIyffK8WH3lDhYrnTf1PokLzpvD +9g7Z54SUXrCaVkHcNuq3ru8tNdP592MArBg647X21536JWEDDRZydoDEq7Oe3sYpxVFJt o3oSmRPmqY+j8nytBwqB/5wMGUw0+RHAIoWEf2WCOem5GrxA9AllEFJQC1GifhVAfEIOeH sLu73q0S5jzgywG4uhj0Ung6kUPoarPyT2uQKso+F8Kf/vc5XMwDiSmnBupAHTihzPH4K2 xsahyTgmhLlhS9/Iak3JmxdUJGGw81kiLT0WBPT3OCrA7MwMWcnOAf9Du+6nVQ== From: Michael Walle To: peng.fan@oss.nxp.com Cc: u-boot@lists.denx.de, Michael Walle Subject: [PATCH v3 3/5] board: sl28: add user friendly names for the boot sources Date: Tue, 23 Aug 2022 11:30:16 +0200 Message-Id: <20220823093018.3157715-4-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220823093018.3157715-1-michael@walle.cc> References: <20220823093018.3157715-1-michael@walle.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.6 at phobos.denx.de X-Virus-Status: Clean During startup the SPL will print where the u-boot proper is read from. Instead of using the default names, provide more user friendly names. Signed-off-by: Michael Walle --- board/kontron/sl28/spl.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/board/kontron/sl28/spl.c b/board/kontron/sl28/spl.c index b1fefc22b2..ffaf517a8b 100644 --- a/board/kontron/sl28/spl.c +++ b/board/kontron/sl28/spl.c @@ -95,6 +95,22 @@ unsigned int spl_spi_get_uboot_offs(struct spi_flash *flash) } } +const char *spl_board_loader_name(u32 boot_device) +{ + enum boot_source src = sl28_boot_source(); + + switch (src) { + case BOOT_SOURCE_SDHC: + return "SD card (Test mode)"; + case BOOT_SOURCE_SPI: + return "Failsafe SPI flash"; + case BOOT_SOURCE_I2C: + return "SPI flash"; + case BOOT_SOURCE_MMC: + return "eMMC"; + default: + return "(unknown)"; + } } int board_early_init_f(void) -- 2.30.2