diff options
author | zhanghailiang <zhang.zhanghailiang@huawei.com> | 2014-08-21 17:23:40 +0800 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2014-08-22 21:13:21 -0400 |
commit | 2e73b1d9c5aaed696ed496203397ecacce1b2510 (patch) | |
tree | b2688c2451d5b26799312b005e68dc7f63b171e7 /src/fw | |
parent | e710447ef1d2bd4e61e12b210039c00fbeacf624 (diff) | |
download | seabios-hppa-2e73b1d9c5aaed696ed496203397ecacce1b2510.zip seabios-hppa-2e73b1d9c5aaed696ed496203397ecacce1b2510.tar.gz seabios-hppa-2e73b1d9c5aaed696ed496203397ecacce1b2510.tar.bz2 |
acpi: use specified macro instead of magic-number
Instead of magic numbers, use specified macros for FADT Fixed Feature Flags.
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Diffstat (limited to 'src/fw')
-rw-r--r-- | src/fw/acpi.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/fw/acpi.c b/src/fw/acpi.c index 47e4c07..ecd1adc 100644 --- a/src/fw/acpi.c +++ b/src/fw/acpi.c @@ -59,9 +59,11 @@ static void piix4_fadt_setup(struct pci_device *pci, void *arg) fadt->gpe0_blk_len = PIIX_GPE0_BLK_LEN; fadt->plvl2_lat = cpu_to_le16(0xfff); // C2 state not supported fadt->plvl3_lat = cpu_to_le16(0xfff); // C3 state not supported - /* WBINVD + PROC_C1 + SLP_BUTTON + RTC_S4 + USE_PLATFORM_CLOCK */ - fadt->flags = cpu_to_le32((1 << 0) | (1 << 2) | (1 << 5) | (1 << 7) | - (1 << 15)); + fadt->flags = cpu_to_le32(ACPI_FADT_F_WBINVD | + ACPI_FADT_F_PROC_C1 | + ACPI_FADT_F_SLP_BUTTON | + ACPI_FADT_F_RTC_S4 | + ACPI_FADT_F_USE_PLATFORM_CLOCK); } /* PCI_VENDOR_ID_INTEL && PCI_DEVICE_ID_INTEL_ICH9_LPC */ @@ -85,9 +87,11 @@ static void ich9_lpc_fadt_setup(struct pci_device *dev, void *arg) fadt->gpe0_blk_len = ICH9_PMIO_GPE0_BLK_LEN; fadt->plvl2_lat = cpu_to_le16(0xfff); // C2 state not supported fadt->plvl3_lat = cpu_to_le16(0xfff); // C3 state not supported - /* WBINVD + PROC_C1 + SLP_BUTTON + RTC_S4 + USE_PLATFORM_CLOCK */ - fadt->flags = cpu_to_le32((1 << 0) | (1 << 2) | (1 << 5) | (1 << 7) | - (1 << 15)); + fadt->flags = cpu_to_le32(ACPI_FADT_F_WBINVD | + ACPI_FADT_F_PROC_C1 | + ACPI_FADT_F_SLP_BUTTON | + ACPI_FADT_F_RTC_S4 | + ACPI_FADT_F_USE_PLATFORM_CLOCK); } static const struct pci_device_id fadt_init_tbl[] = { |