diff options
author | Igor Mammedov <imammedo@redhat.com> | 2017-10-05 15:50:53 +0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2017-10-27 16:03:54 +0200 |
commit | 78f60b829a09b23095f84a8de086c8309f7626a9 (patch) | |
tree | 6125c868c8eef51362c3a12b5911a91b04118a5f /hw | |
parent | 1498e9706a722773f677599985a0b8b086b4f09d (diff) | |
download | qemu-78f60b829a09b23095f84a8de086c8309f7626a9.zip qemu-78f60b829a09b23095f84a8de086c8309f7626a9.tar.gz qemu-78f60b829a09b23095f84a8de086c8309f7626a9.tar.bz2 |
sh4: r2d: use generic cpu_model parsing
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <1507211474-188400-20-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/sh4/r2d.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index 16b9ed2..458ed83 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -225,7 +225,6 @@ static struct QEMU_PACKED static void r2d_init(MachineState *machine) { - const char *cpu_model = machine->cpu_model; const char *kernel_filename = machine->kernel_filename; const char *kernel_cmdline = machine->kernel_cmdline; const char *initrd_filename = machine->initrd_filename; @@ -242,11 +241,7 @@ static void r2d_init(MachineState *machine) MemoryRegion *address_space_mem = get_system_memory(); PCIBus *pci_bus; - if (cpu_model == NULL) { - cpu_model = "SH7751R"; - } - - cpu = SUPERH_CPU(cpu_generic_init(TYPE_SUPERH_CPU, cpu_model)); + cpu = SUPERH_CPU(cpu_create(machine->cpu_type)); env = &cpu->env; reset_info = g_malloc0(sizeof(ResetData)); @@ -365,6 +360,7 @@ static void r2d_machine_init(MachineClass *mc) mc->desc = "r2d-plus board"; mc->init = r2d_init; mc->block_default_type = IF_IDE; + mc->default_cpu_type = TYPE_SH7751R_CPU; } DEFINE_MACHINE("r2d", r2d_machine_init) |