From a34a92b9ecd8d25bd1de9df601ed31ccd8ebcae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sat, 1 Dec 2012 04:43:18 +0100 Subject: ppc_booke: Pass PowerPCCPU to ppc_booke_timers_init() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cleans up after passing PowerPCCPU to timer callbacks. Signed-off-by: Andreas Färber --- hw/ppc_booke.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'hw/ppc_booke.c') diff --git a/hw/ppc_booke.c b/hw/ppc_booke.c index 5748063..f2c0409 100644 --- a/hw/ppc_booke.c +++ b/hw/ppc_booke.c @@ -237,16 +237,15 @@ void store_booke_tcr(CPUPPCState *env, target_ulong val) } -void ppc_booke_timers_init(CPUPPCState *env, uint32_t freq, uint32_t flags) +void ppc_booke_timers_init(PowerPCCPU *cpu, uint32_t freq, uint32_t flags) { - PowerPCCPU *cpu = ppc_env_get_cpu(env); ppc_tb_t *tb_env; booke_timer_t *booke_timer; tb_env = g_malloc0(sizeof(ppc_tb_t)); booke_timer = g_malloc0(sizeof(booke_timer_t)); - env->tb_env = tb_env; + cpu->env.tb_env = tb_env; tb_env->flags = flags | PPC_TIMER_BOOKE | PPC_DECR_ZERO_TRIGGERED; tb_env->tb_freq = freq; -- cgit v1.1