From 52f52c1494eedaeacccad6e2331f4f638b48f5ab Mon Sep 17 00:00:00 2001 From: wdenk Date: Thu, 19 Jun 2003 23:04:19 +0000 Subject: 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. --- common/cmd_boot.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'common/cmd_boot.c') 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); -- cgit v1.2.3