From d4d230da08918183929c7d6cb54824b391536904 Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Wed, 5 Dec 2012 16:53:42 +1000 Subject: xilinx_axienet: Implement R_IS behaviour The interrupt status register R_IS is the standard clear-on-write behaviour. This was unimplemented and defaulting to updating the register to the written value. Implemented clear-on-write. Reported-by: Jason Wu Signed-off-by: Peter Crosthwaite Signed-off-by: Edgar E. Iglesias --- hw/xilinx_axienet.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'hw') diff --git a/hw/xilinx_axienet.c b/hw/xilinx_axienet.c index baae02b..f2e3bf1 100644 --- a/hw/xilinx_axienet.c +++ b/hw/xilinx_axienet.c @@ -591,6 +591,10 @@ static void enet_write(void *opaque, hwaddr addr, s->maddr[s->fmi & 3][addr & 1] = value; break; + case R_IS: + s->regs[addr] &= ~value; + break; + case 0x8000 ... 0x83ff: s->ext_mtable[addr - 0x8000] = value; break; -- cgit v1.1 From 859cc10d23e619153670fc58683373fa24d25b68 Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Wed, 5 Dec 2012 16:53:43 +1000 Subject: xilinx_uartlite: suppress "cannot receive message" This message is not an error condition, its just informing the user that the device is corking the uart traffic to not drop characters. Reported-by: Jason Wu Signed-off-by: Peter Crosthwaite Signed-off-by: Edgar E. Iglesias --- hw/xilinx_uartlite.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'hw') diff --git a/hw/xilinx_uartlite.c b/hw/xilinx_uartlite.c index d20fc41..f890f23 100644 --- a/hw/xilinx_uartlite.c +++ b/hw/xilinx_uartlite.c @@ -182,12 +182,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) -- cgit v1.1 From 80625b97b52836b944a6438e8e3e9d992e6a00b6 Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Wed, 5 Dec 2012 16:53:44 +1000 Subject: xilinx_uartlite: Accept input after rx FIFO pop The device return false from the can receive function when the FIFO is full. This mean the device should check for buffered input whenever a byte is popped from the FIFO. Reported-by: Jason Wu Signed-off-by: Peter Crosthwaite Signed-off-by: Edgar E. Iglesias --- hw/xilinx_uartlite.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw') diff --git a/hw/xilinx_uartlite.c b/hw/xilinx_uartlite.c index f890f23..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: -- cgit v1.1