aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2021-10-25 15:12:53 +0200
committerStefan Roese <sr@denx.de>2021-11-03 06:45:26 +0100
commit2ecca3d0d76023f219ac4350b0112cd19fbdda2e (patch)
tree86332ddce168972b911c27027c5270dc2eb591f8 /tools
parent0a14341cf8f60e6a9ba2edb0802507cbb073e806 (diff)
downloadu-boot-2ecca3d0d76023f219ac4350b0112cd19fbdda2e.zip
u-boot-2ecca3d0d76023f219ac4350b0112cd19fbdda2e.tar.gz
u-boot-2ecca3d0d76023f219ac4350b0112cd19fbdda2e.tar.bz2
tools: kwboot: Fix initialization of tty device
Explicitly disable 2 stop bits by clearing CSTOPB flag, disable modem control flow by clearing CRTSCTS flag and do not send hangup after closing device by clearing HUPCL flag. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'tools')
-rw-r--r--tools/kwboot.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/kwboot.c b/tools/kwboot.c
index 695d433..c55b410 100644
--- a/tools/kwboot.c
+++ b/tools/kwboot.c
@@ -657,6 +657,7 @@ kwboot_open_tty(const char *path, int baudrate)
cfmakeraw(&tio);
tio.c_cflag |= CREAD | CLOCAL;
+ tio.c_cflag &= ~(CSTOPB | HUPCL | CRTSCTS);
tio.c_cc[VMIN] = 1;
tio.c_cc[VTIME] = 0;