Lines Matching refs:baudrate

205 /* ARM code to change baudrate */
262 /* ; Read old baudrate value */
270 /* ; Read new baudrate value */
324 /* ; Placeholder for old baudrate value */
328 /* ; Placeholder for new baudrate value */
335 /* ARM code from binary header executed by BootROM before changing baudrate */
582 kwboot_tty_baudrate_to_speed(int baudrate)
584 switch (baudrate) {
738 kwboot_tty_change_baudrate(int fd, int baudrate)
748 speed = kwboot_tty_baudrate_to_speed(baudrate);
756 tio.c_ospeed = tio.c_ispeed = baudrate;
780 * Check whether set baudrate is within 3% tolerance.
784 if (!_is_within_tolerance(tio.c_ospeed, baudrate, 3))
787 if (!_is_within_tolerance(tio.c_ispeed, baudrate, 3))
794 fprintf(stderr, "Could not set baudrate to requested value\n");
800 kwboot_open_tty(const char *path, int baudrate)
833 rc = kwboot_tty_change_baudrate(fd, baudrate);
1213 kwboot_baud_magic_handle(int fd, char c, int baudrate)
1230 kwboot_printv("\nChanging baudrate to %d Bd\n", baudrate);
1232 return kwboot_tty_change_baudrate(fd, baudrate) ? : 1;
1242 int baudrate, int *baud_changed)
1273 * - print the byte, if it is not part of baudrate change magic
1274 * sequence while baudrate change was requested (-B option)
1275 * - change baudrate
1281 if (baudrate && !*baud_changed) {
1282 rc = kwboot_baud_magic_handle(fd, *c, baudrate);
1289 } else if (!baudrate || !*baud_changed) {
1310 int *done_print, int baudrate, int allow_retries)
1335 baudrate, &baud_changed);
1350 if (allow_non_xm && baudrate && !baud_changed) {
1390 size_t size, int baudrate)
1435 &done_print, baudrate, header);
1456 kwboot_xmodem(int tty, const void *_img, size_t size, int baudrate)
1476 rc = kwboot_xmodem_one(tty, &pnum, 1, img, hdrsz, baudrate);
1496 if (baudrate) {
1497 kwboot_printv("\nChanging baudrate back to 115200 Bd\n\n");
2043 kwboot_img_patch(void *img, size_t *size, int baudrate)
2159 * baudrate (which should be 115200) and do not touch
2172 if (baudrate) {
2175 "Cannot inject code for changing baudrate into v0 image header\n");
2181 "Cannot inject code for changing baudrate into image with secure header\n");
2186 * First inject code that changes the baudrate from the default
2191 kwboot_printv("Injecting binary header code for changing baudrate to %d Bd\n",
2192 baudrate);
2193 _inject_baudrate_change_code(img, size, 0, 115200, baudrate);
2196 * Now inject code that changes the baudrate back to 115200 Bd.
2201 kwboot_printv("Injecting code for changing baudrate back\n");
2202 _inject_baudrate_change_code(img, size, 1, baudrate, 115200);
2289 int baudrate;
2302 baudrate = 115200;
2364 baudrate = atoi(optarg);
2391 /* boot and debug message use baudrate 115200 */
2392 if (((bootmsg && !imgpath) || debugmsg) && baudrate != 115200) {
2397 tty = kwboot_open_tty(ttypath, baudrate);
2404 * initial baudrate for image transfer is always 115200,
2405 * the change to different baudrate is done only after the header is sent
2407 if (imgpath && baudrate != 115200) {
2415 if (baudrate == 115200)
2416 /* do not change baudrate during Xmodem to the same value */
2417 baudrate = 0;
2419 /* ensure we have enough space for baudrate change code */
2437 rc = kwboot_img_patch(img, &size, baudrate);
2455 rc = kwboot_xmodem(tty, img, size, baudrate);