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 47396C433EF for ; Sun, 6 Mar 2022 13:06:07 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 750AF83BC0; Sun, 6 Mar 2022 14:06:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=nic.cz 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; secure) header.d=nic.cz header.i=@nic.cz header.b="AnaM/lUO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 02EB183C80; Sun, 6 Mar 2022 14:06:03 +0100 (CET) Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (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 8DE5983BC0 for ; Sun, 6 Mar 2022 14:05:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.behun@nic.cz Received: from thinkpad (unknown [172.20.6.87]) by mail.nic.cz (Postfix) with ESMTPSA id F27E1140439; Sun, 6 Mar 2022 14:05:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1646571959; bh=darFnOiC9kA8OHw5hkXGUYPI+radN6ZU5ucveLDOe9o=; h=Date:From:To; b=AnaM/lUO6DINPAmgBzxloWkUQxcIULa83M6Mp9kaPLHaIOL8cmsQ15gWGmDggMF0k SBWP7SceFjSoD5zpwa7sYBW5WgCgHVPZUutFvxDQoTfXl2Dr4QHzkRuRJgBs8+Nv/l 2GQkWSMkB4AXwMcLy3aMl1AtvdvAzHJFFN89/bz4= Date: Sun, 6 Mar 2022 14:05:53 +0100 From: Marek =?UTF-8?B?QmVow7pu?= To: Pali =?UTF-8?B?Um9ow6Fy?= Cc: Stefan Roese , u-boot@lists.denx.de Subject: Re: [PATCH] tools: kwboot: Allow to specify custom baudrate only in supported operations Message-ID: <20220306140553.7a2e8bf7@thinkpad> In-Reply-To: <20220306123830.24735-1-pali@kernel.org> References: <20220306123830.24735-1-pali@kernel.org> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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.5 at phobos.denx.de X-Virus-Status: Clean On Sun, 6 Mar 2022 13:38:30 +0100 Pali Roh=C3=A1r wrote: > Custom baudrate different than 115200 may be specified only when kwboot is > not going to send boot/debug message pattern or when it is going to send > boot message pattern with image file (in which case baudrate change happe= ns > after sending kwbimage header). BootROM detects boot/debug message pattern > only at baudrate 115200. >=20 > Signed-off-by: Pali Roh=C3=A1r > --- > tools/kwboot.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/tools/kwboot.c b/tools/kwboot.c > index 69d1be0f4823..f975c4a6c6ca 100644 > --- a/tools/kwboot.c > +++ b/tools/kwboot.c > @@ -2128,6 +2128,10 @@ main(int argc, char **argv) > if (!bootmsg && !term && !debugmsg && !imgpath) > goto usage; > =20 > + /* boot and debug message use baudrate 115200 */ > + if (((bootmsg && !imgpath) || debugmsg) && baudrate !=3D 115200) > + goto usage; Maybe this should print an actual error message describing the problem? Otherwise the user might not understand why they are getting usage... Marek