On Linux (and in most of posix-like systems) the baudrate set in struct
termios via cfset[io]speed is actually the index of the standard
baudrates, it's not the baudrate per se (hence the use of B* macros).
On Linux it's possible to set the baudrate by passing the baudrate
itself to TCSETS2 ioctl. Unfortunately it's not possible to include
asm/termbits.h and termios.h in the same compilation unit, so we need to
split it. Here we split into a Linux and a NuttX implementation.