~ubuntu-branches/ubuntu/trusty/qemu/trusty

« back to all changes in this revision

Viewing changes to debian/patches/linaro/0019-omap_i2c-add-vmstate.patch

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2014-02-04 12:13:08 UTC
  • mfrom: (10.1.45 sid)
  • Revision ID: package-import@ubuntu.com-20140204121308-1xq92lrfs75agw2g
Tags: 1.7.0+dfsg-3ubuntu1~ppa1
* Merge 1.7.0+dfsg-3 from debian.  Remaining changes:
  - debian/patches/ubuntu:
    * expose-vmx_qemu64cpu.patch
    * linaro (omap3) and arm64 patches
    * ubuntu/target-ppc-add-stubs-for-kvm-breakpoints: fix FTBFS
      on ppc
    * ubuntu/CVE-2013-4377.patch: fix denial of service via virtio
  - debian/qemu-system-x86.modprobe: set kvm_intel nested=1 options
  - debian/control:
    * add arm64 to Architectures
    * add qemu-common and qemu-system-aarch64 packages
  - debian/qemu-system-common.install: add debian/tmp/usr/lib
  - debian/qemu-system-common.preinst: add kvm group
  - debian/qemu-system-common.postinst: remove acl placed by udev,
    and add udevadm trigger.
  - qemu-system-x86.links: add eepro100.rom, remove pxe-virtio,
    pxe-e1000 and pxe-rtl8139.
  - add qemu-system-x86.qemu-kvm.upstart and .default
  - qemu-user-static.postinst-in: remove arm64 binfmt
  - debian/rules:
    * allow parallel build
    * add aarch64 to system_targets and sys_systems
    * add qemu-kvm-spice links
    * install qemu-system-x86.modprobe
  - add debian/qemu-system-common.links for OVMF.fd link
* Remove kvm-img, kvm-nbd, kvm-ifup and kvm-ifdown symlinks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From a0913860252bacaf78c05cc08c808c2a82dcde60 Mon Sep 17 00:00:00 2001
2
 
From: Peter Maydell <peter.maydell@linaro.org>
3
 
Date: Mon, 18 Feb 2013 16:58:26 +0000
4
 
Subject: [PATCH 19/70] omap_i2c: add vmstate
5
 
 
6
 
XXX shouldn't be using vmstate_register
7
 
---
8
 
 hw/i2c/omap_i2c.c | 35 +++++++++++++++++++++++++++++++++++
9
 
 1 file changed, 35 insertions(+)
10
 
 
11
 
diff --git a/hw/i2c/omap_i2c.c b/hw/i2c/omap_i2c.c
12
 
index 565a3cd..521bd5c 100644
13
 
--- a/hw/i2c/omap_i2c.c
14
 
+++ b/hw/i2c/omap_i2c.c
15
 
@@ -574,6 +574,40 @@ static const MemoryRegionOps omap_i2c_ops = {
16
 
     .endianness = DEVICE_NATIVE_ENDIAN,
17
 
 };
18
 
 
19
 
+static int omap_i2c_bus_post_load(void *opaque, int version_id)
20
 
+{
21
 
+    OMAPI2CState *s = opaque;
22
 
+    omap_i2c_interrupts_update(s);
23
 
+    return 0;
24
 
+}
25
 
+
26
 
+static const VMStateDescription vmstate_omap_i2c = {
27
 
+    .name = "omap_i2c",
28
 
+    .version_id = 1,
29
 
+    .minimum_version_id = 1,
30
 
+    .post_load = omap_i2c_bus_post_load,
31
 
+    .fields = (VMStateField[]) {
32
 
+        VMSTATE_UINT16(mask, OMAPI2CState),
33
 
+        VMSTATE_UINT16(stat, OMAPI2CState),
34
 
+        VMSTATE_UINT16(we, OMAPI2CState),
35
 
+        VMSTATE_UINT16(dma, OMAPI2CState),
36
 
+        VMSTATE_UINT16(count, OMAPI2CState),
37
 
+        VMSTATE_INT32(count_cur, OMAPI2CState),
38
 
+        VMSTATE_UINT16(sysc, OMAPI2CState),
39
 
+        VMSTATE_UINT16(control, OMAPI2CState),
40
 
+        VMSTATE_UINT16_ARRAY(own_addr, OMAPI2CState, 4),
41
 
+        VMSTATE_UINT16(slave_addr, OMAPI2CState),
42
 
+        VMSTATE_UINT8(sblock, OMAPI2CState),
43
 
+        VMSTATE_UINT8(divider, OMAPI2CState),
44
 
+        VMSTATE_UINT16_ARRAY(times, OMAPI2CState, 2),
45
 
+        VMSTATE_UINT16(test, OMAPI2CState),
46
 
+        VMSTATE_INT32(fifostart, OMAPI2CState),
47
 
+        VMSTATE_INT32(fifolen, OMAPI2CState),
48
 
+        VMSTATE_UINT8_ARRAY(fifo, OMAPI2CState, I2C_MAX_FIFO_SIZE),
49
 
+        VMSTATE_END_OF_LIST()
50
 
+    }
51
 
+};
52
 
+
53
 
 static int omap_i2c_init(SysBusDevice *sbd)
54
 
 {
55
 
     DeviceState *dev = DEVICE(sbd);
56
 
@@ -611,6 +645,7 @@ static void omap_i2c_class_init(ObjectClass *klass, void *data)
57
 
     k->init = omap_i2c_init;
58
 
     dc->props = omap_i2c_properties;
59
 
     dc->reset = omap_i2c_reset;
60
 
+    dc->vmsd = &vmstate_omap_i2c;
61
 
 }
62
 
 
63
 
 static const TypeInfo omap_i2c_info = {
64
 
1.8.5.2
65