diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/device/pci_early.c | 7 | ||||
-rw-r--r-- | src/include/device/pci.h | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/device/pci_early.c b/src/device/pci_early.c index e31287e8bf..e690211c43 100644 --- a/src/device/pci_early.c +++ b/src/device/pci_early.c @@ -25,8 +25,7 @@ #include <delay.h> #ifdef __PRE_RAM__ - -unsigned pci_find_next_capability(device_t dev, unsigned cap, unsigned last) +unsigned pci_find_next_capability(pci_devfn_t dev, unsigned cap, unsigned last) { unsigned pos = 0; u16 status; @@ -69,11 +68,11 @@ unsigned pci_find_next_capability(device_t dev, unsigned cap, unsigned last) return 0; } -unsigned pci_find_capability(device_t dev, unsigned cap) +unsigned pci_find_capability(pci_devfn_t dev, unsigned cap) { return pci_find_next_capability(dev, cap, 0); } -#endif +#endif /* __PRE_RAM__ */ #if CONFIG_EARLY_PCI_BRIDGE diff --git a/src/include/device/pci.h b/src/include/device/pci.h index 81759706aa..0670da4822 100644 --- a/src/include/device/pci.h +++ b/src/include/device/pci.h @@ -102,8 +102,14 @@ static inline const struct pci_operations *ops_pci(device_t dev) #endif /* ! __SIMPLE_DEVICE__ */ +#ifdef __PRE_RAM__ +unsigned pci_find_next_capability(pci_devfn_t dev, unsigned cap, unsigned last); +unsigned pci_find_capability(pci_devfn_t dev, unsigned cap); +#else /* !__PRE_RAM__ */ unsigned pci_find_next_capability(device_t dev, unsigned cap, unsigned last); unsigned pci_find_capability(device_t dev, unsigned cap); +#endif /* __PRE_RAM__ */ + void pci_early_bridge_init(void); int pci_early_device_probe(u8 bus, u8 dev, u32 mmio_base); |