summaryrefslogtreecommitdiff
path: root/tools/kwboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/kwboot.c')
-rw-r--r--tools/kwboot.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/tools/kwboot.c b/tools/kwboot.c
index ba2fd10ff6..7ccab2993f 100644
--- a/tools/kwboot.c
+++ b/tools/kwboot.c
@@ -23,10 +23,15 @@
#include <errno.h>
#include <unistd.h>
#include <stdint.h>
-#include <termios.h>
#include <time.h>
#include <sys/stat.h>
+#ifdef __linux__
+#include "termios_linux.h"
+#else
+#include <termios.h>
+#endif
+
/*
* Marvell BootROM UART Sensing
*/
@@ -554,7 +559,11 @@ kwboot_tty_baudrate_to_speed(int baudrate)
return B50;
#endif
default:
+#ifdef BOTHER
+ return BOTHER;
+#else
return B0;
+#endif
}
}
@@ -575,6 +584,11 @@ kwboot_tty_change_baudrate(int fd, int baudrate)
return -1;
}
+#ifdef BOTHER
+ if (speed == BOTHER)
+ tio.c_ospeed = tio.c_ispeed = baudrate;
+#endif
+
rc = cfsetospeed(&tio, speed);
if (rc)
return rc;