From 09e6c3457f8212a2afa0c44aadfa40c9030e4553 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Mon, 24 Nov 2014 15:23:58 +0100 Subject: [PATCH] hw_arndale: consider timer resets On Arndale, the kernel timer resets to the initial value of the last count-down and continues as soon as it reaches zero. We must check this via the interrupt status when we read out the timer value and in case return 0 instead of the real value. fix #1299 --- repos/base-hw/src/core/include/spec/exynos5/timer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/base-hw/src/core/include/spec/exynos5/timer.h b/repos/base-hw/src/core/include/spec/exynos5/timer.h index 2099a68d68..704198d577 100644 --- a/repos/base-hw/src/core/include/spec/exynos5/timer.h +++ b/repos/base-hw/src/core/include/spec/exynos5/timer.h @@ -245,8 +245,8 @@ class Genode::Timer : public Mmio unsigned value(unsigned const cpu) { switch (cpu) { - case 0: return read(); - case 1: return read(); + case 0: return read() ? 0 : read(); + case 1: return read() ? 0 : read(); default: return 0; } }