aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2017-10-05 15:50:46 +0200
committerEduardo Habkost <ehabkost@redhat.com>2017-10-27 16:03:54 +0200
commit25a20b36a3797f95af9835f715113ee20e8e3ab7 (patch)
treebeab1acb8d4dc338e708145db5c507ccfa81241d /hw
parentf61797bd947cff86b12036917b35ebc38628e4df (diff)
downloadqemu-25a20b36a3797f95af9835f715113ee20e8e3ab7.zip
qemu-25a20b36a3797f95af9835f715113ee20e8e3ab7.tar.gz
qemu-25a20b36a3797f95af9835f715113ee20e8e3ab7.tar.bz2
m68k: an5206: use generic cpu_model parsing
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Thomas Huth <huth@tuxfamily.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <1507211474-188400-13-git-send-email-imammedo@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/m68k/an5206.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/m68k/an5206.c b/hw/m68k/an5206.c
index db634cb..5e067ea 100644
--- a/hw/m68k/an5206.c
+++ b/hw/m68k/an5206.c
@@ -28,7 +28,6 @@
static void an5206_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
- const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
M68kCPU *cpu;
CPUM68KState *env;
@@ -39,10 +38,7 @@ static void an5206_init(MachineState *machine)
MemoryRegion *ram = g_new(MemoryRegion, 1);
MemoryRegion *sram = g_new(MemoryRegion, 1);
- if (!cpu_model) {
- cpu_model = "m5206";
- }
- cpu = M68K_CPU(cpu_generic_init(TYPE_M68K_CPU, cpu_model));
+ cpu = M68K_CPU(cpu_create(machine->cpu_type));
env = &cpu->env;
/* Initialize CPU registers. */
@@ -94,6 +90,7 @@ static void an5206_machine_init(MachineClass *mc)
{
mc->desc = "Arnewsh 5206";
mc->init = an5206_init;
+ mc->default_cpu_type = M68K_CPU_TYPE_NAME("m5206");
}
DEFINE_MACHINE("an5206", an5206_machine_init)