summaryrefslogtreecommitdiff
path: root/drivers/serial
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-10-17 18:07:06 -0600
committerTom Rini <[email protected]>2025-10-17 18:07:06 -0600
commit64a4645c4e4f54d4e67d2954ed20b9e1af389530 (patch)
tree220a6ffc7811a403797f5e0fa4140cfbe0a644f3 /drivers/serial
parent5340dc6fe75b5ffde3afe91c01bd8551b3cb8182 (diff)
parentb9efaf6729d06df94ded46710725746a41eaf0fc (diff)
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
SH HSCIF FIFO fixes, R-Car V4H/V4M DT corrections, R-Car V4H Sparrow Hawk PCIe shutdown support before booting Linux.
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/serial_sh.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index e4cc4ee4260..7ab62e0e90b 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -112,7 +112,16 @@ static int serial_raw_putc(struct uart_port *port, const char c)
static int serial_rx_fifo_level(struct uart_port *port)
{
- return scif_rxfill(port);
+ int ret;
+
+ ret = scif_rxfill(port);
+ if (ret)
+ return ret;
+
+ if (sci_in(port, SCxSR) & SCxSR_RDxF(port))
+ return 1;
+
+ return 0;
}
static int sh_serial_tstc_generic(struct uart_port *port)