sysbus_init_mmio(dev, &s->iomem);
}
+static void mv88w8618_pit_finalize(Object *obj)
+{
+ SysBusDevice *dev = SYS_BUS_DEVICE(obj);
+ mv88w8618_pit_state *s = MV88W8618_PIT(dev);
+ int i;
+
+ for (i = 0; i < 4; i++) {
+ ptimer_free(s->timer[i].ptimer);
+ }
+}
+
static const VMStateDescription mv88w8618_timer_vmsd = {
.name = "timer",
.version_id = 1,
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(mv88w8618_pit_state),
.instance_init = mv88w8618_pit_init,
+ .instance_finalize = mv88w8618_pit_finalize,
.class_init = mv88w8618_pit_class_init,
};