aboutsummaryrefslogtreecommitdiff
path: root/hw/riscv/microblaze-v-generic.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-09-25 23:15:58 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-02-16 14:34:16 +0100
commit644276db5d707eba7dd89cc8550b3639dbd29f75 (patch)
treead1501303dac4a6c0189f1bec2bdb441de0f2bda /hw/riscv/microblaze-v-generic.c
parent2cdf693b197db6c6c27ff2bf02fce1c0bb384786 (diff)
downloadqemu-644276db5d707eba7dd89cc8550b3639dbd29f75.zip
qemu-644276db5d707eba7dd89cc8550b3639dbd29f75.tar.gz
qemu-644276db5d707eba7dd89cc8550b3639dbd29f75.tar.bz2
hw/net/xilinx_ethlite: 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. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250213122217.62654-4-philmd@linaro.org>
Diffstat (limited to 'hw/riscv/microblaze-v-generic.c')
-rw-r--r--hw/riscv/microblaze-v-generic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/riscv/microblaze-v-generic.c b/hw/riscv/microblaze-v-generic.c
index ebdd461..a21fdfb 100644
--- a/hw/riscv/microblaze-v-generic.c
+++ b/hw/riscv/microblaze-v-generic.c
@@ -120,6 +120,7 @@ static void mb_v_generic_init(MachineState *machine)
/* Emaclite */
dev = qdev_new("xlnx.xps-ethernetlite");
+ qdev_prop_set_enum(dev, "endianness", ENDIAN_MODE_LITTLE);
qemu_configure_nic_device(dev, true, NULL);
qdev_prop_set_uint32(dev, "tx-ping-pong", 0);
qdev_prop_set_uint32(dev, "rx-ping-pong", 0);