On Sun, Nov 19, 2017 at 09:24:16PM -0600, Michael Davidsaver wrote: > Signed-off-by: Michael Davidsaver <[email protected]>
You're adding what seems to be a fairly specific device to the general
e500 init - this again suggests that it should be split, putting
creation of devices under control of individual machines.
> ---
> hw/ppc/e500.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
> index 6f77844303..bef7d313d4 100644
> --- a/hw/ppc/e500.c
> +++ b/hw/ppc/e500.c
> @@ -861,6 +861,14 @@ void ppce500_init(MachineState *machine, PPCE500Params
> *params)
> qdev_init_nofail(dev);
> ccsr_addr_space = sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 0);
>
> + dev = qdev_create(NULL, "mpc8540-i2c");
> + object_property_add_child(qdev_get_machine(), "i2c[*]",
> + OBJECT(dev), NULL);
> + qdev_init_nofail(dev);
> + s = SYS_BUS_DEVICE(dev);
> + memory_region_add_subregion(ccsr_addr_space, 0x3000,
> + sysbus_mmio_get_region(s, 0));
> +
> mpicdev = ppce500_init_mpic(machine, params, ccsr_addr_space, irqs);
>
> /* Serial */
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
