summaryrefslogtreecommitdiff
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2016-09-01 09:04:55 -0500
committerBjorn Helgaas <bhelgaas@google.com>2016-09-01 09:04:55 -0500
commit9e18ad98ca71ca0cfcadf633547409829773f36a (patch)
tree66a761b8f3db00623fc112e32af55d909c628dcf /include/linux/pci.h
parenta4589a660662d16336353b1c66ad18e0a0a3eb1e (diff)
parent8b2ec318eece89be5e33d5313a25461a55a3177a (diff)
Merge branch 'pci/ptm' into next
* pci/ptm: PCI: Add PTM clock granularity information PCI: Add pci_enable_ptm() for drivers to enable PTM on endpoints PCI: Add Precision Time Measurement (PTM) support
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 2599a980340f..7256f33b6a15 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -367,6 +367,12 @@ struct pci_dev {
int rom_attr_enabled; /* has display of the rom attribute been enabled? */
struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */
struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */
+
+#ifdef CONFIG_PCIE_PTM
+ unsigned int ptm_root:1;
+ unsigned int ptm_enabled:1;
+ u8 ptm_granularity;
+#endif
#ifdef CONFIG_PCI_MSI
const struct attribute_group **msi_irq_groups;
#endif
@@ -1402,6 +1408,13 @@ static inline void pci_disable_ats(struct pci_dev *d) { }
static inline int pci_ats_queue_depth(struct pci_dev *d) { return -ENODEV; }
#endif
+#ifdef CONFIG_PCIE_PTM
+int pci_enable_ptm(struct pci_dev *dev, u8 *granularity);
+#else
+static inline int pci_enable_ptm(struct pci_dev *dev, u8 *granularity)
+{ return -EINVAL; }
+#endif
+
void pci_cfg_access_lock(struct pci_dev *dev);
bool pci_cfg_access_trylock(struct pci_dev *dev);
void pci_cfg_access_unlock(struct pci_dev *dev);