From 067866d61cba3923eae78e96b509e237513de307 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 23 Feb 2012 13:45:15 +0100 Subject: 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 Signed-off-by: Anthony Liguori --- hw/acpi.h | 48 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 25 deletions(-) (limited to 'hw') diff --git a/hw/acpi.h b/hw/acpi.h index c141e65f4..5c43b7d0c 100644 --- a/hw/acpi.h +++ b/hw/acpi.h @@ -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); -- cgit v1.2.3