diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2015-09-04 15:37:08 -0300 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2015-09-19 16:40:15 +0200 |
commit | e264d29de28c5b0be3d063307ce9fb613b427cc3 (patch) | |
tree | 5e8d9622965ee60421eddbb26dcb42ab8bea7712 /hw/ppc | |
parent | f309ae852c67833c3cac11747474fbb013529382 (diff) | |
download | hqemu-e264d29de28c5b0be3d063307ce9fb613b427cc3.zip hqemu-e264d29de28c5b0be3d063307ce9fb613b427cc3.tar.gz |
Use DEFINE_MACHINE() to register all machines
Convert all machines to use DEFINE_MACHINE() instead of QEMUMachine
automatically using a script.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
[AF: Style cleanups, convert imx25_pdk machine]
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/ppc')
-rw-r--r-- | hw/ppc/e500plat.c | 17 | ||||
-rw-r--r-- | hw/ppc/mac_oldworld.c | 23 | ||||
-rw-r--r-- | hw/ppc/mpc8544ds.c | 15 | ||||
-rw-r--r-- | hw/ppc/ppc405_boards.c | 26 | ||||
-rw-r--r-- | hw/ppc/ppc440_bamboo.c | 13 | ||||
-rw-r--r-- | hw/ppc/prep.c | 17 | ||||
-rw-r--r-- | hw/ppc/virtex_ml507.c | 13 |
7 files changed, 45 insertions, 79 deletions
diff --git a/hw/ppc/e500plat.c b/hw/ppc/e500plat.c index 14b14ea..384b6e8 100644 --- a/hw/ppc/e500plat.c +++ b/hw/ppc/e500plat.c @@ -57,17 +57,12 @@ static void e500plat_init(MachineState *machine) ppce500_init(machine, ¶ms); } -static QEMUMachine e500plat_machine = { - .name = "ppce500", - .desc = "generic paravirt e500 platform", - .init = e500plat_init, - .max_cpus = 32, - .has_dynamic_sysbus = true, -}; - -static void e500plat_machine_init(void) +static void e500plat_machine_init(MachineClass *mc) { - qemu_register_machine(&e500plat_machine); + mc->desc = "generic paravirt e500 platform"; + mc->init = e500plat_init; + mc->max_cpus = 32; + mc->has_dynamic_sysbus = true; } -machine_init(e500plat_machine_init); +DEFINE_MACHINE("ppce500", e500plat_machine_init) diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 4c5fe46..5cba2cb 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -357,22 +357,17 @@ static int heathrow_kvm_type(const char *arg) return 2; } -static QEMUMachine heathrow_machine = { - .name = "g3beige", - .desc = "Heathrow based PowerMAC", - .init = ppc_heathrow_init, - .max_cpus = MAX_CPUS, +static void heathrow_machine_init(MachineClass *mc) +{ + mc->desc = "Heathrow based PowerMAC"; + mc->init = ppc_heathrow_init; + mc->max_cpus = MAX_CPUS; #ifndef TARGET_PPC64 - .is_default = 1, + mc->is_default = 1; #endif /* TOFIX "cad" when Mac floppy is implemented */ - .default_boot_order = "cd", - .kvm_type = heathrow_kvm_type, -}; - -static void heathrow_machine_init(void) -{ - qemu_register_machine(&heathrow_machine); + mc->default_boot_order = "cd"; + mc->kvm_type = heathrow_kvm_type; } -machine_init(heathrow_machine_init); +DEFINE_MACHINE("g3beige", heathrow_machine_init) diff --git a/hw/ppc/mpc8544ds.c b/hw/ppc/mpc8544ds.c index 3a3b141..0afbd34 100644 --- a/hw/ppc/mpc8544ds.c +++ b/hw/ppc/mpc8544ds.c @@ -50,16 +50,11 @@ static void mpc8544ds_init(MachineState *machine) } -static QEMUMachine ppce500_machine = { - .name = "mpc8544ds", - .desc = "mpc8544ds", - .init = mpc8544ds_init, - .max_cpus = 15, -}; - -static void ppce500_machine_init(void) +static void ppce500_machine_init(MachineClass *mc) { - qemu_register_machine(&ppce500_machine); + mc->desc = "mpc8544ds"; + mc->init = mpc8544ds_init; + mc->max_cpus = 15; } -machine_init(ppce500_machine_init); +DEFINE_MACHINE("mpc8544ds", ppce500_machine_init) diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c index 5389725..56980bf 100644 --- a/hw/ppc/ppc405_boards.c +++ b/hw/ppc/ppc405_boards.c @@ -369,11 +369,13 @@ static void ref405ep_init(MachineState *machine) #endif } -static QEMUMachine ref405ep_machine = { - .name = "ref405ep", - .desc = "ref405ep", - .init = ref405ep_init, -}; +static void ref405ep_machine_init(MachineClass *mc) +{ + mc->desc = "ref405ep"; + mc->init = ref405ep_init; +} + +DEFINE_MACHINE("ref405ep", ref405ep_machine_init) /*****************************************************************************/ /* AMCC Taihu evaluation board */ @@ -665,16 +667,10 @@ static void taihu_405ep_init(MachineState *machine) #endif } -static QEMUMachine taihu_machine = { - .name = "taihu", - .desc = "taihu", - .init = taihu_405ep_init, -}; - -static void ppc405_machine_init(void) +static void taihu_machine_init(MachineClass *mc) { - qemu_register_machine(&ref405ep_machine); - qemu_register_machine(&taihu_machine); + mc->desc = "taihu"; + mc->init = taihu_405ep_init; } -machine_init(ppc405_machine_init); +DEFINE_MACHINE("taihu", taihu_machine_init) diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c index 032fa80..4726832 100644 --- a/hw/ppc/ppc440_bamboo.c +++ b/hw/ppc/ppc440_bamboo.c @@ -293,15 +293,10 @@ static void bamboo_init(MachineState *machine) kvmppc_init(); } -static QEMUMachine bamboo_machine = { - .name = "bamboo", - .desc = "bamboo", - .init = bamboo_init, -}; - -static void bamboo_machine_init(void) +static void bamboo_machine_init(MachineClass *mc) { - qemu_register_machine(&bamboo_machine); + mc->desc = "bamboo"; + mc->init = bamboo_init; } -machine_init(bamboo_machine_init); +DEFINE_MACHINE("bamboo", bamboo_machine_init) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 81f0838..9d6d70a 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -687,17 +687,12 @@ static void ppc_prep_init(MachineState *machine) graphic_width, graphic_height, graphic_depth); } -static QEMUMachine prep_machine = { - .name = "prep", - .desc = "PowerPC PREP platform", - .init = ppc_prep_init, - .max_cpus = MAX_CPUS, - .default_boot_order = "cad", -}; - -static void prep_machine_init(void) +static void prep_machine_init(MachineClass *mc) { - qemu_register_machine(&prep_machine); + mc->desc = "PowerPC PREP platform"; + mc->init = ppc_prep_init; + mc->max_cpus = MAX_CPUS; + mc->default_boot_order = "cad"; } -machine_init(prep_machine_init); +DEFINE_MACHINE("prep", prep_machine_init) diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c index de86f7c..457d762 100644 --- a/hw/ppc/virtex_ml507.c +++ b/hw/ppc/virtex_ml507.c @@ -297,15 +297,10 @@ static void virtex_init(MachineState *machine) env->load_info = &boot_info; } -static QEMUMachine virtex_machine = { - .name = "virtex-ml507", - .desc = "Xilinx Virtex ML507 reference design", - .init = virtex_init, -}; - -static void virtex_machine_init(void) +static void virtex_machine_init(MachineClass *mc) { - qemu_register_machine(&virtex_machine); + mc->desc = "Xilinx Virtex ML507 reference design"; + mc->init = virtex_init; } -machine_init(virtex_machine_init); +DEFINE_MACHINE("virtex-ml507", virtex_machine_init) |