From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTuS7-0004dv-Uk for qemu-devel@nongnu.org; Thu, 01 Nov 2012 09:04:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTuS6-0006B0-KH for qemu-devel@nongnu.org; Thu, 01 Nov 2012 09:04:55 -0400 Received: from mail-ie0-f173.google.com ([209.85.223.173]:62691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTuS6-00064D-El for qemu-devel@nongnu.org; Thu, 01 Nov 2012 09:04:54 -0400 Received: by mail-ie0-f173.google.com with SMTP id 17so3616429iea.4 for ; Thu, 01 Nov 2012 06:04:54 -0700 (PDT) Sender: fluxion From: Michael Roth Date: Thu, 1 Nov 2012 08:04:06 -0500 Message-Id: <1351775071-7644-5-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 04/29] rtc: qidl_declare RTCState 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/mc146818rtc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c index 98839f2..8983d26 100644 --- a/hw/mc146818rtc.c +++ b/hw/mc146818rtc.c @@ -25,6 +25,7 @@ #include "qemu-timer.h" #include "sysemu.h" #include "mc146818rtc.h" +#include "qidl.h" #ifdef TARGET_I386 #include "apic.h" @@ -56,12 +57,14 @@ #define RTC_CLOCK_RATE 32768 #define UIP_HOLD_LENGTH (8 * NSEC_PER_SEC / 32768) -typedef struct RTCState { +typedef struct RTCState RTCState; + +QIDL_DECLARE(RTCState) { ISADevice dev; MemoryRegion io; uint8_t cmos_data[128]; uint8_t cmos_index; - int32_t base_year; + int32_t q_property("base_year", 1980) base_year; uint64_t base_rtc; uint64_t last_update; int64_t offset; @@ -77,11 +80,13 @@ typedef struct RTCState { uint16_t irq_reinject_on_ack_count; uint32_t irq_coalesced; uint32_t period; - QEMUTimer *coalesced_timer; + bool has_coalesced_timer; + QEMUTimer q_optional *coalesced_timer; Notifier clock_reset_notifier; - LostTickPolicy lost_tick_policy; + LostTickPolicy q_property("lost_tick_policy", LOST_TICK_DISCARD) \ + lost_tick_policy; Notifier suspend_notifier; -} RTCState; +}; static void rtc_set_time(RTCState *s); static void rtc_update_time(RTCState *s); -- 1.7.9.5