aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/timer/exynos4210_mct.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c
index 439053acd2..d0e5343996 100644
--- a/hw/timer/exynos4210_mct.c
+++ b/hw/timer/exynos4210_mct.c
@@ -1530,6 +1530,19 @@ static void exynos4210_mct_init(Object *obj)
sysbus_init_mmio(dev, &s->iomem);
}
+static void exynos4210_mct_finalize(Object *obj)
+{
+ int i;
+ Exynos4210MCTState *s = EXYNOS4210_MCT(obj);
+
+ ptimer_free(s->g_timer.ptimer_frc);
+
+ for (i = 0; i < 2; i++) {
+ ptimer_free(s->l_timer[i].tick_timer.ptimer_tick);
+ ptimer_free(s->l_timer[i].ptimer_frc);
+ }
+}
+
static void exynos4210_mct_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
@@ -1543,6 +1556,7 @@ static const TypeInfo exynos4210_mct_info = {
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(Exynos4210MCTState),
.instance_init = exynos4210_mct_init,
+ .instance_finalize = exynos4210_mct_finalize,
.class_init = exynos4210_mct_class_init,
};