aboutsummaryrefslogtreecommitdiff
path: root/hw/char/exynos4210_uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/char/exynos4210_uart.c')
-rw-r--r--hw/char/exynos4210_uart.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c
index 6361df2..9b21d20 100644
--- a/hw/char/exynos4210_uart.c
+++ b/hw/char/exynos4210_uart.c
@@ -553,7 +553,11 @@ static int exynos4210_uart_can_receive(void *opaque)
{
Exynos4210UartState *s = (Exynos4210UartState *)opaque;
- return fifo_empty_elements_number(&s->rx);
+ if (s->reg[I_(UFCON)] & UFCON_FIFO_ENABLE) {
+ return fifo_empty_elements_number(&s->rx);
+ } else {
+ return !(s->reg[I_(UTRSTAT)] & UTRSTAT_Rx_BUFFER_DATA_READY);
+ }
}
static void exynos4210_uart_receive(void *opaque, const uint8_t *buf, int size)