mirror of https://github.com/xemu-project/xemu.git
sparc32: convert Sun4c interrupt controller to reset + vmsd
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
78971d57bb
commit
9a2070d3c0
|
@ -181,9 +181,9 @@ static const VMStateDescription vmstate_sun4c_intctl = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static void sun4c_intctl_reset(void *opaque)
|
static void sun4c_intctl_reset(DeviceState *d)
|
||||||
{
|
{
|
||||||
Sun4c_INTCTLState *s = opaque;
|
Sun4c_INTCTLState *s = container_of(d, Sun4c_INTCTLState, busdev.qdev);
|
||||||
|
|
||||||
s->reg = 1;
|
s->reg = 1;
|
||||||
s->pending = 0;
|
s->pending = 0;
|
||||||
|
@ -203,9 +203,9 @@ static int sun4c_intctl_init1(SysBusDevice *dev)
|
||||||
for (i = 0; i < MAX_PILS; i++) {
|
for (i = 0; i < MAX_PILS; i++) {
|
||||||
sysbus_init_irq(dev, &s->cpu_irqs[i]);
|
sysbus_init_irq(dev, &s->cpu_irqs[i]);
|
||||||
}
|
}
|
||||||
vmstate_register(-1, &vmstate_sun4c_intctl, s);
|
|
||||||
qemu_register_reset(sun4c_intctl_reset, s);
|
sun4c_intctl_reset(&s->busdev.qdev);
|
||||||
sun4c_intctl_reset(s);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,6 +213,8 @@ static SysBusDeviceInfo sun4c_intctl_info = {
|
||||||
.init = sun4c_intctl_init1,
|
.init = sun4c_intctl_init1,
|
||||||
.qdev.name = "sun4c_intctl",
|
.qdev.name = "sun4c_intctl",
|
||||||
.qdev.size = sizeof(Sun4c_INTCTLState),
|
.qdev.size = sizeof(Sun4c_INTCTLState),
|
||||||
|
.qdev.vmsd = &vmstate_sun4c_intctl,
|
||||||
|
.qdev.reset = sun4c_intctl_reset,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void sun4c_intctl_register_devices(void)
|
static void sun4c_intctl_register_devices(void)
|
||||||
|
|
Loading…
Reference in New Issue