]> git.proxmox.com Git - qemu.git/commitdiff
acpi: move around structs
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 23 Feb 2012 12:45:15 +0000 (13:45 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 24 Feb 2012 19:36:02 +0000 (13:36 -0600)
Group all structs at the top of hw/acpi.h.
Just moving around lines, no code changes.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/acpi.h

index c141e65f4f61419c57b4450273294dbc6c0374a0..5c43b7d0c43a7befd4ed62fd72689d6bbfe8fcd6 100644 (file)
--- a/hw/acpi.h
+++ b/hw/acpi.h
 /* PM2_CNT */
 #define ACPI_BITMASK_ARB_DISABLE                0x0001
 
-/* PM_TMR */
-struct ACPIPMTimer;
+/* structs */
 typedef struct ACPIPMTimer ACPIPMTimer;
+typedef struct ACPIPM1EVT ACPIPM1EVT;
+typedef struct ACPIPM1CNT ACPIPM1CNT;
+typedef struct ACPIGPE ACPIGPE;
 
 typedef void (*acpi_update_sci_fn)(ACPIPMTimer *tmr);
 
@@ -86,6 +88,25 @@ struct ACPIPMTimer {
     acpi_update_sci_fn update_sci;
 };
 
+struct ACPIPM1EVT {
+    uint16_t sts;
+    uint16_t en;
+};
+
+struct ACPIPM1CNT {
+    uint16_t cnt;
+    qemu_irq cmos_s3;
+};
+
+struct ACPIGPE {
+    uint32_t blk;
+    uint8_t len;
+
+    uint8_t *sts;
+    uint8_t *en;
+};
+
+/* PM_TMR */
 void acpi_pm_tmr_update(ACPIPMTimer *tmr, bool enable);
 void acpi_pm_tmr_calc_overflow_time(ACPIPMTimer *tmr);
 uint32_t acpi_pm_tmr_get(ACPIPMTimer *tmr);
@@ -100,26 +121,12 @@ static inline int64_t acpi_pm_tmr_get_clock(void)
 }
 
 /* PM1a_EVT: piix and ich9 don't implement PM1b. */
-struct ACPIPM1EVT
-{
-    uint16_t sts;
-    uint16_t en;
-};
-typedef struct ACPIPM1EVT ACPIPM1EVT;
-
 uint16_t acpi_pm1_evt_get_sts(ACPIPM1EVT *pm1, int64_t overflow_time);
 void acpi_pm1_evt_write_sts(ACPIPM1EVT *pm1, ACPIPMTimer *tmr, uint16_t val);
 void acpi_pm1_evt_power_down(ACPIPM1EVT *pm1, ACPIPMTimer *tmr);
 void acpi_pm1_evt_reset(ACPIPM1EVT *pm1);
 
 /* PM1a_CNT: piix and ich9 don't implement PM1b CNT. */
-struct ACPIPM1CNT {
-    uint16_t cnt;
-
-    qemu_irq cmos_s3;
-};
-typedef struct ACPIPM1CNT ACPIPM1CNT;
-
 void acpi_pm1_cnt_init(ACPIPM1CNT *pm1_cnt, qemu_irq cmos_s3);
 void acpi_pm1_cnt_write(ACPIPM1EVT *pm1a, ACPIPM1CNT *pm1_cnt, uint16_t val);
 void acpi_pm1_cnt_update(ACPIPM1CNT *pm1_cnt,
@@ -127,15 +134,6 @@ void acpi_pm1_cnt_update(ACPIPM1CNT *pm1_cnt,
 void acpi_pm1_cnt_reset(ACPIPM1CNT *pm1_cnt);
 
 /* GPE0 */
-struct ACPIGPE {
-    uint32_t blk;
-    uint8_t len;
-
-    uint8_t *sts;
-    uint8_t *en;
-};
-typedef struct ACPIGPE ACPIGPE;
-
 void acpi_gpe_init(ACPIGPE *gpe, uint8_t len);
 void acpi_gpe_blk(ACPIGPE *gpe, uint32_t blk);
 void acpi_gpe_reset(ACPIGPE *gpe);