[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/4] hw/ppc/e500.c: Attach eSDHC unimplemented region to ccsr_add
From: |
Bernhard Beschow |
Subject: |
[PATCH 4/4] hw/ppc/e500.c: Attach eSDHC unimplemented region to ccsr_addr_space |
Date: |
Wed, 25 Jan 2023 14:00:24 +0100 |
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>
---
hw/ppc/e500.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index e3b29d1d97..117c9c08ed 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -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:
--
2.39.1
- [PATCH 0/4] E500 cleanups and enhancements, Bernhard Beschow, 2023/01/25
- [PATCH 3/4] hw/ppc/e500.c: Avoid hardcoding parent device in create_devtree_etsec(), Bernhard Beschow, 2023/01/25
- [PATCH 4/4] hw/ppc/e500.c: Attach eSDHC unimplemented region to ccsr_addr_space,
Bernhard Beschow <=
- [PATCH 1/4] hw/ppc: Set machine->fdt in e500 machines, Bernhard Beschow, 2023/01/25
- [PATCH 2/4] hw/ppc/e500{, plat}: Drop redundant checks for presence of platform bus, Bernhard Beschow, 2023/01/25
- Re: [PATCH 0/4] E500 cleanups and enhancements, Daniel Henrique Barboza, 2023/01/28