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/lm32 | |
parent | f309ae852c67833c3cac11747474fbb013529382 (diff) |
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/lm32')
-rw-r--r-- | hw/lm32/lm32_boards.c | 32 | ||||
-rw-r--r-- | hw/lm32/milkymist.c | 15 |
2 files changed, 19 insertions, 28 deletions
diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c index 70f48d3b1d..04d2066299 100644 --- a/hw/lm32/lm32_boards.c +++ b/hw/lm32/lm32_boards.c @@ -292,24 +292,20 @@ static void lm32_uclinux_init(MachineState *machine) qemu_register_reset(main_cpu_reset, reset_info); } -static QEMUMachine lm32_evr_machine = { - .name = "lm32-evr", - .desc = "LatticeMico32 EVR32 eval system", - .init = lm32_evr_init, - .is_default = 1, -}; - -static QEMUMachine lm32_uclinux_machine = { - .name = "lm32-uclinux", - .desc = "lm32 platform for uClinux and u-boot by Theobroma Systems", - .init = lm32_uclinux_init, - .is_default = 0, -}; - -static void lm32_machine_init(void) +static void lm32_evr_machine_init(MachineClass *mc) { - qemu_register_machine(&lm32_uclinux_machine); - qemu_register_machine(&lm32_evr_machine); + mc->desc = "LatticeMico32 EVR32 eval system"; + mc->init = lm32_evr_init; + mc->is_default = 1; } -machine_init(lm32_machine_init); +DEFINE_MACHINE("lm32-evr", lm32_evr_machine_init) + +static void lm32_uclinux_machine_init(MachineClass *mc) +{ + mc->desc = "lm32 platform for uClinux and u-boot by Theobroma Systems"; + mc->init = lm32_uclinux_init; + mc->is_default = 0; +} + +DEFINE_MACHINE("lm32-uclinux", lm32_uclinux_machine_init) diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c index e755f5b24f..cb308500b4 100644 --- a/hw/lm32/milkymist.c +++ b/hw/lm32/milkymist.c @@ -209,16 +209,11 @@ milkymist_init(MachineState *machine) qemu_register_reset(main_cpu_reset, reset_info); } -static QEMUMachine milkymist_machine = { - .name = "milkymist", - .desc = "Milkymist One", - .init = milkymist_init, - .is_default = 0, -}; - -static void milkymist_machine_init(void) +static void milkymist_machine_init(MachineClass *mc) { - qemu_register_machine(&milkymist_machine); + mc->desc = "Milkymist One"; + mc->init = milkymist_init; + mc->is_default = 0; } -machine_init(milkymist_machine_init); +DEFINE_MACHINE("milkymist", milkymist_machine_init) |