qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org, Paul Brook <paul@codesourcery.com>
Subject: [Qemu-devel] [PATCH 1/9] cadence_ttc: Fix 'clear on read' behavior
Date: Fri, 12 Oct 2012 12:38:24 +0100	[thread overview]
Message-ID: <1350041912-12595-2-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1350041912-12595-1-git-send-email-peter.maydell@linaro.org>

From: Soren Brinkmann <soren.brinkmann@xilinx.com>

A missing call to qemu_set_irq() when reading the IRQ register
required SW to write to the IRQ register to acknowledge an
interrupt. With this patch the behavior is fixed:
 - Reading the interrupt register clears it and updates the timers
   interrupt status
 - Writes to the interrupt register are ignored

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/cadence_ttc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/cadence_ttc.c b/hw/cadence_ttc.c
index dd02f86..77b6976 100644
--- a/hw/cadence_ttc.c
+++ b/hw/cadence_ttc.c
@@ -274,6 +274,7 @@ static uint32_t cadence_ttc_read_imp(void *opaque, target_phys_addr_t offset)
         /* cleared after read */
         value = s->reg_intr;
         s->reg_intr = 0;
+        cadence_timer_update(s);
         return value;
 
     case 0x60: /* interrupt enable */
@@ -355,7 +356,6 @@ static void cadence_ttc_write(void *opaque, target_phys_addr_t offset,
     case 0x54: /* interrupt register */
     case 0x58:
     case 0x5c:
-        s->reg_intr &= (~value & 0xfff);
         break;
 
     case 0x60: /* interrupt enable */
-- 
1.7.9.5

  reply	other threads:[~2012-10-12 11:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-12 11:38 [Qemu-devel] [PULL 0/9] arm-devs queue Peter Maydell
2012-10-12 11:38 ` Peter Maydell [this message]
2012-10-12 11:38 ` [Qemu-devel] [PATCH 2/9] hw/arm_gic.c: Fix improper DPRINTF output Peter Maydell
2012-10-12 11:38 ` [Qemu-devel] [PATCH 3/9] hw/ds1338: Fix mishandling of register pointer Peter Maydell
2012-10-12 11:38 ` [Qemu-devel] [PATCH 4/9] hw/ds1338: Recapture current time when register pointer wraps around Peter Maydell
2012-10-12 11:38 ` [Qemu-devel] [PATCH 5/9] hw/ds1338: Remove 'now' field from state struct Peter Maydell
2012-10-12 11:38 ` [Qemu-devel] [PATCH 6/9] hw/ds1338: Implement state save/restore Peter Maydell
2012-10-12 11:38 ` [Qemu-devel] [PATCH 7/9] versatilepb: add gpio pl061 support Peter Maydell
2012-10-12 11:38 ` [Qemu-devel] [PATCH 8/9] zynq_slcr: Fixed ResetValues enum Peter Maydell
2012-10-12 11:38 ` [Qemu-devel] [PATCH 9/9] arm_gic: Rename gic_state to GICState Peter Maydell
2012-10-12 19:16 ` [Qemu-devel] [PULL 0/9] arm-devs queue Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1350041912-12595-2-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=anthony@codemonkey.ws \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).