[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/7] seabios: pci: introduce helper function to find
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH 1/7] seabios: pci: introduce helper function to find device from table and initialize it. |
Date: |
Mon, 12 Jul 2010 20:47:46 +0900 |
introduce helper function to find device from table and initialize it.
pci_find_init_device(). This will be used later.
Signed-off-by: Isaku Yamahata <address@hidden>
---
src/pci.c | 12 ++++++++++++
src/pci.h | 1 +
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/pci.c b/src/pci.c
index c54b084..611d0e2 100644
--- a/src/pci.c
+++ b/src/pci.c
@@ -203,3 +203,15 @@ int pci_init_device(const struct pci_device_id *ids, u16
bdf, void *arg)
}
return -1;
}
+
+int pci_find_init_device(const struct pci_device_id *ids, void *arg)
+{
+ int bdf, max;
+
+ foreachpci(bdf, max) {
+ if (pci_init_device(ids, bdf, arg) == 0) {
+ return bdf;
+ }
+ }
+ return -1;
+}
diff --git a/src/pci.h b/src/pci.h
index fa6a32d..9c3108c 100644
--- a/src/pci.h
+++ b/src/pci.h
@@ -93,6 +93,7 @@ struct pci_device_id {
}
int pci_init_device(const struct pci_device_id *table, u16 bdf, void *arg);
+int pci_find_init_device(const struct pci_device_id *ids, void *arg);
// pirtable.c
void create_pirtable(void);
--
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 <=
- [Qemu-devel] [PATCH 7/7] seabios: acpi: clean up of finding pm device., Isaku Yamahata, 2010/07/12
- [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