aboutsummaryrefslogtreecommitdiff
path: root/hw/slavio_timer.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-01-24 14:28:21 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-01-24 14:28:21 +0000
commit452efba63bc4a2f1f580c96b087cbfae58b81785 (patch)
tree143ae7bac671aa8ae6d1e85efb2dde858d7243a7 /hw/slavio_timer.c
parent07b064e9de65a26a4cb36dfb37c7506ef17407fd (diff)
Sparc32: fix free-run timer
According to Sun4M System Architecture Manual chapter 5.3.2, a limit of 0 will not generate interrupts. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/slavio_timer.c')
-rw-r--r--hw/slavio_timer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/slavio_timer.c b/hw/slavio_timer.c
index cd2cf5772b..ef36fe4c99 100644
--- a/hw/slavio_timer.c
+++ b/hw/slavio_timer.c
@@ -128,7 +128,8 @@ static void slavio_timer_irq(void *opaque)
slavio_timer_get_out(t);
DPRINTF("callback: count %x%08x\n", t->counthigh, t->count);
t->reached = TIMER_REACHED;
- if (!slavio_timer_is_user(tc)) {
+ /* there is no interrupt if user timer or free-run */
+ if (!slavio_timer_is_user(tc) && t->limit != 0) {
qemu_irq_raise(t->irq);
}
}