aboutsummaryrefslogtreecommitdiff
path: root/hw/exynos4210_mct.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/exynos4210_mct.c')
-rw-r--r--hw/exynos4210_mct.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/hw/exynos4210_mct.c b/hw/exynos4210_mct.c
index 7a22b1f900..41cd142227 100644
--- a/hw/exynos4210_mct.c
+++ b/hw/exynos4210_mct.c
@@ -53,7 +53,7 @@
*/
#include "sysbus.h"
-#include "qemu-timer.h"
+#include "qemu/timer.h"
#include "qemu-common.h"
#include "ptimer.h"
@@ -568,14 +568,12 @@ static void exynos4210_gfrc_event(void *opaque)
/* Reload FRC to reach nearest comparator */
s->g_timer.curr_comp = exynos4210_gcomp_find(s);
distance = exynos4210_gcomp_get_distance(s, s->g_timer.curr_comp);
- if (distance > MCT_GT_COUNTER_STEP) {
+ if (distance > MCT_GT_COUNTER_STEP || !distance) {
distance = MCT_GT_COUNTER_STEP;
}
exynos4210_gfrc_set_count(&s->g_timer, distance);
exynos4210_gfrc_start(&s->g_timer);
-
- return;
}
/*
@@ -987,7 +985,7 @@ static void exynos4210_mct_reset(DeviceState *d)
}
/* Multi Core Timer read */
-static uint64_t exynos4210_mct_read(void *opaque, target_phys_addr_t offset,
+static uint64_t exynos4210_mct_read(void *opaque, hwaddr offset,
unsigned size)
{
Exynos4210MCTState *s = (Exynos4210MCTState *)opaque;
@@ -1100,7 +1098,7 @@ static uint64_t exynos4210_mct_read(void *opaque, target_phys_addr_t offset,
}
/* MCT write */
-static void exynos4210_mct_write(void *opaque, target_phys_addr_t offset,
+static void exynos4210_mct_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
Exynos4210MCTState *s = (Exynos4210MCTState *)opaque;