qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH next v2 21/74] ppc4xx_devs: Use cpu_ppc_init() to ob


From: Andreas Färber
Subject: [Qemu-devel] [PATCH next v2 21/74] ppc4xx_devs: Use cpu_ppc_init() to obtain PowerPCCPU
Date: Thu, 10 May 2012 02:13:59 +0200

Needed for ppc4xx_reset().

Signed-off-by: Andreas Färber <address@hidden>
---
 hw/ppc4xx_devs.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/hw/ppc4xx_devs.c b/hw/ppc4xx_devs.c
index 00e36f4..4cefd75 100644
--- a/hw/ppc4xx_devs.c
+++ b/hw/ppc4xx_devs.c
@@ -51,15 +51,18 @@ CPUPPCState *ppc4xx_init (const char *cpu_model,
                        clk_setup_t *cpu_clk, clk_setup_t *tb_clk,
                        uint32_t sysclk)
 {
+    PowerPCCPU *cpu;
     CPUPPCState *env;
 
     /* init CPUs */
-    env = cpu_init(cpu_model);
-    if (!env) {
+    cpu = cpu_ppc_init(cpu_model);
+    if (cpu == NULL) {
         fprintf(stderr, "Unable to find PowerPC %s CPU definition\n",
                 cpu_model);
         exit(1);
     }
+    env = &cpu->env;
+
     cpu_clk->cb = NULL; /* We don't care about CPU clock frequency changes */
     cpu_clk->opaque = env;
     /* Set time-base frequency to sysclk */
-- 
1.7.7




reply via email to

[Prev in Thread] Current Thread [Next in Thread]