diff options
author | Pali Rohár <pali@kernel.org> | 2022-01-25 20:13:01 +0300 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2022-01-31 12:23:38 +0300 |
commit | 8bd15fd1146e13bba4b6d0166e5db4ce10ecf59d (patch) | |
tree | 013852965077405926f30152305a42668d352d9a /tools | |
parent | ef95143df4caaf8c144f33ad685d1c51f530f06b (diff) | |
download | u-boot-8bd15fd1146e13bba4b6d0166e5db4ce10ecf59d.tar.xz |
tools: kwboot: Wait blk_rsp_timeo when flushing
Use the blk_rsp_timeo variable when sleeping before flushing tty.
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/kwboot.c | 4 |
1 files 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; |