aboutsummaryrefslogtreecommitdiff
path: root/target-openrisc/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-openrisc/cpu.c')
-rw-r--r--target-openrisc/cpu.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/target-openrisc/cpu.c b/target-openrisc/cpu.c
index 83fed5e40d..0b2ffb23f0 100644
--- a/target-openrisc/cpu.c
+++ b/target-openrisc/cpu.c
@@ -208,18 +208,7 @@ static void openrisc_cpu_register_types(void)
OpenRISCCPU *cpu_openrisc_init(const char *cpu_model)
{
- OpenRISCCPU *cpu;
- ObjectClass *oc;
-
- oc = openrisc_cpu_class_by_name(cpu_model);
- if (oc == NULL) {
- return NULL;
- }
- cpu = OPENRISC_CPU(object_new(object_class_get_name(oc)));
-
- object_property_set_bool(OBJECT(cpu), true, "realized", NULL);
-
- return cpu;
+ return OPENRISC_CPU(cpu_generic_init(TYPE_OPENRISC_CPU, cpu_model));
}
/* Sort alphabetically by type name, except for "any". */