[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 7/7] seabios: acpi: clean up of finding pm device.
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH 7/7] seabios: acpi: clean up of finding pm device. |
Date: |
Mon, 12 Jul 2010 20:47:52 +0900 |
Make it table driven to other chip set.
Signed-off-by: Isaku Yamahata <address@hidden>
---
src/acpi.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/acpi.c b/src/acpi.c
index 32d436f..fa07c37 100644
--- a/src/acpi.c
+++ b/src/acpi.c
@@ -527,6 +527,13 @@ build_srat(void)
return srat;
}
+static const struct pci_device_id acpi_find_tbl[] = {
+ /* PIIX4 Power Management device. */
+ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, NULL),
+
+ PCI_DEVICE_END,
+};
+
struct rsdp_descriptor *RsdpAddr;
#define MAX_ACPI_TABLES 20
@@ -539,8 +546,7 @@ acpi_bios_init(void)
dprintf(3, "init ACPI tables\n");
// This code is hardcoded for PIIX4 Power Management device.
- int bdf = pci_find_device(PCI_VENDOR_ID_INTEL
- , PCI_DEVICE_ID_INTEL_82371AB_3);
+ int bdf = pci_find_init_device(acpi_find_tbl, NULL);
if (bdf < 0)
// Device not found
return;
--
1.7.1.1
- [Qemu-devel] [PATCH 0/7] abstract chipset(i440fx) specific register operation., Isaku Yamahata, 2010/07/12
- [Qemu-devel] [PATCH 3/7] seabios: smm: move out piix4 specific logic to dev-i440fx.c, Isaku Yamahata, 2010/07/12
- [Qemu-devel] [PATCH 5/7] seabios: acpi: move acpi definitions to acpi.h from acpi.c, Isaku Yamahata, 2010/07/12
- [Qemu-devel] [PATCH 1/7] seabios: pci: introduce helper function to find device from table and initialize it., Isaku Yamahata, 2010/07/12
- [Qemu-devel] [PATCH 7/7] seabios: acpi: clean up of finding pm device.,
Isaku Yamahata <=
- [Qemu-devel] [PATCH 4/7] seabios: smm_init: move out i440fx smram operation into dev-i440fx.c, Isaku Yamahata, 2010/07/12
- [Qemu-devel] [PATCH 6/7] seabios: acpi: split out piix4 pm logic., Isaku Yamahata, 2010/07/12
- [Qemu-devel] Re: [SeaBIOS] [PATCH 0/7] abstract chipset(i440fx) specific register operation., Kevin O'Connor, 2010/07/12