diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-02-23 13:45:15 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-02-24 13:36:02 -0600 |
commit | 067866d61cba3923eae78e96b509e237513de307 (patch) | |
tree | 1d3fba9f67db4c82477ca0d4b7ba466624f8d31e | |
parent | 85f38553031b1a6e07f786c9ab0d403af7252b4f (diff) | |
download | hqemu-067866d61cba3923eae78e96b509e237513de307.zip hqemu-067866d61cba3923eae78e96b509e237513de307.tar.gz |
acpi: move around structs
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>
-rw-r--r-- | hw/acpi.h | 48 |
1 files changed, 23 insertions, 25 deletions
@@ -73,9 +73,11 @@ /* 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); |