qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/7] Add scoop post_load callback that sets IRQs to loaded levels
@ 2011-02-11 20:57 Dmitry Eremin-Solenikov
  2011-02-11 20:57 ` [Qemu-devel] [PATCH 2/7] Drop unnecessary inclusions of pxa.h header Dmitry Eremin-Solenikov
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-02-11 20:57 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 hw/zaurus.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/hw/zaurus.c b/hw/zaurus.c
index fca11a5..fb5e228 100644
--- a/hw/zaurus.c
+++ b/hw/zaurus.c
@@ -181,17 +181,34 @@ static int scoop_init(SysBusDevice *dev)
     return 0;
 }
 
+static int scoop_post_load(void *opaque, int version_id)
+{
+    ScoopInfo *s = (ScoopInfo *) opaque;
+    int i;
+    uint32_t level;
+
+    level = s->gpio_level & s->gpio_dir;
+
+    for (i = 0; i < 16; i++) {
+        qemu_set_irq(s->handler[i], (level >> i) & 1);
+    }
+
+    s->prev_level = level;
+
+    return 0;
+}
+
 static bool is_version_0 (void *opaque, int version_id)
 {
     return version_id == 0;
 }
 
-
 static const VMStateDescription vmstate_scoop_regs = {
     .name = "scoop",
     .version_id = 1,
     .minimum_version_id = 0,
     .minimum_version_id_old = 0,
+    .post_load = scoop_post_load,
     .fields = (VMStateField []) {
         VMSTATE_UINT16(status, ScoopInfo),
         VMSTATE_UINT16(power, ScoopInfo),
-- 
1.7.2.3

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

end of thread, other threads:[~2011-02-11 22:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-11 20:57 [Qemu-devel] [PATCH 1/7] Add scoop post_load callback that sets IRQs to loaded levels Dmitry Eremin-Solenikov
2011-02-11 20:57 ` [Qemu-devel] [PATCH 2/7] Drop unnecessary inclusions of pxa.h header Dmitry Eremin-Solenikov
2011-02-11 20:57 ` [Qemu-devel] [PATCH 3/7] mainstone: pass one irq to the mst_fpga instead of the whole PIC Dmitry Eremin-Solenikov
2011-02-11 20:57 ` [Qemu-devel] [PATCH 4/7] tc6393xb: correct NAND isr assertion Dmitry Eremin-Solenikov
2011-02-11 20:57 ` [Qemu-devel] [PATCH 5/7] tosa: we aren't connected to VBus, pass this info to Linux kernel Dmitry Eremin-Solenikov
2011-02-11 20:57 ` [Qemu-devel] [PATCH 6/7] max7310: finish qdev'ication Dmitry Eremin-Solenikov
2011-02-11 20:57 ` [Qemu-devel] [PATCH 7/7] pxa2xx: convert i2c master to use qdev/vmsd Dmitry Eremin-Solenikov
2011-02-11 22:37 ` [Qemu-devel] [PATCH 1/7] Add scoop post_load callback that sets IRQs to loaded levels andrzej zaborowski

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).