Lines Matching +full:long +full:- +full:press +full:- +full:ms

2  * (C) Copyright 2000-2004
5 * SPDX-License-Identifier: GPL-2.0+
9 * Serial up- and download support
28 static ulong load_serial(long offset);
38 /* -------------------------------------------------------------------- */
44 long offset = 0; in do_load_serial()
52 load_baudrate = current_baudrate = gd->baudrate; in do_load_serial()
73 printf("## Switch baudrate to %d bps and press ENTER ...\n", in do_load_serial()
76 gd->baudrate = load_baudrate; in do_load_serial()
90 printf("## Ready for S-Record download ...\n"); in do_load_serial()
97 * box some time (100 * 1 ms) in do_load_serial()
107 printf("## S-Record download aborted\n"); in do_load_serial()
116 printf("## Switch baudrate to %d bps and press ESC ...\n", in do_load_serial()
119 gd->baudrate = current_baudrate; in do_load_serial()
131 static ulong load_serial(long offset) in load_serial()
133 char record[SREC_MAXRECLEN + 1]; /* buffer for one S-Record */ in load_serial()
135 int binlen; /* no. of data bytes in S-Rec. */ in load_serial()
137 ulong addr; /* load address from S-Record */ in load_serial()
148 return (~0); /* Invalid S-Record */ in load_serial()
172 if ((store_addr + binlen - 1) > end_addr) in load_serial()
173 end_addr = store_addr + binlen - 1; in load_serial()
179 size = end_addr - start_addr + 1; in load_serial()
208 --len; /* always leave room for terminating '\0' byte */ in read_record()
219 return (p - buf); in read_record()
221 case 0x03: /* ^C - Control C */ in read_record()
222 return (-1); in read_record()
228 if (gd->jt->getc != getc) { in read_record()
230 return (-1); in read_record()
235 /* line too long - truncate */ in read_record()
237 return (p - buf); in read_record()
249 save_baudrate = current_baudrate = gd->baudrate; in do_save_serial()
267 printf("## Switch baudrate to %d bps and press ENTER ...\n", in do_save_serial()
270 gd->baudrate = save_baudrate; in do_save_serial()
284 printf("## Ready for S-Record upload, press ENTER to proceed ...\n"); in do_save_serial()
290 printf("## S-Record upload aborted\n"); in do_save_serial()
292 printf("## S-Record upload complete\n"); in do_save_serial()
296 printf("## Switch baudrate to %d bps and press ESC ...\n", in do_save_serial()
299 gd->baudrate = current_baudrate; in do_save_serial()
320 char record[2*SREC_BYTES_PER_RECORD+16]; /* buffer for one S-Record */ in save_serial()
327 return (-1); in save_serial()
336 --count; in save_serial()
358 return (-1); in save_serial()
367 return (-1); in save_serial()
381 return (-1); in write_record()
407 #define untochar(x) ((int) (((x) - SPACE) & 0xff))
409 static void set_kerm_bin_mode(unsigned long *);
428 /* pre-set offset from CONFIG_SYS_LOAD_ADDR */ in do_load_serial_bin()
431 /* pre-set offset from $loadaddr */ in do_load_serial_bin()
436 load_baudrate = current_baudrate = gd->baudrate; in do_load_serial_bin()
450 printf("## Switch baudrate to %d bps and press ENTER ...\n", in do_load_serial_bin()
453 gd->baudrate = load_baudrate; in do_load_serial_bin()
502 printf("## Switch baudrate to %d bps and press ESC ...\n", in do_load_serial_bin()
505 gd->baudrate = current_baudrate; in do_load_serial_bin()
528 * box some time (100 * 1 ms) in load_serial_bin()
549 while (count-- > 0) in send_pad()
643 static void set_kerm_bin_mode(unsigned long *addr) in set_kerm_bin_mode()
674 /* last char was escape - translate this character */ in k_data_char()
679 /* this char is escape - remember */ in k_data_char()
682 /* otherwise send this char as-is */ in k_data_char()
706 if (send_ptr == &send_parms[SEND_DATA_SIZE - 1]) in handle_send_packet()
707 --send_ptr; in handle_send_packet()
708 bytes = send_ptr - send_parms; /* how many bytes we'll process */ in handle_send_packet()
710 if (bytes-- <= 0) in handle_send_packet()
712 /* handle MAXL - max length */ in handle_send_packet()
713 /* ignore what he says - most I'll take (here) is 94 */ in handle_send_packet()
715 if (bytes-- <= 0) in handle_send_packet()
717 /* handle TIME - time you should wait for my packets */ in handle_send_packet()
718 /* ignore what he says - don't wait for my ack longer than 1 second */ in handle_send_packet()
720 if (bytes-- <= 0) in handle_send_packet()
722 /* handle NPAD - number of pad chars I need */ in handle_send_packet()
723 /* remember what he says - I need none */ in handle_send_packet()
726 if (bytes-- <= 0) in handle_send_packet()
728 /* handle PADC - pad chars I need */ in handle_send_packet()
729 /* remember what he says - I need none */ in handle_send_packet()
732 if (bytes-- <= 0) in handle_send_packet()
734 /* handle EOL - end of line he needs */ in handle_send_packet()
735 /* remember what he says - I need CR */ in handle_send_packet()
738 if (bytes-- <= 0) in handle_send_packet()
740 /* handle QCTL - quote control char he'll use */ in handle_send_packet()
741 /* remember what he says - I'll use '#' */ in handle_send_packet()
744 if (bytes-- <= 0) in handle_send_packet()
746 /* handle QBIN - 8-th bit prefixing */ in handle_send_packet()
747 /* ignore what he says - I refuse */ in handle_send_packet()
749 if (bytes-- <= 0) in handle_send_packet()
751 /* handle CHKT - the clock check type */ in handle_send_packet()
752 /* ignore what he says - I do type 1 (for now) */ in handle_send_packet()
754 if (bytes-- <= 0) in handle_send_packet()
756 /* handle REPT - the repeat prefix */ in handle_send_packet()
757 /* ignore what he says - I refuse (for now) */ in handle_send_packet()
759 if (bytes-- <= 0) in handle_send_packet()
761 /* handle CAPAS - the capabilities mask */ in handle_send_packet()
762 /* ignore what he says - I only do long packets - I don't do windows */ in handle_send_packet()
763 a_b[++length] = tochar(2); /* only long packets */ in handle_send_packet()
804 last_n = -1; in k_recv()
822 If a character less than SPACE (0x20) is received - error. in k_recv()
858 --length; in k_recv()
860 /* NEW CODE - check sequence numbers for retried packets */ in k_recv()
861 /* Note - this new code assumes that the sequence number is correctly in k_recv()
863 * of complexity that may not be needed - yet! At this time, I'm hoping in k_recv()
885 --length; in k_recv()
887 if (length == -2) { in k_recv()
908 /* --length; */ /* new length includes only data and block check to come */ in k_recv()
916 --length; in k_recv()
925 --send_ptr; in k_recv()
954 return ((ulong) os_data_addr - (ulong) bin_start_address); in k_recv()
960 return -1; in getcxmodem()
1059 return -ENODEV; in do_loadz_flash()
1065 return -EINVAL; in do_loadz_flash()
1082 blknum = DIV_ROUND_UP(size, dev_desc->blksz); in do_loadz_flash()
1098 if (dev_desc->if_type == IF_TYPE_MTD) in do_loadz_flash()
1099 dev_desc->op_flag |= BLK_MTD_CONT_WRITE; in do_loadz_flash()
1101 if (dev_desc->if_type == IF_TYPE_MTD) in do_loadz_flash()
1102 dev_desc->op_flag &= ~(BLK_MTD_CONT_WRITE); in do_loadz_flash()
1113 /* -------------------------------------------------------------------- */
1120 "load S-Record file over serial line",
1122 " - load S-Record file over serial line"
1129 "load S-Record file over serial line",
1131 " - load S-Record file over serial line with offset 'off'"
1144 "save S-Record file over serial line",
1146 " - save S-Record file over serial line"
1152 "save S-Record file over serial line",
1154 " - save S-Record file over serial line with offset 'off' and size 'size'"
1166 " - load binary file over serial line"
1174 " - load binary file over serial line"
1182 " - load binary file over serial line"
1190 " - load binary file over serial line"
1198 " - load binary file over serial line"