diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-07-10 23:37:45 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-07-23 10:27:07 -0500 |
commit | 38805e5f096162867a70c7468c654d7f9bb507da (patch) | |
tree | 841b3de2dc1b7c968564c39939398cda0427fb00 /arch/powerpc | |
parent | 9ac4dd301eebb3cd8de801e02bfc91f296e56f63 (diff) |
[POWERPC] Add the ability to find PCI capabilities early on
Added early_find_capability that wraps pci_bus_find_capability and uses
fake_pci_bus() to allow us to call it before we've fully setup the
pci_controller.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/pci_32.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 0adf077f3f3..bfcfa14e831 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c @@ -1468,3 +1468,10 @@ EARLY_PCI_OP(read, dword, u32 *) EARLY_PCI_OP(write, byte, u8) EARLY_PCI_OP(write, word, u16) EARLY_PCI_OP(write, dword, u32) + +extern int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap); +int early_find_capability(struct pci_controller *hose, int bus, int devfn, + int cap) +{ + return pci_bus_find_capability(fake_pci_bus(hose, bus), devfn, cap); +} |