aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index acf8f24037cd..085187be29c7 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -214,6 +214,7 @@ struct pci_dev {
214 unsigned int broken_parity_status:1; /* Device generates false positive parity */ 214 unsigned int broken_parity_status:1; /* Device generates false positive parity */
215 unsigned int msi_enabled:1; 215 unsigned int msi_enabled:1;
216 unsigned int msix_enabled:1; 216 unsigned int msix_enabled:1;
217 unsigned int ari_enabled:1; /* ARI forwarding */
217 unsigned int is_managed:1; 218 unsigned int is_managed:1;
218 unsigned int is_pcie:1; 219 unsigned int is_pcie:1;
219 pci_dev_flags_t dev_flags; 220 pci_dev_flags_t dev_flags;
@@ -347,7 +348,6 @@ struct pci_bus_region {
347struct pci_dynids { 348struct pci_dynids {
348 spinlock_t lock; /* protects list, index */ 349 spinlock_t lock; /* protects list, index */
349 struct list_head list; /* for IDs added at runtime */ 350 struct list_head list; /* for IDs added at runtime */
350 unsigned int use_driver_data:1; /* pci_device_id->driver_data is used */
351}; 351};
352 352
353/* ---------------------------------------------------------------- */ 353/* ---------------------------------------------------------------- */
@@ -456,8 +456,8 @@ struct pci_driver {
456 456
457/** 457/**
458 * PCI_VDEVICE - macro used to describe a specific pci device in short form 458 * PCI_VDEVICE - macro used to describe a specific pci device in short form
459 * @vend: the vendor name 459 * @vendor: the vendor name
460 * @dev: the 16 bit PCI Device ID 460 * @device: the 16 bit PCI Device ID
461 * 461 *
462 * This macro is used to create a struct pci_device_id that matches a 462 * This macro is used to create a struct pci_device_id that matches a
463 * specific PCI device. The subvendor, and subdevice fields will be set 463 * specific PCI device. The subvendor, and subdevice fields will be set
@@ -645,6 +645,7 @@ pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state);
645bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); 645bool pci_pme_capable(struct pci_dev *dev, pci_power_t state);
646void pci_pme_active(struct pci_dev *dev, bool enable); 646void pci_pme_active(struct pci_dev *dev, bool enable);
647int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); 647int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable);
648int pci_wake_from_d3(struct pci_dev *dev, bool enable);
648pci_power_t pci_target_state(struct pci_dev *dev); 649pci_power_t pci_target_state(struct pci_dev *dev);
649int pci_prepare_to_sleep(struct pci_dev *dev); 650int pci_prepare_to_sleep(struct pci_dev *dev);
650int pci_back_from_sleep(struct pci_dev *dev); 651int pci_back_from_sleep(struct pci_dev *dev);
@@ -725,7 +726,7 @@ enum pci_dma_burst_strategy {
725}; 726};
726 727
727struct msix_entry { 728struct msix_entry {
728 u16 vector; /* kernel uses to write allocated vector */ 729 u32 vector; /* kernel uses to write allocated vector */
729 u16 entry; /* driver uses to specify entry, OS writes */ 730 u16 entry; /* driver uses to specify entry, OS writes */
730}; 731};
731 732
@@ -1118,5 +1119,20 @@ static inline void pci_mmcfg_early_init(void) { }
1118static inline void pci_mmcfg_late_init(void) { } 1119static inline void pci_mmcfg_late_init(void) { }
1119#endif 1120#endif
1120 1121
1122#ifdef CONFIG_HAS_IOMEM
1123static inline void * pci_ioremap_bar(struct pci_dev *pdev, int bar)
1124{
1125 /*
1126 * Make sure the BAR is actually a memory resource, not an IO resource
1127 */
1128 if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) {
1129 WARN_ON(1);
1130 return NULL;
1131 }
1132 return ioremap_nocache(pci_resource_start(pdev, bar),
1133 pci_resource_len(pdev, bar));
1134}
1135#endif
1136
1121#endif /* __KERNEL__ */ 1137#endif /* __KERNEL__ */
1122#endif /* LINUX_PCI_H */ 1138#endif /* LINUX_PCI_H */