[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 28/29] hpet: qidl_declare HPETState + HPETTimer
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 28/29] hpet: qidl_declare HPETState + HPETTimer |
Date: |
Thu, 1 Nov 2012 08:04:30 -0500 |
Signed-off-by: Michael Roth <address@hidden>
---
hw/hpet.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/hw/hpet.c b/hw/hpet.c
index 50ac067..3beb61e 100644
--- a/hw/hpet.c
+++ b/hw/hpet.c
@@ -32,6 +32,7 @@
#include "sysbus.h"
#include "mc146818rtc.h"
#include "i8254.h"
+#include "qidl.h"
//#define HPET_DEBUG
#ifdef HPET_DEBUG
@@ -42,11 +43,13 @@
#define HPET_MSI_SUPPORT 0
-struct HPETState;
-typedef struct HPETTimer { /* timers */
+typedef struct HPETTimer HPETTimer;
+typedef struct HPETState HPETState;
+
+QIDL_DECLARE(HPETTimer) { /* timers */
uint8_t tn; /*timer number*/
QEMUTimer *qemu_timer;
- struct HPETState *state;
+ struct HPETState q_elsewhere *state; /* parent state */
/* Memory-mapped, software visible timer registers */
uint64_t config; /* configuration/cap */
uint64_t cmp; /* comparator */
@@ -56,9 +59,9 @@ typedef struct HPETTimer { /* timers */
uint8_t wrap_flag; /* timer pop will indicate wrap for one-shot 32-bit
* mode. Next pop will be actual timer expiration.
*/
-} HPETTimer;
+};
-typedef struct HPETState {
+QIDL_DECLARE(HPETState) {
SysBusDevice busdev;
MemoryRegion iomem;
uint64_t hpet_offset;
@@ -75,7 +78,7 @@ typedef struct HPETState {
uint64_t isr; /* interrupt status reg */
uint64_t hpet_counter; /* main counter */
uint8_t hpet_id; /* instance id */
-} HPETState;
+};
static uint32_t hpet_in_legacy_mode(HPETState *s)
{
--
1.7.9.5
- [Qemu-devel] [PATCH 17/29] piix3: qidl_declare PIIX3State, (continued)
- [Qemu-devel] [PATCH 17/29] piix3: qidl_declare PIIX3State, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 25/29] ide: add qom property for isa-ide state, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 18/29] piix3: add qom property for PIIX3 state, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 19/29] shpc: qidl_declare SHPCDevice, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 26/29] ide: qidl_declare BMDMAState + PCIIDEState, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 24/29] ide: qidl_declare ISAIDEState, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 16/29] i440fx: a qom property for i440FX state, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 12/29] cirrus: add qom property for cirrus-vga state, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 20/29] pci_bridge: qidl_declare PCIBridge, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 11/29] cirrus: qidl_declare PCICirrusVGAState + CirrusVGAState, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 28/29] hpet: qidl_declare HPETState + HPETTimer,
Michael Roth <=
- [Qemu-devel] [PATCH 03/29] isa: qidl_declare ISADevice, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 08/29] pci: use qidl_declare'd properties for TYPE_PCI_DEVICE, Michael Roth, 2012/11/01