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 C31ADC6FD1D for ; Wed, 15 Mar 2023 19:43:41 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5F5B185E0D; Wed, 15 Mar 2023 20:43:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ll3SxH/G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5C55F85DAB; Wed, 15 Mar 2023 20:43:34 +0100 (CET) Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BFD6885DFB for ; Wed, 15 Mar 2023 20:43:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-ed1-x52f.google.com with SMTP id cy23so79751658edb.12 for ; Wed, 15 Mar 2023 12:43:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1678909409; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=nwGiyQ6nS6I2sNljQmBOmKSkpTthlMgYN33D+x42vSk=; b=ll3SxH/GCvv/O6NaWthJYeHduCennUKvjV7Z9Y4QbLx7gV4cgCbGktwA/GtNejUfL+ T1wDjsuYmprhS2HEkoG00yZ9J2Okn1gJjXeSz5K0u6Oq7RGQ3Sra4A0e5tIlohZeJPGQ BCmmC+4MfqrGJqcA+qVK2FMbfwHzUkpAMVDCo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678909409; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nwGiyQ6nS6I2sNljQmBOmKSkpTthlMgYN33D+x42vSk=; b=0GtnOMpg6NGyf9/aebPX/AaMyJ7HyE5JBAvZofKLoKfp7griMmq3ssxWf+k1K7sEnr pNABDm4mwd89k2IqW1q2DMc82HljMgb6O0Gc31jSV/t3pVxKY+TTmzzczDADejBDQMg2 rQkgM3t79zjY7LzsHWeHZQ/n6ThFD/Z5dG7luGliza4W3sWGyW+YLw9dp6Wc5Q/Oqf8t yHIzVpbvPIQaLt5i/yXmnlLO9sjagFpgqPZ6kmHfDd82JYiGe1msi4OKcvzsNw0t1Ifc pL4ik1+ksZxmn3J+PfFc/Oh3ZahmDi3HcGKXsY1nWKmdsJwk2YJKq1Ab15+yLogpGkmG YBmg== X-Gm-Message-State: AO0yUKUv850iwXf1abbq/0QWCWDPO72Q1TKx4SeXU3fdkFSiXCgcNMSR LG8DXgNgKr4HLD068XcfZ2hYVy9r1qFdVwrSYmVp3g== X-Google-Smtp-Source: AK7set8l6nLFt8u4PyYqPufXk1NbUIODdQZ+/ByO6fQMDXU0xXONHSQIGv8yEARvCoLerDaPKRxzDu8ZoENGFCO28bI= X-Received: by 2002:a17:906:c1d2:b0:888:3bc4:7e86 with SMTP id bw18-20020a170906c1d200b008883bc47e86mr3837421ejb.14.1678909409090; Wed, 15 Mar 2023 12:43:29 -0700 (PDT) MIME-Version: 1.0 References: <20230315002427.26167-1-mibodhi@gmail.com> In-Reply-To: <20230315002427.26167-1-mibodhi@gmail.com> From: Simon Glass Date: Wed, 15 Mar 2023 13:43:17 -0600 Message-ID: Subject: Re: [PATCH] console: Use flush() before panic and reset To: Tony Dinh Cc: Stefan Roese , =?UTF-8?Q?Pali_Roh=C3=A1r?= , Tom Rini , U-Boot Mailing List , Michael Walle Content-Type: text/plain; charset="UTF-8" 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 On Tue, 14 Mar 2023 at 18:24, Tony Dinh wrote: > > To make sure the panic and the reset messages will go out, console flush() should be used. > Sleep periods do not work in early u-boot phase when timer driver is not initialized yet. > > Reference: https://lists.denx.de/pipermail/u-boot/2023-March/512233.html > > Signed-off-by: Tony Dinh > --- > > arch/arm/lib/reset.c | 4 ++-- > lib/panic.c | 4 +++- > 2 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c > index 95169bae1c..3e051e36f1 100644 > --- a/arch/arm/lib/reset.c > +++ b/arch/arm/lib/reset.c > @@ -25,6 +25,7 @@ > #include > #include > #include > +#include Reviewed-by: Simon Glass Is flush implemented widely?