diff options
author | Igor Mammedov <imammedo@redhat.com> | 2017-10-05 15:50:47 +0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2017-10-27 16:03:54 +0200 |
commit | ddbcc16f29d41176769881ca40830015e249c749 (patch) | |
tree | 3f73cfe735678732b290d325035a8a4f2504c819 /hw | |
parent | 25a20b36a3797f95af9835f715113ee20e8e3ab7 (diff) |
m68k: mcf5208: 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-14-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/m68k/mcf5208.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c index 68589c36d2..fac0d09cbc 100644 --- a/hw/m68k/mcf5208.c +++ b/hw/m68k/mcf5208.c @@ -218,7 +218,6 @@ static void mcf_fec_init(MemoryRegion *sysmem, NICInfo *nd, hwaddr base, static void mcf5208evb_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; @@ -230,10 +229,7 @@ static void mcf5208evb_init(MachineState *machine) MemoryRegion *ram = g_new(MemoryRegion, 1); MemoryRegion *sram = g_new(MemoryRegion, 1); - if (!cpu_model) { - cpu_model = "m5208"; - } - 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. */ @@ -322,6 +318,7 @@ static void mcf5208evb_machine_init(MachineClass *mc) mc->desc = "MCF5206EVB"; mc->init = mcf5208evb_init; mc->is_default = 1; + mc->default_cpu_type = M68K_CPU_TYPE_NAME("m5208"); } DEFINE_MACHINE("mcf5208evb", mcf5208evb_machine_init) |