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
This commit is contained in:
Martin Stein 2014-11-24 15:23:58 +01:00 committed by Christian Helmuth
parent 2f5fbe73d3
commit 09e6c3457f
1 changed files with 2 additions and 2 deletions

View File

@ -245,8 +245,8 @@ class Genode::Timer : public Mmio
unsigned value(unsigned const cpu)
{
switch (cpu) {
case 0: return read<L0_frcnto>();
case 1: return read<L1_frcnto>();
case 0: return read<L0_int_cstat::Frcnt>() ? 0 : read<L0_frcnto>();
case 1: return read<L1_int_cstat::Frcnt>() ? 0 : read<L1_frcnto>();
default: return 0;
}
}