diff options
author | Kevin Smith <kevin.smith@elecsyscorp.com> | 2016-02-16 21:28:19 +0000 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2016-03-24 10:08:49 +0100 |
commit | 7497a6a1f13eb86d68a936edecfd682bbad5752d (patch) | |
tree | 7fe373b703de00825eb435d57d1dc46d7029b5ed /tools | |
parent | 8669dacfb889fa6ffb62b5b3b6a803c65f54bf7f (diff) | |
download | u-boot-imx-7497a6a1f13eb86d68a936edecfd682bbad5752d.zip u-boot-imx-7497a6a1f13eb86d68a936edecfd682bbad5752d.tar.gz u-boot-imx-7497a6a1f13eb86d68a936edecfd682bbad5752d.tar.bz2 |
tools: kwboot: Add xmodem timeout option
Add command-line specification of xmodem timeout. If the binary
header needs to take a while to do something (e.g. DDR ECC
scrubbing), the xmodem transfer can time out. Add a configurable
xmodem block timeout to allow transfers with slow binary headers
to succeed.
Signed-off-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/kwboot.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/kwboot.c b/tools/kwboot.c index dee86cf..e00958a 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -76,6 +76,7 @@ static int kwboot_verbose; static int msg_req_delay = KWBOOT_MSG_REQ_DELAY; static int msg_rsp_timeo = KWBOOT_MSG_RSP_TIMEO; +static int blk_rsp_timeo = KWBOOT_BLK_RSP_TIMEO; static void kwboot_printv(const char *fmt, ...) @@ -380,7 +381,7 @@ kwboot_xm_sendblock(int fd, struct kwboot_block *block) break; do { - rc = kwboot_tty_recv(fd, &c, 1, KWBOOT_BLK_RSP_TIMEO); + rc = kwboot_tty_recv(fd, &c, 1, blk_rsp_timeo); if (rc) break; @@ -696,6 +697,8 @@ kwboot_usage(FILE *stream, char *progname) fprintf(stream, " -a: use timings for Armada XP\n"); fprintf(stream, " -q <req-delay>: use specific request-delay\n"); fprintf(stream, " -s <resp-timeo>: use specific response-timeout\n"); + fprintf(stream, + " -o <block-timeo>: use specific xmodem block timeout\n"); fprintf(stream, "\n"); fprintf(stream, " -t: mini terminal\n"); fprintf(stream, "\n"); @@ -728,7 +731,7 @@ main(int argc, char **argv) kwboot_verbose = isatty(STDOUT_FILENO); do { - int c = getopt(argc, argv, "hb:ptaB:dD:q:s:"); + int c = getopt(argc, argv, "hb:ptaB:dD:q:s:o:"); if (c < 0) break; @@ -768,6 +771,10 @@ main(int argc, char **argv) msg_rsp_timeo = atoi(optarg); break; + case 'o': + blk_rsp_timeo = atoi(optarg); + break; + case 'B': speed = kwboot_tty_speed(atoi(optarg)); if (speed == -1) |