[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 5/7] hw/mips/malta: Explicit GT64120 endianness upon device cr
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 5/7] hw/mips/malta: Explicit GT64120 endianness upon device creation |
Date: |
Tue, 20 Dec 2022 12:34:34 +0100 |
Propagate the controller endianess from the machine, setting
the "cpu-little-endian" property.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221209151533.69516-6-philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/mips/malta.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index ba92022f87..1f4e0c7acc 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1390,7 +1390,9 @@ void mips_malta_init(MachineState *machine)
stl_p(memory_region_get_ram_ptr(bios_copy) + 0x10, 0x00000420);
/* Northbridge */
- dev = sysbus_create_simple("gt64120", -1, NULL);
+ dev = qdev_new("gt64120");
+ qdev_prop_set_bit(dev, "cpu-little-endian", !be);
+ sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
pci_bus = PCI_BUS(qdev_get_child_bus(dev, "pci"));
/* Southbridge */
--
2.38.1
- [PATCH v2 0/7] hw/mips: Make gt64xxx_pci.c endian-agnostic, Philippe Mathieu-Daudé, 2022/12/20
- [PATCH v2 1/7] hw/mips/Kconfig: Introduce CONFIG_GT64120 to select gt64xxx_pci.c, Philippe Mathieu-Daudé, 2022/12/20
- [PATCH v2 2/7] hw/mips/gt64xxx_pci: Let the GT64120 manage the lower 512MiB hole, Philippe Mathieu-Daudé, 2022/12/20
- [PATCH v2 3/7] hw/mips/gt64xxx_pci: Manage endian bits with the RegisterFields API, Philippe Mathieu-Daudé, 2022/12/20
- [PATCH v2 4/7] hw/mips/gt64xxx_pci: Add a 'cpu-little-endian' qdev property, Philippe Mathieu-Daudé, 2022/12/20
- [PATCH v2 5/7] hw/mips/malta: Explicit GT64120 endianness upon device creation,
Philippe Mathieu-Daudé <=
- [PATCH v2 6/7] hw/mips/meson: Make gt64xxx_pci.c endian-agnostic, Philippe Mathieu-Daudé, 2022/12/20
- [PATCH v2 7/7] hw/mips/gt64xxx_pci: Move it to hw/pci-host/, Philippe Mathieu-Daudé, 2022/12/20
- Re: [PATCH v2 0/7] hw/mips: Make gt64xxx_pci.c endian-agnostic, Philippe Mathieu-Daudé, 2022/12/21