diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-09-25 23:16:21 +0200 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-02-16 14:34:44 +0100 |
| commit | df1f35ab67e50f572934b7ea705764b77cf6d525 (patch) | |
| tree | 01d5e8943fdc32be585110f56bb912015eba30f2 /hw/riscv/microblaze-v-generic.c | |
| parent | 644276db5d707eba7dd89cc8550b3639dbd29f75 (diff) | |
| download | focaccia-qemu-df1f35ab67e50f572934b7ea705764b77cf6d525.tar.gz focaccia-qemu-df1f35ab67e50f572934b7ea705764b77cf6d525.zip | |
hw/timer/xilinx_timer: Make device endianness configurable
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "endianness" property to select the device endianness. This property is unspecified by default, and machines need to set it explicitly. Set the proper endianness for each machine using the device. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250213122217.62654-5-philmd@linaro.org>
Diffstat (limited to 'hw/riscv/microblaze-v-generic.c')
| -rw-r--r-- | hw/riscv/microblaze-v-generic.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/riscv/microblaze-v-generic.c b/hw/riscv/microblaze-v-generic.c index a21fdfbe6d..3c79f5733b 100644 --- a/hw/riscv/microblaze-v-generic.c +++ b/hw/riscv/microblaze-v-generic.c @@ -104,6 +104,7 @@ static void mb_v_generic_init(MachineState *machine) /* 2 timers at irq 0 @ 100 Mhz. */ dev = qdev_new("xlnx.xps-timer"); + qdev_prop_set_enum(dev, "endianness", ENDIAN_MODE_LITTLE); qdev_prop_set_uint32(dev, "one-timer-only", 0); qdev_prop_set_uint32(dev, "clock-frequency", 100000000); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); @@ -112,6 +113,7 @@ static void mb_v_generic_init(MachineState *machine) /* 2 timers at irq 3 @ 100 Mhz. */ dev = qdev_new("xlnx.xps-timer"); + qdev_prop_set_enum(dev, "endianness", ENDIAN_MODE_LITTLE); qdev_prop_set_uint32(dev, "one-timer-only", 0); qdev_prop_set_uint32(dev, "clock-frequency", 100000000); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); |