ppc: e500: switch E500 based machines to full machine definition
commit03f048090ee73bfb18b16a5dc462b5411120fb4d
authorIgor Mammedov <imammedo@redhat.com>
Wed, 18 Apr 2018 14:28:02 +0000 (18 16:28 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 27 Apr 2018 08:05:23 +0000 (27 18:05 +1000)
treef35740bf3e901b5ec572f88a72f4ba3741659a01
parentda9f80fbad21319194e73355dea8a1cff6a574e4
ppc: e500: switch E500 based machines to full machine definition

Convert PPCE500Params to PCCE500MachineClass which it essentially is,
and introduce PCCE500MachineState to keep track of E500 specific
state instead of adding global variables or extra parameters to
functions when we need to keep data beyond machine init
(i.e. make it look like typical fully defined machine).

It's pretty shallow conversion instead of currently used trivial
DEFINE_MACHINE() macro. It adds extra 60LOC of boilerplate code
of full machine definition.

The patch on top[1] will use PCCE500MachineState to keep track of
platform_bus device and add E500Plate specific machine class
to use HOTPLUG_HANDLER for explicitly initializing dynamic
sysbus devices at the time they are added instead of delaying
it to machine done time by platform_bus_init_notify() which is
being removed.

1)  <1523551221-11612-3-git-send-email-imammedo@redhat.com>

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Suggested-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/e500.c
hw/ppc/e500.h
hw/ppc/e500plat.c
hw/ppc/mpc8544ds.c