diff options
Diffstat (limited to 'src/include/device')
-rw-r--r-- | src/include/device/pci.h | 1 | ||||
-rw-r--r-- | src/include/device/pci_def.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/include/device/pci.h b/src/include/device/pci.h index be91ed353e..1741c0d1e9 100644 --- a/src/include/device/pci.h +++ b/src/include/device/pci.h @@ -79,6 +79,7 @@ unsigned pci_find_capability(device_t dev, unsigned cap); struct resource *pci_get_resource(struct device *dev, unsigned long index); void pci_dev_set_subsystem(device_t dev, unsigned vendor, unsigned device); void pci_dev_init(struct device *dev); +unsigned int pci_match_simple_dev(device_t dev, pci_devfn_t sdev); void pci_assign_irqs(unsigned bus, unsigned slot, const unsigned char pIntAtoD[4]); diff --git a/src/include/device/pci_def.h b/src/include/device/pci_def.h index ac20659f10..dae4e685b5 100644 --- a/src/include/device/pci_def.h +++ b/src/include/device/pci_def.h @@ -474,4 +474,8 @@ #define PCI_FUNC(devfn) ((devfn) & 0x07) #define PCI_BDF(bus,dev,func) ((bus) << 16 | (dev) << 11 | (func) << 8) +/* Translation from PCI_DEV() to devicetree bus and path.pci.devfn. */ +#define PCI_DEV2DEVFN(sdev) (((sdev)>>12) & 0xff) +#define PCI_DEV2SEGBUS(sdev) (((sdev)>>20) & 0xfff) + #endif /* PCI_DEF_H */ |