[PATCH v2 1/3] tools: kwboot: Allow to specify custom baudrate only in supported operations

Stefan Roese sr at denx.de
Mon Mar 14 16:19:15 CET 2022


On 3/7/22 19:03, Pali Rohár 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 at kernel.org>

Applied to u-boot-marvell/master

Thanks,
Stefan

> ---
>   tools/kwboot.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/tools/kwboot.c b/tools/kwboot.c
> index 69d1be0f4823..986f27c2012a 100644
> --- a/tools/kwboot.c
> +++ b/tools/kwboot.c
> @@ -2133,6 +2133,12 @@ main(int argc, char **argv)
>   	if (optind != argc)
>   		goto usage;
>   
> +	/* boot and debug message use baudrate 115200 */
> +	if (((bootmsg && !imgpath) || debugmsg) && baudrate != 115200) {
> +		fprintf(stderr, "Baudrate other than 115200 cannot be used for this operation.\n");
> +		goto usage;
> +	}
> +
>   	tty = kwboot_open_tty(ttypath, imgpath ? 115200 : baudrate);
>   	if (tty < 0) {
>   		perror(ttypath);

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list