diff options
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 6fa4dd2a3b9e..2461033a7987 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -286,6 +286,7 @@ struct pci_dev { | |||
286 | unsigned int irq; | 286 | unsigned int irq; |
287 | struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */ | 287 | struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */ |
288 | 288 | ||
289 | bool match_driver; /* Skip attaching driver */ | ||
289 | /* These fields are used by common fixups */ | 290 | /* These fields are used by common fixups */ |
290 | unsigned int transparent:1; /* Transparent PCI bridge */ | 291 | unsigned int transparent:1; /* Transparent PCI bridge */ |
291 | unsigned int multifunction:1;/* Part of multi-function device */ | 292 | unsigned int multifunction:1;/* Part of multi-function device */ |
@@ -378,6 +379,8 @@ void pci_set_host_bridge_release(struct pci_host_bridge *bridge, | |||
378 | void (*release_fn)(struct pci_host_bridge *), | 379 | void (*release_fn)(struct pci_host_bridge *), |
379 | void *release_data); | 380 | void *release_data); |
380 | 381 | ||
382 | int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge); | ||
383 | |||
381 | /* | 384 | /* |
382 | * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond | 385 | * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond |
383 | * to P2P or CardBus bridge windows) go in a table. Additional ones (for | 386 | * to P2P or CardBus bridge windows) go in a table. Additional ones (for |
@@ -674,6 +677,7 @@ extern struct list_head pci_root_buses; /* list of all known PCI buses */ | |||
674 | /* Some device drivers need know if pci is initiated */ | 677 | /* Some device drivers need know if pci is initiated */ |
675 | extern int no_pci_devices(void); | 678 | extern int no_pci_devices(void); |
676 | 679 | ||
680 | void pcibios_resource_survey_bus(struct pci_bus *bus); | ||
677 | void pcibios_fixup_bus(struct pci_bus *); | 681 | void pcibios_fixup_bus(struct pci_bus *); |
678 | int __must_check pcibios_enable_device(struct pci_dev *, int mask); | 682 | int __must_check pcibios_enable_device(struct pci_dev *, int mask); |
679 | /* Architecture specific versions may override this (weak) */ | 683 | /* Architecture specific versions may override this (weak) */ |
@@ -1700,12 +1704,21 @@ static inline bool pci_is_pcie(struct pci_dev *dev) | |||
1700 | } | 1704 | } |
1701 | 1705 | ||
1702 | /** | 1706 | /** |
1707 | * pcie_caps_reg - get the PCIe Capabilities Register | ||
1708 | * @dev: PCI device | ||
1709 | */ | ||
1710 | static inline u16 pcie_caps_reg(const struct pci_dev *dev) | ||
1711 | { | ||
1712 | return dev->pcie_flags_reg; | ||
1713 | } | ||
1714 | |||
1715 | /** | ||
1703 | * pci_pcie_type - get the PCIe device/port type | 1716 | * pci_pcie_type - get the PCIe device/port type |
1704 | * @dev: PCI device | 1717 | * @dev: PCI device |
1705 | */ | 1718 | */ |
1706 | static inline int pci_pcie_type(const struct pci_dev *dev) | 1719 | static inline int pci_pcie_type(const struct pci_dev *dev) |
1707 | { | 1720 | { |
1708 | return (dev->pcie_flags_reg & PCI_EXP_FLAGS_TYPE) >> 4; | 1721 | return (pcie_caps_reg(dev) & PCI_EXP_FLAGS_TYPE) >> 4; |
1709 | } | 1722 | } |
1710 | 1723 | ||
1711 | void pci_request_acs(void); | 1724 | void pci_request_acs(void); |