Skip to contentSkip to conversation

cadence_uart: U-boot driver

PATCH Applied Peter Crosthwaite 2 participants 3 messages Apr 3, 2013 – Apr 5, 2013

lore
Share & tools
lore
#0 lore raw

cover cadence_uart: U-boot driver

Hi Peter,

This is a corner case bug discovered by U-boot driver for cadence GEM.

Regards,
Peter

Peter Crosthwaite (1):
cadence_uart: Flush queued characters on reset

 hw/cadence_uart.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
#1 lore raw

PATCH 1/1 cadence_uart: Flush queued characters on reset

Reset can be used to empty the rx-fifo. As the fifo full condition is used to return false from can_receive, queued rx data should be flushed on reset accordingly.

Cc Wendy Liang <[email protected]>
Cc Jason Wu <[email protected]>

---

 hw/cadence_uart.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
hw/cadence_uart.c +1 -0
index 5426f10..421ec99 100644
@@ -157,6 +157,7 @@ static void uart_rx_reset(UartState *s)
 {
     s->rx_wpos = 0;
     s->rx_count = 0;
+    qemu_chr_accept_input(s->chr);
 
     s->r[R_SR] |= UART_SR_INTR_REMPTY;
     s->r[R_SR] &= ~UART_SR_INTR_RFUL;
Signature · 1 line
1.7.0.4
#2 lore raw

Re: [Qemu-devel] [PATCH arm-devs v1 1/1] cadence_uart: Flush queued characters on reset

Quoted 9 lines · Peter Crosthwaite

Reset can be used to empty the rx-fifo. As the fifo full condition is used to return false from can_receive, queued rx data should be flushed on reset accordingly.

Cc Wendy Liang <[email protected]>
Cc Jason Wu <[email protected]>

Thanks, applied to arm-devs.next.

-- PMM