summaryrefslogtreecommitdiff
path: root/common/cmd_boot.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-03-31 16:34:49 +0000
committerwdenk <wdenk>2003-03-31 16:34:49 +0000
commit85ec0bcc1bc40a67368461fee0435d79305168b1 (patch)
tree084062015af4a61080c48c1796dcffbc90ab02f1 /common/cmd_boot.c
parent506f044131515a80c7c8479a84df028be880b34e (diff)
downloadu-boot-imx-85ec0bcc1bc40a67368461fee0435d79305168b1.zip
u-boot-imx-85ec0bcc1bc40a67368461fee0435d79305168b1.tar.gz
u-boot-imx-85ec0bcc1bc40a67368461fee0435d79305168b1.tar.bz2
* Patch by Arun Dharankar, 24 Mar 2003:
- add threads / scheduler example code * Add patches by Robert Schwebel, 31 Mar 2003: - add ctrl-c support for kermit download - align bdinfo output on ARM * Add CPU ID, version, and clock speed for INCA-IP
Diffstat (limited to 'common/cmd_boot.c')
-rw-r--r--common/cmd_boot.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/common/cmd_boot.c b/common/cmd_boot.c
index 1c9a41d..59bab35 100644
--- a/common/cmd_boot.c
+++ b/common/cmd_boot.c
@@ -163,10 +163,10 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
printf ("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]);
}
printf ("\n"
- "ip_addr = ");
+ "ip_addr = ");
print_IPaddr (bd->bi_ip_addr);
printf ("\n"
- "baudrate = %d bps\n", bd->bi_baudrate);
+ "baudrate = %d bps\n", bd->bi_baudrate);
return 0;
}
@@ -575,6 +575,7 @@ write_record (char *buf)
#define XON_CHAR 17
#define XOFF_CHAR 19
#define START_CHAR 0x01
+#define ETX_CHAR 0x03
#define END_CHAR 0x0D
#define SPACE 0x20
#define K_ESCAPE 0x23
@@ -995,8 +996,18 @@ static int k_recv (void)
#endif
/* get a packet */
- /* wait for the starting character */
- while (serial_getc () != START_CHAR);
+ /* wait for the starting character or ^C */
+ for (;;) {
+ switch (serial_getc ()) {
+ case START_CHAR: /* start packet */
+ break;
+ case ETX_CHAR: /* ^C waiting for packet */
+ return (0);
+ default:
+ ;
+ }
+ }
+
/* get length of packet */
sum = 0;
new_char = serial_getc ();