ppc4xx_devs: Use cpu_ppc_init() to obtain PowerPCCPU

Needed for ppc4xx_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Andreas Färber 2012-05-04 17:20:11 +02:00
parent 182fbbf218
commit 572747136d
1 changed files with 5 additions and 2 deletions

View File

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