summaryrefslogtreecommitdiffstats
path: root/qemu/hw/m68k/mcf5208.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu/hw/m68k/mcf5208.c')
-rw-r--r--qemu/hw/m68k/mcf5208.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/qemu/hw/m68k/mcf5208.c b/qemu/hw/m68k/mcf5208.c
index 326a42d27..24155574f 100644
--- a/qemu/hw/m68k/mcf5208.c
+++ b/qemu/hw/m68k/mcf5208.c
@@ -5,6 +5,10 @@
*
* This code is licensed under the GPL
*/
+#include "qemu/osdep.h"
+#include "qapi/error.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "hw/m68k/mcf.h"
#include "qemu/timer.h"
@@ -222,7 +226,7 @@ static void mcf5208evb_init(MachineState *machine)
memory_region_add_subregion(address_space_mem, 0x40000000, ram);
/* Internal SRAM. */
- memory_region_init_ram(sram, NULL, "mcf5208.sram", 16384, &error_abort);
+ memory_region_init_ram(sram, NULL, "mcf5208.sram", 16384, &error_fatal);
vmstate_register_ram_global(sram);
memory_region_add_subregion(address_space_mem, 0x80000000, sram);
@@ -275,7 +279,7 @@ static void mcf5208evb_init(MachineState *machine)
}
kernel_size = load_elf(kernel_filename, NULL, NULL, &elf_entry,
- NULL, NULL, 1, ELF_MACHINE, 0);
+ NULL, NULL, 1, EM_68K, 0, 0);
entry = elf_entry;
if (kernel_size < 0) {
kernel_size = load_uimage(kernel_filename, &entry, NULL, NULL,
@@ -294,16 +298,11 @@ static void mcf5208evb_init(MachineState *machine)
env->pc = entry;
}
-static QEMUMachine mcf5208evb_machine = {
- .name = "mcf5208evb",
- .desc = "MCF5206EVB",
- .init = mcf5208evb_init,
- .is_default = 1,
-};
-
-static void mcf5208evb_machine_init(void)
+static void mcf5208evb_machine_init(MachineClass *mc)
{
- qemu_register_machine(&mcf5208evb_machine);
+ mc->desc = "MCF5206EVB";
+ mc->init = mcf5208evb_init;
+ mc->is_default = 1;
}
-machine_init(mcf5208evb_machine_init);
+DEFINE_MACHINE("mcf5208evb", mcf5208evb_machine_init)