summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-09-19 20:35:05 -0400
committerTom Rini <trini@konsulko.com>2018-09-19 20:35:05 -0400
commit333279af23ac08ebc8d8056c677c98964dd013b6 (patch)
tree0bf60843317e6cf18fb99371cd9f6416c8b1e8fe /tools
parent4e710ebb4463c8e031eb269c012fbadb2479608b (diff)
parente32ac37119394f2d3c579b2cdd549bed59fb583f (diff)
Merge git://git.denx.de/u-boot-marvell
- Multiples updates to the turris boards / platform - Changes / enhancements to the Marvell PHY drivers, mainly to support the turris platform - Many fixes and enhancements to the pxa3xx NAND driver - Fixes for the UART boot mode in kwboot - Misc minor changes to other 32bit and 64bit boards
Diffstat (limited to 'tools')
-rw-r--r--tools/kwboot.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/kwboot.c b/tools/kwboot.c
index 50ae2b4b77..4be094c9c8 100644
--- a/tools/kwboot.c
+++ b/tools/kwboot.c
@@ -286,6 +286,7 @@ kwboot_bootmsg(int tty, void *msg)
{
int rc;
char c;
+ int count;
if (msg == NULL)
kwboot_printv("Please reboot the target into UART boot mode...");
@@ -297,10 +298,12 @@ kwboot_bootmsg(int tty, void *msg)
if (rc)
break;
- rc = kwboot_tty_send(tty, msg, 8);
- if (rc) {
- usleep(msg_req_delay * 1000);
- continue;
+ for (count = 0; count < 128; count++) {
+ rc = kwboot_tty_send(tty, msg, 8);
+ if (rc) {
+ usleep(msg_req_delay * 1000);
+ continue;
+ }
}
rc = kwboot_tty_recv(tty, &c, 1, msg_rsp_timeo);
@@ -426,6 +429,9 @@ kwboot_xmodem(int tty, const void *_data, size_t size)
kwboot_printv("Sending boot image...\n");
+ sleep(2); /* flush isn't effective without it */
+ tcflush(tty, TCIOFLUSH);
+
do {
struct kwboot_block block;
int n;