aboutsummaryrefslogtreecommitdiff
path: root/hw/xilinx_uartlite.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xilinx_uartlite.c')
-rw-r--r--hw/xilinx_uartlite.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/xilinx_uartlite.c b/hw/xilinx_uartlite.c
index d20fc41..02c5850 100644
--- a/hw/xilinx_uartlite.c
+++ b/hw/xilinx_uartlite.c
@@ -97,6 +97,7 @@ uart_read(void *opaque, hwaddr addr, unsigned int size)
s->rx_fifo_len--;
uart_update_status(s);
uart_update_irq(s);
+ qemu_chr_accept_input(s->chr);
break;
default:
@@ -182,12 +183,8 @@ static void uart_rx(void *opaque, const uint8_t *buf, int size)
static int uart_can_rx(void *opaque)
{
struct xlx_uartlite *s = opaque;
- int r;
- r = s->rx_fifo_len < sizeof(s->rx_fifo);
- if (!r)
- printf("cannot receive!\n");
- return r;
+ return s->rx_fifo_len < sizeof(s->rx_fifo);
}
static void uart_event(void *opaque, int event)