diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2016-09-01 10:04:55 -0400 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-09-01 10:04:55 -0400 |
| commit | 9e18ad98ca71ca0cfcadf633547409829773f36a (patch) | |
| tree | 66a761b8f3db00623fc112e32af55d909c628dcf /include/linux | |
| parent | a4589a660662d16336353b1c66ad18e0a0a3eb1e (diff) | |
| parent | 8b2ec318eece89be5e33d5313a25461a55a3177a (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')
| -rw-r--r-- | include/linux/pci.h | 13 |
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 { | |||
| 367 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ | 367 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ |
| 368 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ | 368 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ |
| 369 | struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */ | 369 | struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */ |
| 370 | |||
| 371 | #ifdef CONFIG_PCIE_PTM | ||
| 372 | unsigned int ptm_root:1; | ||
| 373 | unsigned int ptm_enabled:1; | ||
| 374 | u8 ptm_granularity; | ||
| 375 | #endif | ||
| 370 | #ifdef CONFIG_PCI_MSI | 376 | #ifdef CONFIG_PCI_MSI |
| 371 | const struct attribute_group **msi_irq_groups; | 377 | const struct attribute_group **msi_irq_groups; |
| 372 | #endif | 378 | #endif |
| @@ -1402,6 +1408,13 @@ static inline void pci_disable_ats(struct pci_dev *d) { } | |||
| 1402 | static inline int pci_ats_queue_depth(struct pci_dev *d) { return -ENODEV; } | 1408 | static inline int pci_ats_queue_depth(struct pci_dev *d) { return -ENODEV; } |
| 1403 | #endif | 1409 | #endif |
| 1404 | 1410 | ||
| 1411 | #ifdef CONFIG_PCIE_PTM | ||
| 1412 | int pci_enable_ptm(struct pci_dev *dev, u8 *granularity); | ||
| 1413 | #else | ||
| 1414 | static inline int pci_enable_ptm(struct pci_dev *dev, u8 *granularity) | ||
| 1415 | { return -EINVAL; } | ||
| 1416 | #endif | ||
| 1417 | |||
| 1405 | void pci_cfg_access_lock(struct pci_dev *dev); | 1418 | void pci_cfg_access_lock(struct pci_dev *dev); |
| 1406 | bool pci_cfg_access_trylock(struct pci_dev *dev); | 1419 | bool pci_cfg_access_trylock(struct pci_dev *dev); |
| 1407 | void pci_cfg_access_unlock(struct pci_dev *dev); | 1420 | void pci_cfg_access_unlock(struct pci_dev *dev); |
