[PATCH u-boot-marvell 02/14] tools: kwboot: Wait blk_rsp_timeo when flushing
Stefan Roese
sr at denx.de
Wed Jan 26 16:34:19 CET 2022
On 1/25/22 18:13, Marek Behún wrote:
> From: Pali Rohár <pali at kernel.org>
>
> Use the blk_rsp_timeo variable when sleeping before flushing tty.
>
> Signed-off-by: Pali Rohár <pali at kernel.org>
> Signed-off-by: Marek Behún <marek.behun at nic.cz>
Reviewed-by: Stefan Roese <sr at denx.de>
Thanks,
Stefan
> ---
> tools/kwboot.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/kwboot.c b/tools/kwboot.c
> index 82cfd9a827..1477c0f078 100644
> --- a/tools/kwboot.c
> +++ b/tools/kwboot.c
> @@ -1081,8 +1081,8 @@ kwboot_xmodem(int tty, const void *_img, size_t size, int baudrate)
> */
> hdrsz += (KWBOOT_XM_BLKSZ - hdrsz % KWBOOT_XM_BLKSZ) % KWBOOT_XM_BLKSZ;
>
> - kwboot_printv("Waiting 2s and flushing tty\n");
> - sleep(2); /* flush isn't effective without it */
> + kwboot_printv("Waiting %d ms and flushing tty\n", blk_rsp_timeo);
> + usleep(blk_rsp_timeo * 1000);
> tcflush(tty, TCIOFLUSH);
>
> pnum = 1;
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