summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-09-03 09:00:35 -0400
committerTom Rini <trini@konsulko.com>2020-09-03 09:00:35 -0400
commit7f4d3c044504668fcbc547af52e0c2c4fd715d27 (patch)
tree2f2481b166f0b69298ca5fa245d984f19f323e76 /drivers
parentf766e8bced2ded321a0966ce033439a2027389f1 (diff)
parentf5ba5c90d4b9c4d691a62eaca47dc095eefba8b1 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-sh
- SH serial bugfix
Diffstat (limited to 'drivers')
-rw-r--r--drivers/serial/serial_sh.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index 13b179f03d..e27d256574 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -116,7 +116,10 @@ static int serial_getc_check(struct uart_port *port)
handle_error(port);
if (sci_in(port, SCLSR) & SCxSR_ORER(port))
handle_error(port);
- return status & (SCIF_DR | SCxSR_RDxF(port));
+ status &= (SCIF_DR | SCxSR_RDxF(port));
+ if (status)
+ return status;
+ return scif_rxfill(port);
}
static int sh_serial_getc_generic(struct uart_port *port)