Commit c5917b4b authored by Alison Wang's avatar Alison Wang Committed by Simon Glass

dm: serial-uclass: Move a carriage return before a line feed

In general, a carriage return needs to execute before a line feed. The
patch is to change serial DM driver serial-uclass.c based on this rule.
Signed-off-by: default avatarAlison Wang <>
Reviewed-by: default avatarBin Meng <>
parent eea1d148
......@@ -123,11 +123,12 @@ static void _serial_putc(struct udevice *dev, char ch)
struct dm_serial_ops *ops = serial_get_ops(dev);
int err;
if (ch == '\n')
_serial_putc(dev, '\r');
do {
err = ops->putc(dev, ch);
} while (err == -EAGAIN);
if (ch == '\n')
_serial_putc(dev, '\r');
static void _serial_puts(struct udevice *dev, const char *str)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment