console: Introduce console_drain()
Generalize high baud rate UART polling code found in lib/xmodem.c and
expose it as a generic function in console API.

The usecase for this -- besides X/Y-mode data transfers where the code
originated -- is command/reply type of serial exchages at high baud
rates (~1Mbaud) with payloads exceeding inernal UART FIFOs in
size. Such interactions are not uncommon in serdev device and this
patch is done in preparation for serdev support code that will follow.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 6377d27 commit 84fc6119d3aaa33344d154428ce37800a96a39b9
@Andrey Smirnov Andrey Smirnov authored on 12 Apr 2018
Sascha Hauer committed on 17 Apr 2018
Showing 2 changed files
View
include/console.h
View
lib/xymodem.c