public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Marek Behún" <marek.behun@nic.cz>
To: "Pali Rohár" <pali@kernel.org>
Cc: Stefan Roese <sr@denx.de>, u-boot@lists.denx.de
Subject: Re: [PATCH] tools: kwboot: Allow to specify custom baudrate only in supported operations
Date: Sun, 6 Mar 2022 14:05:53 +0100	[thread overview]
Message-ID: <20220306140553.7a2e8bf7@thinkpad> (raw)
In-Reply-To: <20220306123830.24735-1-pali@kernel.org>

On Sun,  6 Mar 2022 13:38:30 +0100
Pali Rohár <pali@kernel.org> 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 happens
> after sending kwbimage header). BootROM detects boot/debug message pattern
> only at baudrate 115200.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>
> ---
>  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;

Maybe this should print an actual error message describing the problem?
Otherwise the user might not understand why they are getting usage...

Marek

  reply	other threads:[~2022-03-06 13:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-06 12:38 [PATCH] tools: kwboot: Allow to specify custom baudrate only in supported operations Pali Rohár
2022-03-06 13:05 ` Marek Behún [this message]
2022-03-07 14:35   ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220306140553.7a2e8bf7@thinkpad \
    --to=marek.behun@nic.cz \
    --cc=pali@kernel.org \
    --cc=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox