path: root/common/serdev.c
Commit message (Collapse)AuthorAgeFilesLines
* serdev: Allow polling interval to be adjusted at runtimeAndrey Smirnov2018-04-171-1/+25
| | | | | | | | | | | | | | | | | | | | Due to blocking, synchronous, polling driven nature of Barebox's serial communication handling trying to use two or more serial ports at high (1Mbaud+) baudrates results in data loss and noticeable perofmance degradation. This happens as soon as individual message being sent around start exceeding HW Rx FIFO in size. A good example of such a usecase would be using a system that has a serdev driver (operating @ 1Mbaud+) and trying to do a X/YMODEM transfer via serial console at comparable baudrates. To at least partially ameliorate the problem, add code that will expose "polling_interval" as a parameter, so that the user would have an option of temporarily disabling (or significatly decreasing the rate) of a given serdev's polling. Signed-off-by: Andrey Smirnov <> Signed-off-by: Sascha Hauer <>
* serdev: Add trivial blocking read functionAndrey Smirnov2018-04-171-0/+95
| | | | | | | | | | | Add example implementation of a trivial blocking read function as a part of Barebox's serdev API. NOTE: This code has not been tested against real devices, so use it at your own risk. Signed-off-by: Andrey Smirnov <> Signed-off-by: Sascha Hauer <>
* console: Add simplified 'serdev' framework from Linux kernelAndrey Smirnov2018-04-171-0/+89
Port 'serdev' UART-slave deivce framework found in recent Linux kernels (post 4.13) in order to be able to port 'serdev' slave drivers from Linux. Signed-off-by: Andrey Smirnov <> Signed-off-by: Sascha Hauer <>