aboutsummaryrefslogtreecommitdiff
path: root/hw/mcf_intc.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-01-18 14:15:09 +0100
committerAndreas Färber <afaerber@suse.de>2013-02-16 14:50:59 +0100
commit9a6ee9fd35483446fe14e083fa335358c86ba595 (patch)
treecca6f59e3ee9894bd01120cd44300111b372c3a8 /hw/mcf_intc.c
parent4025cfd5d7175203008343a375f9287c77cd383c (diff)
mcf_intc: Pass M68kCPU to mcf_intc_init()
Store it in mcf_intc_state. Prepares for passing it to m68k_set_irq_level(). Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/mcf_intc.c')
-rw-r--r--hw/mcf_intc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/mcf_intc.c b/hw/mcf_intc.c
index 3bed3a2e4c..450f622e9d 100644
--- a/hw/mcf_intc.c
+++ b/hw/mcf_intc.c
@@ -16,7 +16,7 @@ typedef struct {
uint64_t ifr;
uint64_t enabled;
uint8_t icr[64];
- CPUM68KState *env;
+ M68kCPU *cpu;
int active_vector;
} mcf_intc_state;
@@ -40,7 +40,7 @@ static void mcf_intc_update(mcf_intc_state *s)
}
}
s->active_vector = ((best == 64) ? 24 : (best + 64));
- m68k_set_irq_level(s->env, best_level, s->active_vector);
+ m68k_set_irq_level(&s->cpu->env, best_level, s->active_vector);
}
static uint64_t mcf_intc_read(void *opaque, hwaddr addr,
@@ -139,12 +139,12 @@ static const MemoryRegionOps mcf_intc_ops = {
qemu_irq *mcf_intc_init(MemoryRegion *sysmem,
hwaddr base,
- CPUM68KState *env)
+ M68kCPU *cpu)
{
mcf_intc_state *s;
s = g_malloc0(sizeof(mcf_intc_state));
- s->env = env;
+ s->cpu = cpu;
mcf_intc_reset(s);
memory_region_init_io(&s->iomem, &mcf_intc_ops, s, "mcf", 0x100);