ppc: bamboo: use generic cpu_model parsing
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
f4c6604e86
commit
376d7a2abb
|
@ -182,11 +182,7 @@ static void bamboo_init(MachineState *machine)
|
||||||
int success;
|
int success;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Setup CPU. */
|
cpu = POWERPC_CPU(cpu_create(machine->cpu_type));
|
||||||
if (machine->cpu_model == NULL) {
|
|
||||||
machine->cpu_model = "440EP";
|
|
||||||
}
|
|
||||||
cpu = POWERPC_CPU(cpu_generic_init(TYPE_POWERPC_CPU, machine->cpu_model));
|
|
||||||
env = &cpu->env;
|
env = &cpu->env;
|
||||||
|
|
||||||
if (env->mmu_model != POWERPC_MMU_BOOKE) {
|
if (env->mmu_model != POWERPC_MMU_BOOKE) {
|
||||||
|
@ -297,6 +293,7 @@ static void bamboo_machine_init(MachineClass *mc)
|
||||||
{
|
{
|
||||||
mc->desc = "bamboo";
|
mc->desc = "bamboo";
|
||||||
mc->init = bamboo_init;
|
mc->init = bamboo_init;
|
||||||
|
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("440epb");
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFINE_MACHINE("bamboo", bamboo_machine_init)
|
DEFINE_MACHINE("bamboo", bamboo_machine_init)
|
||||||
|
|
Loading…
Reference in a new issue