aboutsummaryrefslogtreecommitdiff
path: root/tools/kwbimage.c
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2021-09-24 23:07:06 +0200
committerStefan Roese <sr@denx.de>2021-10-01 11:07:13 +0200
commit93b55636b09faaa0ab809d4110a07dfd982a48b6 (patch)
tree2b0745a3dabb843c0d2b225f0a492f541850e5c8 /tools/kwbimage.c
parentca272041c00f7f260259d3318c7832c80a874b8e (diff)
downloadu-boot-93b55636b09faaa0ab809d4110a07dfd982a48b6.zip
u-boot-93b55636b09faaa0ab809d4110a07dfd982a48b6.tar.gz
u-boot-93b55636b09faaa0ab809d4110a07dfd982a48b6.tar.bz2
tools: kwboot: Allow any baudrate on Linux
The A38x platform supports more baudrates than just those defined by the Bn constants, and some of them are higher than the highest Bn baudrate (the highest is 4 MBd while A38x support 5.15 MBd). On Linux, add support for arbitrary baudrates. (Since there is no standard POSIX API to specify arbitrary baudrate for a tty device, this change is Linux-specific.) We need to use raw TCGETS2/TCSETS2 or TCGETS/TCSETS ioctls with the BOTHER flag in struct termios2/termios, defined in Linux headers <asm/ioctls.h> (included by <sys/ioctl.h>) and <asm/termbits.h>. Since these headers conflict with glibc's header file <termios.h>, it is not possible to use libc's termios functions and we need to reimplement them via ioctl() calls. Note that the Bnnn constants from <termios.h> need not be compatible with Bnnn constants from <asm/termbits.h>. Signed-off-by: Pali Rohár <pali@kernel.org> [ termios macros rewritten to static inline functions (for type control) and moved to tools/termios_linux.h ] Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'tools/kwbimage.c')
0 files changed, 0 insertions, 0 deletions