Patchwork [for-1.5,v2,02/15] xilinx_spips: Make interrupts clear on read

login
register
mail settings
Submitter Peter Crosthwaite
Date April 19, 2013, 2:04 a.m.
Message ID <1ef58cf6a871b74f59addd5cbdbbd26bb001dc55.1366335998.git.peter.crosthwaite@xilinx.com>
Download mbox | patch
Permalink /patch/237803/
State New
Headers show

Comments

Peter Crosthwaite - April 19, 2013, 2:04 a.m.
From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

By default these interrupts are clear on read.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---

 hw/ssi/xilinx_spips.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Patch

diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c
index 734adf0..261d948 100644
--- a/hw/ssi/xilinx_spips.c
+++ b/hw/ssi/xilinx_spips.c
@@ -330,6 +330,10 @@  static uint64_t xilinx_spips_read(void *opaque, hwaddr addr,
         mask = 0x0002FFFF;
         break;
     case R_INTR_STATUS:
+        ret = s->regs[addr] & IXR_ALL;
+        s->regs[addr] = 0;
+        DB_PRINT("addr=" TARGET_FMT_plx " = %x\n", addr * 4, ret);
+        return ret;
     case R_INTR_MASK:
         mask = IXR_ALL;
         break;