u-boot/tools
Pali Rohár 93b55636b0 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>
2021-10-01 11:07:13 +02:00
..
binman tools: Refactor full help printing 2021-09-24 14:30:46 -04:00
buildman tools: Refactor full help printing 2021-09-24 14:30:46 -04:00
concurrencytest concurrencytest: Fix Python3 warning 2021-01-05 12:26:35 -07:00
docker tools: docker: Build and install genimage 2021-09-11 10:40:31 -04:00
dtoc irq: Tidy up of-platdata irq support 2021-09-25 09:46:15 -06:00
env tools: env: Handle shorter read calls 2021-09-02 11:19:58 -04:00
gdb SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
kermit SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
libfdt libfdt: migrate fdt_ro.c to a wrapper of scripts/dtc/libfdt/fdt_ro.c 2020-04-26 14:23:39 -06:00
logos imx6: icorem6: chmod 644 enigcam.bmp 2021-04-08 23:59:50 +02:00
omap SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
patman WS cleanup: remove trailing white space 2021-09-30 08:08:56 -04:00
scripts tools: fix define2mk.sed to not add quotes around negative integers 2016-06-13 07:46:29 +09:00
.gitignore tools: add mkeficapsule to .gitignore 2021-01-29 20:22:40 +01:00
aisimage.c tool: aisimage: use ALIGN instead of self defiend macro 2020-04-24 10:10:00 -04:00
aisimage.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
asn1_compiler.c WS cleanup: remove trailing white space 2021-09-30 08:08:56 -04:00
atmel_pmecc_params.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
atmelimage.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bmp_logo.c bmp_logo: support CONFIG_DM_VIDEO 2019-07-29 00:20:31 +02:00
default_image.c crc32: Use the crc.h header for crc functions 2019-12-02 18:23:08 -05:00
dumpimage.c tools: dumpimage: Fall-though to print usage for help command 2020-01-07 11:12:47 -05:00
dumpimage.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
efivar.py tools: efivar.py unused variable 2021-01-13 02:38:00 +01:00
endian-swap.py tools: add script for byte endianness swapping 2020-06-29 22:36:35 +02:00
envcrc.c crc32: Use the crc.h header for crc functions 2019-12-02 18:23:08 -05:00
fdt_host.h fit_check_sign: Allow selecting the configuration to verify 2020-04-01 07:45:09 -06:00
fdtgrep.c tools: fdtgrep: Use unsigned chars for arrays 2021-03-22 19:23:26 +13:00
file2include.c tools/file2include: don't use malloc.h for malloc 2018-11-26 22:52:12 -05:00
fit_check_sign.c tools/fit_check_sign.c: Update usage function. 2021-02-01 16:32:06 -05:00
fit_common.c image: Adjust the workings of fit_check_format() 2021-02-15 22:31:52 -05:00
fit_common.h tools: use read-only mmap in fit_check_sign 2019-05-18 12:32:02 -04:00
fit_image.c tools/fitimage: add missing linebreak for some messages 2021-07-14 16:57:35 -04:00
fit_info.c tools: use read-only mmap in fit_check_sign 2019-05-18 12:32:02 -04:00
gen_eth_addr.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
gen_ethaddr_crc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
genboardscfg.py patman: Tidy up sys.path changes 2020-04-26 14:25:21 -06:00
getline.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
getline.h
gpheader.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
gpimage-common.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
gpimage.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ifdtool.c SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
ifdtool.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ifwitool.c tool: Move ALIGN_MASK to header as common MACRO 2020-04-24 10:10:00 -04:00
image-host.c tools: Avoid showing return value of clock_gettime() 2021-07-15 18:42:05 -04:00
image-sig-host.c common: Move host-only logic in image-sig.c to separate file 2021-07-16 12:58:55 -04:00
imagetool.c fdt: Fix FIT header verification in mkimage and conduct same checks as bootm 2019-03-08 11:31:44 -05:00
imagetool.h mkimage: Add a 'keyfile' argument for image signing 2021-04-14 15:23:01 -04:00
img2srec.c treewide: remove unneeded semicolons 2017-06-16 10:11:38 -04:00
imx8image.c tools: imx image: fix write warning 2021-04-08 09:18:29 +02:00
imx8m_image.sh tools: imx8m_image: fix warning message 2020-02-09 14:57:38 +01:00
imx8mimage.c tools: imx image: fix write warning 2021-04-08 09:18:29 +02:00
imx_cntr_image.sh tools: improve portability of imx_cntr_image.sh 2019-01-01 14:12:18 +01:00
imximage.c tools/imximage: fix DCD Blocks message output order 2020-08-18 10:10:25 +02:00
jtagconsole
k3_fit_atf.sh tools: k3_fit_atf: Fix DM binary FIT load addresses 2021-09-10 20:10:20 -04:00
k3_gen_x509_cert.sh tools: k3_gen_x509_cert: Set default early HS JTAG access to disabled 2020-06-13 23:12:17 +05:30
Kconfig tools: Use a single target-independent config to enable OpenSSL 2021-07-16 15:39:29 -04:00
kwbimage.c tools: kwbimage: Update comments describing kwbimage v1 structures 2021-10-01 11:07:13 +02:00
kwbimage.h tools: kwbimage: Update comments describing kwbimage v1 structures 2021-10-01 11:07:13 +02:00
kwboot.c tools: kwboot: Allow any baudrate on Linux 2021-10-01 11:07:13 +02:00
lpc32xximage.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Makefile tools: kwbimage: Remove v1 kwbimage SPL padding to CONFIG_SYS_U_BOOT_OFFS bytes 2021-07-31 09:59:58 +02:00
microcode-tool x86: Add a script to process Intel microcode files 2014-12-18 17:26:08 -07:00
microcode-tool.py microcode_tool: Convert to Python 3 2019-11-04 18:15:32 -07:00
mips-relocs.c MIPS: make size of relocation table fixed but configurable 2018-11-02 22:39:07 +01:00
mkeficapsule.c Revert "mkeficapsule: Remove dtb related options" 2021-09-18 03:46:56 -06:00
mkenvimage.c crc32: Use the crc.h header for crc functions 2019-12-02 18:23:08 -05:00
mkexynosspl.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mkimage.c mkimage: clarify error message for empty input files 2021-09-01 19:25:37 -04:00
mkimage.h image: Adjust the workings of fit_check_format() 2021-02-15 22:31:52 -05:00
mksunxiboot.c tool: Move ALIGN_MASK to header as common MACRO 2020-04-24 10:10:00 -04:00
moveconfig.py moveconfig: Update to newer kconfiglib 2021-08-01 09:05:24 -06:00
mrvl_uart.sh SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mtk_image.c tools: mtk_image: add an option to set device header offset 2021-03-20 16:24:27 -04:00
mtk_image.h tools: mtk_image: add support for booting ARM64 images 2021-01-18 14:59:29 -05:00
mxsboot.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mxsimage.c crc32: Use the crc.h header for crc functions 2019-12-02 18:23:08 -05:00
mxsimage.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ncb.c
netconsole
omapimage.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
omapimage.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
os_support.c tools: Remove the out-of-date MinGW support codes 2020-04-24 10:51:56 -04:00
os_support.h tools: Remove the out-of-date MinGW support codes 2020-04-24 10:51:56 -04:00
pbl_crc32.c crc32: Use the crc.h header for crc functions 2019-12-02 18:23:08 -05:00
pbl_crc32.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pblimage.c crc32: Use the crc.h header for crc functions 2019-12-02 18:23:08 -05:00
pblimage.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
prelink-riscv.c riscv: tools: Add big endian target support to prelink-riscv 2019-08-15 13:42:28 +08:00
prelink-riscv.inc riscv: tools: Handle addend to absolute reloc in prelink-riscv 2019-09-03 09:30:32 +08:00
proftool.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
relocate-rela.c SPDX: Convert all of our multiple license tags to Linux Kernel style 2018-05-07 10:24:31 -04:00
rkcommon.c rockchip: mkimage: Remove host endianness dependency 2020-10-30 23:09:56 +08:00
rkcommon.h rockchip: mkimage: support packing optional second level boot-loader 2019-12-27 15:17:07 +08:00
rkimage.c rockchip: mkimage: fix wrong range of rc4 encoding for boot image 2019-12-27 15:17:07 +08:00
rkmux.py rkmux: Convert to Python 3 2019-11-04 18:15:32 -07:00
rksd.c rockchip: mkimage: support packing optional second level boot-loader 2019-12-27 15:17:07 +08:00
rkspi.c rockchip: mkimage: support packing optional second level boot-loader 2019-12-27 15:17:07 +08:00
rmboard.py tools: Drop unnecessary use of __file__ 2020-09-22 12:50:43 -06:00
socfpgaimage.c tools: socfpgaimage: update padding flow 2021-01-15 17:48:39 +08:00
spl_size_limit.c imx: replace CONFIG_SECURE_BOOT with CONFIG_IMX_HAB 2019-10-08 16:36:37 +02:00
stm32image.c tools: mkimage: fix STM32 image format for big endian hosts 2020-02-13 17:32:09 +01:00
sunxi-spl-image-builder.c tools: sunxi: avoid read after end of string 2017-05-05 16:45:57 -04:00
sunxi_egon.c tools: mkimage: Add Allwinner eGON support 2021-01-11 23:19:33 +00:00
termios_linux.h tools: kwboot: Allow any baudrate on Linux 2021-10-01 11:07:13 +02:00
ublimage.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ublimage.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ubsha1.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
update_octeon_header.c mips: octeon: tools: Add update_octeon_header tool 2020-11-30 18:32:09 +01:00
vybridimage.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
xway-swap-bytes.c
zynqimage.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
zynqmp_pm_cfg_obj_convert.py tools: zynqmp: Fix regex expression around XPm_ConfigObject 2021-01-04 10:51:26 +01:00
zynqmp_psu_init_minimize.sh arm64: zynqmp: Do not remove dpll_prog from psu_init 2019-10-24 13:37:02 +02:00
zynqmpbif.c tools: zynqmpbif: Use compiler builtin instead of linux-specific __swab32 2019-10-28 13:32:51 -04:00
zynqmpimage.c tools: zynqmpimage: Add bif support 2018-05-11 09:23:44 +02:00
zynqmpimage.h SPDX: Correct SPDX tags from recent xilinx merge 2018-05-11 14:54:57 -04:00