[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/14] hw/char/imx_serial: Fix reset value of UFCR register
From: |
Bernhard Beschow |
Subject: |
[PATCH 02/14] hw/char/imx_serial: Fix reset value of UFCR register |
Date: |
Wed, 8 Jan 2025 10:25:26 +0100 |
The value of the UCFR register is respected when echoing characters to the
terminal, but its reset value is reserved. Fix the reset value to the one
documented in the datasheet.
While at it move the related attribute out of the section of unimplemented
registers since its value is actually respected.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
include/hw/char/imx_serial.h | 2 +-
hw/char/imx_serial.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/hw/char/imx_serial.h b/include/hw/char/imx_serial.h
index 65f0e97c76..90ba3ff18c 100644
--- a/include/hw/char/imx_serial.h
+++ b/include/hw/char/imx_serial.h
@@ -109,13 +109,13 @@ struct IMXSerialState {
uint32_t ucr1;
uint32_t ucr2;
uint32_t uts1;
+ uint32_t ufcr;
/*
* The registers below are implemented just so that the
* guest OS sees what it has written
*/
uint32_t onems;
- uint32_t ufcr;
uint32_t ubmr;
uint32_t ubrc;
uint32_t ucr3;
diff --git a/hw/char/imx_serial.c b/hw/char/imx_serial.c
index 12705a1337..f805da23ff 100644
--- a/hw/char/imx_serial.c
+++ b/hw/char/imx_serial.c
@@ -159,6 +159,7 @@ static void imx_serial_reset(IMXSerialState *s)
s->ucr3 = 0x700;
s->ubmr = 0;
s->ubrc = 4;
+ s->ufcr = BIT(11) | BIT(0);
fifo32_reset(&s->rx_fifo);
timer_del(&s->ageing_timer);
--
2.47.1
- [PATCH 00/14] i.MX and SDHCI improvements, Bernhard Beschow, 2025/01/08
- [PATCH 04/14] hw/core: Introduce TYPE_SHARED_IRQ, Bernhard Beschow, 2025/01/08
- [PATCH 02/14] hw/char/imx_serial: Fix reset value of UFCR register,
Bernhard Beschow <=
- [PATCH 01/14] hw/sd/sdhci: Set SDHC_NIS_DMA bit when appropriate, Bernhard Beschow, 2025/01/08
- [PATCH 13/14] hw/misc/imx6_src: Convert DPRINTF() to trace events, Bernhard Beschow, 2025/01/08
- [PATCH 03/14] hw/char/imx_serial: Update all state before restarting ageing timer, Bernhard Beschow, 2025/01/08
- [PATCH 06/14] hw/gpio/imx_gpio: Don't clear input GPIO values upon reset, Bernhard Beschow, 2025/01/08
- [PATCH 07/14] hw/sd/sd: Remove legacy sd_set_cb() in favor of GPIOs, Bernhard Beschow, 2025/01/08
- [PATCH 05/14] hw/pci-host/designware: Expose MSI IRQ, Bernhard Beschow, 2025/01/08
- [PATCH 10/14] hw/timer/imx_gpt: Remove unused define, Bernhard Beschow, 2025/01/08