[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 10/40] lm32: lm32_boards: use generic cpu_model p
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH v2 10/40] lm32: lm32_boards: use generic cpu_model parsing |
Date: |
Thu, 5 Oct 2017 15:50:44 +0200 |
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Acked-by: Michael Walle <address@hidden>
---
CC: address@hidden
---
hw/lm32/lm32_boards.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c
index b0bb3ef..002d638 100644
--- a/hw/lm32/lm32_boards.c
+++ b/hw/lm32/lm32_boards.c
@@ -75,7 +75,6 @@ static void main_cpu_reset(void *opaque)
static void lm32_evr_init(MachineState *machine)
{
- const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
LM32CPU *cpu;
CPULM32State *env;
@@ -101,10 +100,7 @@ static void lm32_evr_init(MachineState *machine)
reset_info = g_malloc0(sizeof(ResetInfo));
- if (cpu_model == NULL) {
- cpu_model = "lm32-full";
- }
- cpu = LM32_CPU(cpu_generic_init(TYPE_LM32_CPU, cpu_model));
+ cpu = LM32_CPU(cpu_create(machine->cpu_type));
env = &cpu->env;
reset_info->cpu = cpu;
@@ -163,7 +159,6 @@ static void lm32_evr_init(MachineState *machine)
static void lm32_uclinux_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;
@@ -198,10 +193,7 @@ static void lm32_uclinux_init(MachineState *machine)
reset_info = g_malloc0(sizeof(ResetInfo));
- if (cpu_model == NULL) {
- cpu_model = "lm32-full";
- }
- cpu = LM32_CPU(cpu_generic_init(TYPE_LM32_CPU, cpu_model));
+ cpu = LM32_CPU(cpu_create(machine->cpu_type));
env = &cpu->env;
reset_info->cpu = cpu;
@@ -295,6 +287,7 @@ static void lm32_evr_class_init(ObjectClass *oc, void *data)
mc->desc = "LatticeMico32 EVR32 eval system";
mc->init = lm32_evr_init;
mc->is_default = 1;
+ mc->default_cpu_type = LM32_CPU_TYPE_NAME("lm32-full");
}
static const TypeInfo lm32_evr_type = {
@@ -310,6 +303,7 @@ static void lm32_uclinux_class_init(ObjectClass *oc, void
*data)
mc->desc = "lm32 platform for uClinux and u-boot by Theobroma Systems";
mc->init = lm32_uclinux_init;
mc->is_default = 0;
+ mc->default_cpu_type = LM32_CPU_TYPE_NAME("lm32-full");
}
static const TypeInfo lm32_uclinux_type = {
--
2.7.4
- [Qemu-devel] [PATCH v2 00/40] generalize parsing of cpu_model (part 2), Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 03/40] qom: add helper macro DEFINE_TYPES(), Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 02/40] qom: introduce type_register_static_array(), Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 04/40] alpha: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 01/40] qom: update doc comment for type_register[_static](), Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 06/40] cris: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 07/40] cris: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 08/40] lm32: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 05/40] alpha: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 10/40] lm32: lm32_boards: use generic cpu_model parsing,
Igor Mammedov <=
- [Qemu-devel] [PATCH v2 09/40] lm32: milkymist: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 13/40] m68k: mcf5208: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 12/40] m68k: an5206: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 11/40] m68k: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 15/40] moxie: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 18/40] openrisc: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 14/40] moxie: fix qemu-system-moxie failing to start with CLI "-cpu MoxieLite", Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 19/40] sh4: r2d: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 16/40] moxie: use generic cpu_model parsing, Igor Mammedov, 2017/10/05