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 3D704C433F5 for ; Sun, 6 Mar 2022 12:39:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A5E828128D; Sun, 6 Mar 2022 13:39:03 +0100 (CET) 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="qG6GWH8+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 03AD180A4F; Sun, 6 Mar 2022 13:39:00 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (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 6E57F81277 for ; Sun, 6 Mar 2022 13:38:56 +0100 (CET) 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 E672D60B1B; Sun, 6 Mar 2022 12:38:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 301EEC340EC; Sun, 6 Mar 2022 12:38:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646570334; bh=VwEC2+n4lFkkVyVD5PUPry0MTJCUrn7s23AMeZz1cqs=; h=From:To:Cc:Subject:Date:From; b=qG6GWH8+KaJbc5l6KQN2MADXY121lWaFvxAIiGv8MpJoR8FmmtNQqnUCNB9sR3HNN IqXZAhKUmeJurFsfPF6s6IMl3Z72g23nJeN0bBEqE0TLIBOE/kq1FloB5hRwc+NL4N j1UgAGKQknA6AfUJtx7vqFLto71WLY8ydufWNPKdeosj7cQHns91lHVfss2Ihv4Z4r IobaI2EJE50yIVJbpXWv6WtT+PopL3urvoIoC0z0+7LGmahw8jTUYjHYQLiKZZ6CJ1 W9HgNEp8NNvIi7pfk+35t3URHSOo8npFmOnESjAK8DjYk2LJONx+EADKO4Ml2I68Ar r8/NXKy6t8HNw== Received: by pali.im (Postfix) id E5BBA830; Sun, 6 Mar 2022 13:38:50 +0100 (CET) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese , =?UTF-8?q?Marek=20Beh=C3=BAn?= Cc: u-boot@lists.denx.de Subject: [PATCH] tools: kwboot: Allow to specify custom baudrate only in supported operations Date: Sun, 6 Mar 2022 13:38:30 +0100 Message-Id: <20220306123830.24735-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 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.5 at phobos.denx.de X-Virus-Status: Clean 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 happens after sending kwbimage header). BootROM detects boot/debug message pattern only at baudrate 115200. Signed-off-by: Pali Rohár --- tools/kwboot.c | 4 ++++ 1 file changed, 4 insertions(+) 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; + /* boot and debug message use baudrate 115200 */ + if (((bootmsg && !imgpath) || debugmsg) && baudrate != 115200) + goto usage; + ttypath = argv[optind++]; if (optind != argc) -- 2.20.1