From 572747136d20bc7e5e2c5a7c54af4aa44b6f42e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andreas=20F=C3=A4rber?= Date: Fri, 4 May 2012 17:20:11 +0200 Subject: [PATCH] ppc4xx_devs: Use cpu_ppc_init() to obtain PowerPCCPU MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Needed for ppc4xx_reset(). Signed-off-by: Andreas Färber Acked-by: Alexander Graf --- hw/ppc4xx_devs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/ppc4xx_devs.c b/hw/ppc4xx_devs.c index 00e36f4109f..4cefd7514bd 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 */ -- 2.39.5