All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] LEON3 timer patch
@ 2017-03-30 19:30 Gabriele Galeotti
  2017-04-03 16:56 ` Fabien Chouteau
  0 siblings, 1 reply; 2+ messages in thread
From: Gabriele Galeotti @ 2017-03-30 19:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: chouteau


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 <gabriele.galeotti.xyz@gmail.com>
---
  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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-03 16:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-30 19:30 [Qemu-devel] LEON3 timer patch Gabriele Galeotti
2017-04-03 16:56 ` Fabien Chouteau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.