From mboxrd@z Thu Jan 1 00:00:00 1970 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 50519ECAAD5 for ; Mon, 5 Sep 2022 09:32:40 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3651584934; Mon, 5 Sep 2022 11:32:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org 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; unprotected) header.d=kernel.org header.i=@kernel.org header.b="QSKRWb8M"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F023184595; Mon, 5 Sep 2022 11:31:49 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0ACAA84897 for ; Mon, 5 Sep 2022 11:31:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CCF7F6119A; Mon, 5 Sep 2022 09:31:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1BB80C433C1; Mon, 5 Sep 2022 09:31:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662370303; bh=geoHlpPE9q0wic4ptzZXm2tIaKPTAmzqBQdZP3BWgGc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QSKRWb8MMjIChsSS/B2++4EBiWSJBjeF2E2ygdwrqPHYorPu8KkzTqaO8E/rv1l6S kMmjm/+fyrxC1nKKHd5SQWYJPo881A4CIutyGEf6/Ly73R1dS760oRJnPdzBDl/aRP bBk6XW6lbySEM+7kmPgM9yKCtRhCT27NJzl4rx4wyrhPIOwCLciD8Eq1KXogusskj7 V04euJ1uIzhStRIP0AKu76J7moqf1hxs0ouSyFCRoWcoJvrWEl9uFrlDDiV7soixD7 52mCR4JNfl+n2Ol+cR9qL7IwIislJ9Z8eSyfP6ozQ1OjHDgI6KMjOJ6l7O+OJCWYXI xxDHe63ljVoNQ== Received: by pali.im (Postfix) id 081B44E1B; Mon, 5 Sep 2022 11:31:40 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Simon Glass Cc: u-boot@lists.denx.de Subject: [PATCH v3 6/6] boot: Call flush() before booting Date: Mon, 5 Sep 2022 11:31:21 +0200 Message-Id: <20220905093121.11630-7-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220905093121.11630-1-pali@kernel.org> References: <20220905093121.11630-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 In a lot of cases kernel resets UART HW. To ensure that U-Boot messages printed before booting the kernel are not lost, call new U-Boot console flush() function. Signed-off-by: Pali Rohár --- Changes in v3: * Fix commit message --- boot/bootm_os.c | 1 + cmd/boot.c | 1 + cmd/elf.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/boot/bootm_os.c b/boot/bootm_os.c index f31820cd07ef..079224ce585b 100644 --- a/boot/bootm_os.c +++ b/boot/bootm_os.c @@ -303,6 +303,7 @@ static void do_bootvx_fdt(bootm_headers_t *images) #else printf("## Starting vxWorks at 0x%08lx\n", (ulong)images->ep); #endif + flush(); boot_jump_vxworks(images); diff --git a/cmd/boot.c b/cmd/boot.c index be67a5980de3..14839c1cedcc 100644 --- a/cmd/boot.c +++ b/cmd/boot.c @@ -32,6 +32,7 @@ static int do_go(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) addr = hextoul(argv[1], NULL); printf ("## Starting application at 0x%08lX ...\n", addr); + flush(); /* * pass address parameter as argv[0] (aka command name), diff --git a/cmd/elf.c b/cmd/elf.c index ce40d3f72a7c..b7b9f506a526 100644 --- a/cmd/elf.c +++ b/cmd/elf.c @@ -72,6 +72,7 @@ int do_bootelf(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) return rcode; printf("## Starting application at 0x%08lx ...\n", addr); + flush(); /* * pass address parameter as argv[0] (aka command name), @@ -274,6 +275,7 @@ int do_bootvx(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) puts("## Not an ELF image, assuming binary\n"); printf("## Starting vxWorks at 0x%08lx ...\n", addr); + flush(); dcache_disable(); #if defined(CONFIG_ARM64) && defined(CONFIG_ARMV8_PSCI) -- 2.20.1