9
0
Fork 0

loadb: Use console_set_baudrate

No Need to do this manually

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2015-06-08 20:22:34 +02:00
parent 7cf221db7c
commit e8b94fdfb6
1 changed files with 6 additions and 22 deletions

View File

@ -660,17 +660,9 @@ static int do_load_serial_bin(int argc, char *argv[])
}
}
if (load_baudrate != current_baudrate) {
printf("## Switch baudrate to %d bps and press ENTER ...\n",
load_baudrate);
udelay(50000);
cdev->setbrg(cdev, load_baudrate);
udelay(50000);
for (;;) {
if (getc() == '\r')
break;
}
}
ret = console_set_baudrate(cdev, load_baudrate);
if (ret)
return ret;
printf("## Ready for binary (kermit) download "
"to 0x%08lX offset on %s device at %d bps...\n", offset,
@ -681,17 +673,9 @@ static int do_load_serial_bin(int argc, char *argv[])
rcode = 1;
}
if (load_baudrate != current_baudrate) {
printf("## Switch baudrate to %d bps and press ESC ...\n",
current_baudrate);
udelay(50000);
cdev->setbrg(cdev, current_baudrate);
udelay(50000);
for (;;) {
if (getc() == 0x1B) /* ESC */
break;
}
}
ret = console_set_baudrate(cdev, current_baudrate);
if (ret)
return ret;
close(ofd);
ofd = 0;