mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-13 21:36:57 +00:00
serial: mxc: have putc use the TXFIFO
only waiting for TXEMPTY leads to corrupted messages going over the wire - which is fixed by making use of the FIFO this change is following the linux kernel uart driver (drivers/tty/serial/imx.c), which also checks UTS_TXFULL instead of UTS_TXEMPTY Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
This commit is contained in:
parent
25b7ce3287
commit
c7878a0483
1 changed files with 1 additions and 1 deletions
|
@ -311,7 +311,7 @@ static int mxc_serial_putc(struct udevice *dev, const char ch)
|
|||
struct mxc_serial_plat *plat = dev_get_plat(dev);
|
||||
struct mxc_uart *const uart = plat->reg;
|
||||
|
||||
if (!(readl(&uart->ts) & UTS_TXEMPTY))
|
||||
if (readl(&uart->ts) & UTS_TXFULL)
|
||||
return -EAGAIN;
|
||||
|
||||
writel(ch, &uart->txd);
|
||||
|
|
Loading…
Add table
Reference in a new issue