From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTuSo-0005Gu-9g for qemu-devel@nongnu.org; Thu, 01 Nov 2012 09:05:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTuSg-0006c0-Fc for qemu-devel@nongnu.org; Thu, 01 Nov 2012 09:05:38 -0400 Received: from mail-ia0-f173.google.com ([209.85.210.173]:60542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTuSg-000627-9D for qemu-devel@nongnu.org; Thu, 01 Nov 2012 09:05:30 -0400 Received: by mail-ia0-f173.google.com with SMTP id m10so1965034iam.4 for ; Thu, 01 Nov 2012 06:05:30 -0700 (PDT) Sender: fluxion From: Michael Roth Date: Thu, 1 Nov 2012 08:04:30 -0500 Message-Id: <1351775071-7644-29-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1351775071-7644-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1351775071-7644-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 28/29] hpet: qidl_declare HPETState + HPETTimer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, peter.maydell@linaro.org, aliguori@us.ibm.com, quintela@redhat.com, blauwirbel@gmail.com, pbonzini@redhat.com Signed-off-by: Michael Roth --- 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