Hi Jacob,

On 21/9/26 07:09, Jacob Whitaker Abrams wrote:
Official STM32CubeL4 drivers use and require support for 16-bit writes to
UART registers for proper function despite datasheet claims.

[*]


Signed-off-by: Jacob Whitaker Abrams <[email protected]>
---
v2:
  - Remove all changes other than supporting 16-bit writes UART regs

  hw/char/stm32l4x5_usart.c          |  4 ++--
  tests/qtest/stm32l4x5_usart-test.c | 22 +++++++++++++++++++++-
  2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/hw/char/stm32l4x5_usart.c b/hw/char/stm32l4x5_usart.c
index dd1b099195..3b9883bb23 100644
--- a/hw/char/stm32l4x5_usart.c
+++ b/hw/char/stm32l4x5_usart.c
@@ -521,12 +521,12 @@ static const MemoryRegionOps stm32l4x5_usart_base_ops = {
      .endianness = DEVICE_NATIVE_ENDIAN,
      .valid = {
          .max_access_size = 4,
-        .min_access_size = 4,
+        .min_access_size = 2,

Can we replicate the description comment here?

          .unaligned = false
      },
      .impl = {
          .max_access_size = 4,
-        .min_access_size = 4,
+        .min_access_size = 2,

This files defines addresses using the REG32() macro, and
the read/write handlers switch over these 32-bit addresses.

Why change the implementation minimum access size to 16-bit?

          .unaligned = false
      },
  };

Reply via email to