mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-29 06:31:28 +01:00
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>
This commit is contained in:
parent
ef95143df4
commit
8bd15fd114
@ -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;
|
hdrsz += (KWBOOT_XM_BLKSZ - hdrsz % KWBOOT_XM_BLKSZ) % KWBOOT_XM_BLKSZ;
|
||||||
|
|
||||||
kwboot_printv("Waiting 2s and flushing tty\n");
|
kwboot_printv("Waiting %d ms and flushing tty\n", blk_rsp_timeo);
|
||||||
sleep(2); /* flush isn't effective without it */
|
usleep(blk_rsp_timeo * 1000);
|
||||||
tcflush(tty, TCIOFLUSH);
|
tcflush(tty, TCIOFLUSH);
|
||||||
|
|
||||||
pnum = 1;
|
pnum = 1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user