]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tools: kwboot: Fix initialization of tty device
authorPali Rohár <pali@kernel.org>
Mon, 25 Oct 2021 13:12:53 +0000 (15:12 +0200)
committerStefan Roese <sr@denx.de>
Wed, 3 Nov 2021 05:45:26 +0000 (06:45 +0100)
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>
tools/kwboot.c

index 695d433b96ee3b178f7d535d3ae800d642773e22..c55b41025b0ffef83ac3bcc6cd4bca369757e4ea 100644 (file)
@@ -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;