This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH 4/8] or1k: Bug fix in timer
- From: Stefan Wallentowitz <stefan dot wallentowitz at tum dot de>
- To: newlib at sourceware dot org
- Date: Sun, 17 May 2015 17:04:26 +0200
- Subject: [PATCH 4/8] or1k: Bug fix in timer
- Authentication-results: sourceware.org; auth=none
Properly set the interrupt pending flag in the timer mode register.
libgloss/Changelog:
* or1k/timer.c: Properly set interrupt flags
>From 9c8ffc6fe363b33181cbfd5625e7f6a87de2d3f7 Mon Sep 17 00:00:00 2001
From: Stefan Wallentowitz <stefan.wallentowitz@tum.de>
Date: Wed, 15 Apr 2015 08:48:44 +0200
Subject: [PATCH 4/8] or1k: Bug fix in timer
Properly set the interrupt pending flag in the timer mode register.
libgloss/Changelog:
* or1k/timer.c: Properly set interrupt flags
---
libgloss/or1k/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libgloss/or1k/timer.c b/libgloss/or1k/timer.c
index 27a24a1..08afa60 100644
--- a/libgloss/or1k/timer.c
+++ b/libgloss/or1k/timer.c
@@ -35,7 +35,7 @@ _or1k_timer_interrupt_handler(void)
uint32_t ttmr = or1k_mfspr(OR1K_SPR_TICK_TTMR_ADDR);
ttmr = OR1K_SPR_TICK_TTMR_IE_SET(ttmr, 1);
ttmr = OR1K_SPR_TICK_TTMR_MODE_SET(ttmr, OR1K_SPR_TICK_TTMR_MODE_RESTART);
- ttmr = OR1K_SPR_TICK_TTMR_IE_SET(ttmr, 1);
+ ttmr = OR1K_SPR_TICK_TTMR_IP_SET(ttmr, 0);
or1k_mtspr(OR1K_SPR_TICK_TTMR_ADDR, ttmr);
}
--
2.1.4