mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
hw/char/imx_serial: Update all state before restarting ageing timer
Fixes characters to be "echoed" after each keystroke rather than after every other since imx_serial_rx_fifo_ageing_timer_restart() would see ~UTS1_RXEMPTY only after every other keystroke. Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
b6cd77fbdd
commit
a451cc11c4
1 changed files with 3 additions and 3 deletions
|
@ -401,14 +401,14 @@ static void imx_put_data(void *opaque, uint32_t value)
|
|||
if (fifo32_num_used(&s->rx_fifo) >= rxtl) {
|
||||
s->usr1 |= USR1_RRDY;
|
||||
}
|
||||
|
||||
imx_serial_rx_fifo_ageing_timer_restart(s);
|
||||
|
||||
s->usr2 |= USR2_RDR;
|
||||
s->uts1 &= ~UTS1_RXEMPTY;
|
||||
if (value & URXD_BRK) {
|
||||
s->usr2 |= USR2_BRCD;
|
||||
}
|
||||
|
||||
imx_serial_rx_fifo_ageing_timer_restart(s);
|
||||
|
||||
imx_update(s);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue