cris: 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-8-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
Igor Mammedov 2017-10-05 15:50:41 +02:00 committed by Eduardo Habkost
parent 3936419121
commit 5eab493d7a

View File

@ -251,7 +251,6 @@ static
void axisdev88_init(MachineState *machine) void axisdev88_init(MachineState *machine)
{ {
ram_addr_t ram_size = machine->ram_size; ram_addr_t ram_size = machine->ram_size;
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename; const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline; const char *kernel_cmdline = machine->kernel_cmdline;
CRISCPU *cpu; CRISCPU *cpu;
@ -268,10 +267,7 @@ void axisdev88_init(MachineState *machine)
MemoryRegion *phys_intmem = g_new(MemoryRegion, 1); MemoryRegion *phys_intmem = g_new(MemoryRegion, 1);
/* init CPUs */ /* init CPUs */
if (cpu_model == NULL) { cpu = CRIS_CPU(cpu_create(machine->cpu_type));
cpu_model = "crisv32";
}
cpu = CRIS_CPU(cpu_generic_init(TYPE_CRIS_CPU, cpu_model));
env = &cpu->env; env = &cpu->env;
/* allocate RAM */ /* allocate RAM */
@ -359,6 +355,7 @@ static void axisdev88_machine_init(MachineClass *mc)
mc->desc = "AXIS devboard 88"; mc->desc = "AXIS devboard 88";
mc->init = axisdev88_init; mc->init = axisdev88_init;
mc->is_default = 1; mc->is_default = 1;
mc->default_cpu_type = CRIS_CPU_TYPE_NAME("crisv32");
} }
DEFINE_MACHINE("axis-dev88", axisdev88_machine_init) DEFINE_MACHINE("axis-dev88", axisdev88_machine_init)