qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] LEON3 timer patch


From: Gabriele Galeotti
Subject: [Qemu-devel] LEON3 timer patch
Date: Thu, 30 Mar 2017 21:30:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1


Hi all.
According to "GR712RC Dual-Core LEON3FT SPARC V8 Processor User’s Manual",
"11.3 Registers", pg 87-88, Table 55 Timer control register, the IP "interrupt pending"
bit:

Interrupt Pending (IP): The core sets this bit to ‘1’ when an interrupt is signalled. This bit remains ‘1’
until cleared by writing ‘0’ to this bit.

Thus the code handling should changed so that the pending bit is mantained when "value" has a 1
in that position.


Signed-off-by: Gabriele Galeotti <address@hidden>
---
 hw/timer/grlib_gptimer.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/hw/timer/grlib_gptimer.c b/hw/timer/grlib_gptimer.c
index 4ed96e9..c555ae8 100644
--- a/hw/timer/grlib_gptimer.c
+++ b/hw/timer/grlib_gptimer.c
@@ -276,9 +276,6 @@ static void grlib_gptimer_write(void *opaque, hwaddr addr,
             trace_grlib_gptimer_writel(id, addr, value);
.
             if (value & GPTIMER_INT_PENDING) {
-                /* clear pending bit */
-                value &= ~GPTIMER_INT_PENDING;
-            } else {
                 /* keep pending bit */
                 value |= unit->timers[id].config & GPTIMER_INT_PENDING;
             }
--.
2.9.0





reply via email to

[Prev in Thread] Current Thread [Next in Thread]