summaryrefslogtreecommitdiffstats
path: root/hw/sh4
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2015-09-04 15:37:08 -0300
committerAndreas Färber <afaerber@suse.de>2015-09-19 16:40:15 +0200
commite264d29de28c5b0be3d063307ce9fb613b427cc3 (patch)
tree5e8d9622965ee60421eddbb26dcb42ab8bea7712 /hw/sh4
parentf309ae852c67833c3cac11747474fbb013529382 (diff)
downloadhqemu-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/sh4')
-rw-r--r--hw/sh4/r2d.c13
-rw-r--r--hw/sh4/shix.c15
2 files changed, 9 insertions, 19 deletions
diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
index 481bd92..c1ff9a0 100644
--- a/hw/sh4/r2d.c
+++ b/hw/sh4/r2d.c
@@ -354,15 +354,10 @@ static void r2d_init(MachineState *machine)
SDRAM_BASE + BOOT_PARAMS_OFFSET);
}
-static QEMUMachine r2d_machine = {
- .name = "r2d",
- .desc = "r2d-plus board",
- .init = r2d_init,
-};
-
-static void r2d_machine_init(void)
+static void r2d_machine_init(MachineClass *mc)
{
- qemu_register_machine(&r2d_machine);
+ mc->desc = "r2d-plus board";
+ mc->init = r2d_init;
}
-machine_init(r2d_machine_init);
+DEFINE_MACHINE("r2d", r2d_machine_init)
diff --git a/hw/sh4/shix.c b/hw/sh4/shix.c
index 59bcc23..d508be9 100644
--- a/hw/sh4/shix.c
+++ b/hw/sh4/shix.c
@@ -87,16 +87,11 @@ static void shix_init(MachineState *machine)
tc58128_init(s, "shix_linux_nand.bin", NULL);
}
-static QEMUMachine shix_machine = {
- .name = "shix",
- .desc = "shix card",
- .init = shix_init,
- .is_default = 1,
-};
-
-static void shix_machine_init(void)
+static void shix_machine_init(MachineClass *mc)
{
- qemu_register_machine(&shix_machine);
+ mc->desc = "shix card";
+ mc->init = shix_init;
+ mc->is_default = 1;
}
-machine_init(shix_machine_init);
+DEFINE_MACHINE("shix", shix_machine_init)
OpenPOWER on IntegriCloud