]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
hw/ppc/e500.c: Attach eSDHC unimplemented region to ccsr_addr_space
authorBernhard Beschow <shentey@gmail.com>
Wed, 25 Jan 2023 13:00:24 +0000 (14:00 +0100)
committerDaniel Henrique Barboza <danielhb413@gmail.com>
Sun, 5 Feb 2023 09:40:28 +0000 (06:40 -0300)
Makes the unimplemented region move together with the CCSR address space
if moved by a bootloader. Moving the CCSR address space isn't
implemented yet but this patch is a preparation for it.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230125130024.158721-5-shentey@gmail.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
hw/ppc/e500.c

index e3b29d1d97eb7e347d9dee6ad9476a2700fa64a0..117c9c08eddf4747ef93a24efeaca04250f2118e 100644 (file)
@@ -1022,9 +1022,13 @@ void ppce500_init(MachineState *machine)
 
     /* eSDHC */
     if (pmc->has_esdhc) {
-        create_unimplemented_device("esdhc",
-                                    pmc->ccsrbar_base + MPC85XX_ESDHC_REGS_OFFSET,
-                                    MPC85XX_ESDHC_REGS_SIZE);
+        dev = qdev_new(TYPE_UNIMPLEMENTED_DEVICE);
+        qdev_prop_set_string(dev, "name", "esdhc");
+        qdev_prop_set_uint64(dev, "size", MPC85XX_ESDHC_REGS_SIZE);
+        s = SYS_BUS_DEVICE(dev);
+        sysbus_realize_and_unref(s, &error_fatal);
+        memory_region_add_subregion(ccsr_addr_space, MPC85XX_ESDHC_REGS_OFFSET,
+                                    sysbus_mmio_get_region(s, 0));
 
         /*
          * Compatible with: