Patchwork [V12,19/27] pc: move rtc declarations from pc.h into a dedicated header file.

login
register
mail settings
Submitter Isaku Yamahata
Date Jan. 6, 2010, 2:39 a.m.
Message ID <1262745591-28697-20-git-send-email-yamahata@valinux.co.jp>
Download mbox | patch
Permalink /patch/42266/
State New
Headers show

Comments

Isaku Yamahata - Jan. 6, 2010, 2:39 a.m.
Move rtc_xxx declarations from pc.h into mc146818rtc.h.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/mc146818rtc.h |   10 ++++++++++
 hw/pc.h          |   10 ++--------
 2 files changed, 12 insertions(+), 8 deletions(-)
 create mode 100644 hw/mc146818rtc.h

Patch

diff --git a/hw/mc146818rtc.h b/hw/mc146818rtc.h
new file mode 100644
index 0000000..7211dae
--- /dev/null
+++ b/hw/mc146818rtc.h
@@ -0,0 +1,10 @@ 
+#ifndef MC146818RTC_H
+#define MC146818RTC_H
+
+typedef struct RTCState RTCState;
+
+RTCState *rtc_init(int base_year);
+void rtc_set_memory(RTCState *s, int addr, int val);
+void rtc_set_date(RTCState *s, const struct tm *tm);
+
+#endif /* !MC146818RTC_H */
diff --git a/hw/pc.h b/hw/pc.h
index 7b7639c..b748615 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -3,6 +3,7 @@ 
 
 #include "qemu-common.h"
 #include "isa.h"
+#include "mc146818rtc.h"
 
 /* PC-style peripherals (also used by other machines).  */
 
@@ -88,16 +89,9 @@  void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,
                    target_phys_addr_t base, ram_addr_t size,
                    target_phys_addr_t mask);
 
-/* mc146818rtc.c */
-
-typedef struct RTCState RTCState;
-
-RTCState *rtc_init(int base_year);
-void rtc_set_memory(RTCState *s, int addr, int val);
-void rtc_set_date(RTCState *s, const struct tm *tm);
+/* pc.c */
 void cmos_set_s3_resume_fn(void *opaque, int n, int level);
 
-/* pc.c */
 extern int fd_bootchk;
 
 void pc_register_ferr_irq(qemu_irq irq);