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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E344C433EF for ; Sat, 23 Oct 2021 01:06:23 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E086B61037 for ; Sat, 23 Oct 2021 01:06:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E086B61037 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1C664831B2; Sat, 23 Oct 2021 03:06:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1634951179; bh=rUxnXtGaw9yrLLhSeUAuxtPhNNNrEQ3BzKTOQ198a3o=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=TDZLizUlxFhjXxJP/3IXuP/W3yx/eRYYI0gzKgeVO9Uomr6Ow3gY5ZLLjF2CXb3Ia GLntfbd685zdzJsMwoXTn8w0szquw81LDLVT75IO054UmtXP8D4sDCeXA93TpU62UI ZX3ILbumxjoslyFwZG3VzQkYTlSURZpGd2BfJDuuufVstKU3T6vpExO9vB29KKR3kZ 9xAtUc5wKm977iMcWGnwe7QeKtyq4FzTZrMTQ6nZ6Te0WwU4prXBDAs5SzlQICwCLx XiKDYZjt9R3xeuEwGY3SCIx7OnUFOxOFVq7wGuMTWYnrTxyyJOfxqDUxB4gX+jd+AG Tn16hcejyHb1A== Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 3FC2A83173; Sat, 23 Oct 2021 03:06:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1634951177; bh=rUxnXtGaw9yrLLhSeUAuxtPhNNNrEQ3BzKTOQ198a3o=; h=From:To:Cc:Subject:Date:From; b=xHl1rkgxc+jkZwcIdA1MPxplR9dIjjATczWKpx6mK+oo0gqU8BDfuUFzXKonfqArQ 5hGdmkAzR2wWwjZmDCOSiznHrrqPmjubVJF/6G8LgxQZP9siiCuL5gkwAf1epUh8Z+ GcuSFcz3/Ma5dgWFAUyXR65+AO3JNcYp+nsAIhDsl+E2nmgyV8VVe1cduoJ48tRtSA 6BltwgRwfV8vbaDHHMLGZLY15fWSpZxkobirLWIRJi5Dqlb0m2itK4ukdy6sMSmmKJ hUnfpbzaTB6lwzvXepSx7wUztRksCP/6nzHIb4BG7B8a3GHaDwyPuiKlDtCL/Y9ROX kAJR8ZgbKZwTA== From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Simon Glass Subject: [PATCH v2] bootstage: Add SPL support Date: Sat, 23 Oct 2021 03:06:03 +0200 Message-Id: <20211023010603.197091-1-marex@denx.de> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Allow usage of the bootstage facilities in SPL. Signed-off-by: Marek Vasut Cc: Simon Glass --- V2: Fix multiple misuses of BOOTSTAGE vs SHOW_BOOT_PROGRESS --- arch/x86/cpu/cpu.c | 2 +- board/siemens/iot2050/board.c | 2 +- common/Kconfig.boot | 9 +++++++++ common/init/board_init.c | 2 +- common/spl/spl.c | 2 +- include/bootstage.h | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 01dece5769c..86f53e78d24 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -178,7 +178,7 @@ int default_print_cpuinfo(void) return 0; } -#if CONFIG_IS_ENABLED(BOOTSTAGE) +#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS) void show_boot_progress(int val) { outb(val, POST_PORT); diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c index b2110978ae0..16ae2ffc174 100644 --- a/board/siemens/iot2050/board.c +++ b/board/siemens/iot2050/board.c @@ -250,7 +250,7 @@ void spl_board_init(void) { } -#if CONFIG_IS_ENABLED(LED) && CONFIG_IS_ENABLED(BOOTSTAGE) +#if CONFIG_IS_ENABLED(LED) && CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS) /* * Indicate any error or (accidental?) entering of CLI via the red status LED. */ diff --git a/common/Kconfig.boot b/common/Kconfig.boot index 9b84a8d005f..d0d0dbd09a3 100644 --- a/common/Kconfig.boot +++ b/common/Kconfig.boot @@ -696,6 +696,15 @@ config SHOW_BOOT_PROGRESS -150 common/cmd_nand.c Incorrect FIT image format 151 common/cmd_nand.c FIT image format OK +config SPL_SHOW_BOOT_PROGRESS + bool "Show boot progress in a board-specific manner" + depends on SPL + help + Defining this option allows to add some board-specific code (calling + a user-provided function show_boot_progress(int) that enables you to + show the system's boot progress on some display (for example, some + LEDs) on your board. For details see SHOW_BOOT_PROGRESS. + endmenu menu "Boot media" diff --git a/common/init/board_init.c b/common/init/board_init.c index 0965b96fa3a..eab5ee13953 100644 --- a/common/init/board_init.c +++ b/common/init/board_init.c @@ -166,7 +166,7 @@ void board_init_f_init_reserve(ulong base) board_init_f_init_stack_protection(); } -#if CONFIG_IS_ENABLED(BOOTSTAGE) +#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS) /* * Board-specific Platform code can reimplement show_boot_progress () if needed */ diff --git a/common/spl/spl.c b/common/spl/spl.c index be09c19351a..d95a29b3655 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -61,7 +61,7 @@ binman_sym_declare(ulong, spl, size); /* Define board data structure */ static struct bd_info bdata __attribute__ ((section(".data"))); -#if CONFIG_IS_ENABLED(BOOTSTAGE) +#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS) /* * Board-specific Platform code can reimplement show_boot_progress () if needed */ diff --git a/include/bootstage.h b/include/bootstage.h index f837a387c8c..8d1989ac0e5 100644 --- a/include/bootstage.h +++ b/include/bootstage.h @@ -220,7 +220,7 @@ enum bootstage_id { */ ulong timer_get_boot_us(void); -#if defined(USE_HOSTCC) || !CONFIG_IS_ENABLED(BOOTSTAGE) +#if defined(USE_HOSTCC) || !CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS) #define show_boot_progress(val) do {} while (0) #else /** -- 2.33.0