qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 06/10] hw/ssi/xilinx_spi: Make device endianness configura


From: Thomas Huth
Subject: Re: [PATCH v7 06/10] hw/ssi/xilinx_spi: Make device endianness configurable
Date: Wed, 12 Feb 2025 14:10:05 +0100
User-agent: Mozilla Thunderbird

On 12/02/2025 13.36, Philippe Mathieu-Daudé wrote:
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair
of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN.
Add the "little-endian" property to select the device
endianness, defaulting to little endian.
Set the proper endianness on the single machine using the
device.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  hw/microblaze/petalogix_ml605_mmu.c |  1 +
  hw/ssi/xilinx_spi.c                 | 32 +++++++++++++++++++++--------
  2 files changed, 24 insertions(+), 9 deletions(-)

diff --git a/hw/microblaze/petalogix_ml605_mmu.c 
b/hw/microblaze/petalogix_ml605_mmu.c
index 490640e9428..b34edf13796 100644
--- a/hw/microblaze/petalogix_ml605_mmu.c
+++ b/hw/microblaze/petalogix_ml605_mmu.c
@@ -175,6 +175,7 @@ petalogix_ml605_init(MachineState *machine)
          SSIBus *spi;
dev = qdev_new("xlnx.xps-spi");
+        qdev_prop_set_enum(dev, "endianness", ENDIAN_MODE_LITTLE);
          qdev_prop_set_uint8(dev, "num-ss-bits", NUM_SPI_FLASHES);
          busdev = SYS_BUS_DEVICE(dev);
          sysbus_realize_and_unref(busdev, &error_fatal);

TARGET_BIG_ENDIAN required again?

Anyway,
Reviewed-by: Thomas Huth <thuth@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]