summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-06-19 23:04:19 +0000
committerwdenk <wdenk>2003-06-19 23:04:19 +0000
commit52f52c1494eedaeacccad6e2331f4f638b48f5ab (patch)
treeef44c22a2c583fe9b136ae6f38bbb42ef6a71df0 /common
parent48b42616e928ce6eacfe20276a1614e2b27ac4b5 (diff)
Patches by Robert Schwebel, 14 Jun 2003:
- add support for Logotronic DL datalogger board - cleanup serial line after kermit binary download - add debugX macro (debug level support) - update mach-types.h to latest arm.linux.org.uk master list.
Diffstat (limited to 'common')
-rw-r--r--common/cmd_boot.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/common/cmd_boot.c b/common/cmd_boot.c
index 4e5ffb0a33c..fef84597dd2 100644
--- a/common/cmd_boot.c
+++ b/common/cmd_boot.c
@@ -406,12 +406,13 @@ read_record (char *buf, ulong len)
}
/* Check for the console hangup (if any different from serial) */
-
+#ifdef CONFIG_PPC /* we don't have syscall_tbl anywhere else */
if (syscall_tbl[SYSCALL_GETC] != serial_getc) {
if (ctrlc()) {
return (-1);
}
}
+#endif
}
/* line too long - truncate */
@@ -691,11 +692,24 @@ int do_load_serial_bin (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
static ulong load_serial_bin (ulong offset)
{
- int size;
+ int size, i;
char buf[32];
set_kerm_bin_mode ((ulong *) offset);
size = k_recv ();
+
+ /*
+ * Gather any trailing characters (for instance, the ^D which
+ * is sent by 'cu' after sending a file), and give the
+ * box some time (100 * 1 ms)
+ */
+ for (i=0; i<100; ++i) {
+ if (serial_tstc()) {
+ (void) serial_getc();
+ }
+ udelay(1000);
+ }
+
flush_cache (offset, size);
printf("## Total Size = 0x%08x = %d Bytes\n", size, size);