[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 4/9] ast2400: use machine cpu_model to initialize
From: |
Cédric Le Goater |
Subject: |
[Qemu-devel] [PATCH v2 4/9] ast2400: use machine cpu_model to initialize the soc cpu |
Date: |
Thu, 28 Jul 2016 16:28:14 +0200 |
It will be easier to specify a different cpu for other soc derived
from the ast2400 soc.
Signed-off-by: Cédric Le Goater <address@hidden>
---
Change since v1:
- remove check on cpu_model.
hw/arm/aspeed.c | 1 +
hw/arm/ast2400.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index f80a15733864..8a3ff5568575 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -91,6 +91,7 @@ static void aspeed_init(MachineState *machine)
static void palmetto_bmc_init(MachineState *machine)
{
+ machine->cpu_model = "arm926";
aspeed_init(machine);
}
diff --git a/hw/arm/ast2400.c b/hw/arm/ast2400.c
index fa535065f765..84f3b444db09 100644
--- a/hw/arm/ast2400.c
+++ b/hw/arm/ast2400.c
@@ -15,6 +15,7 @@
#include "qemu-common.h"
#include "cpu.h"
#include "exec/address-spaces.h"
+#include "hw/boards.h"
#include "hw/arm/ast2400.h"
#include "hw/char/serial.h"
#include "qemu/log.h"
@@ -67,7 +68,7 @@ static void ast2400_init(Object *obj)
{
AST2400State *s = AST2400(obj);
- s->cpu = cpu_arm_init("arm926");
+ s->cpu = cpu_arm_init(current_machine->cpu_model);
object_initialize(&s->vic, sizeof(s->vic), TYPE_ASPEED_VIC);
object_property_add_child(obj, "vic", OBJECT(&s->vic), NULL);
--
2.1.4
- [Qemu-devel] [PATCH v2 0/9] arm: add ast2500 support, Cédric Le Goater, 2016/07/28
- [Qemu-devel] [PATCH v2 1/9] palmetto-bmc: rename file to aspeed.c, Cédric Le Goater, 2016/07/28
- [Qemu-devel] [PATCH v2 2/9] palmetto-bmc: add a "silicon-rev" property at the soc level, Cédric Le Goater, 2016/07/28
- [Qemu-devel] [PATCH v2 3/9] palmetto-bmc: replace palmetto_bmc with aspeed, Cédric Le Goater, 2016/07/28
- [Qemu-devel] [PATCH v2 4/9] ast2400: use machine cpu_model to initialize the soc cpu,
Cédric Le Goater <=
- [Qemu-devel] [PATCH v2 5/9] palmetto-bmc: add board specific configuration, Cédric Le Goater, 2016/07/28
- [Qemu-devel] [PATCH v2 6/9] hw/misc: use macros to define hw-strap1 register on Aspeed SOC, Cédric Le Goater, 2016/07/28
- [Qemu-devel] [PATCH v2 7/9] aspeed: add ast2500 support to scu and sdmc controllers, Cédric Le Goater, 2016/07/28
- [Qemu-devel] [PATCH v2 8/9] arm: add support for an ast2500 evaluation board, Cédric Le Goater, 2016/07/28
- [Qemu-devel] [PATCH v2 9/9] palmetto-bmc: remove extra no_sdcard assignement, Cédric Le Goater, 2016/07/28