| .. | .. |
|---|
| 20 | 20 | #define PCIE_PORT_SERVICE_HP (1 << PCIE_PORT_SERVICE_HP_SHIFT) |
|---|
| 21 | 21 | #define PCIE_PORT_SERVICE_DPC_SHIFT 3 /* Downstream Port Containment */ |
|---|
| 22 | 22 | #define PCIE_PORT_SERVICE_DPC (1 << PCIE_PORT_SERVICE_DPC_SHIFT) |
|---|
| 23 | +#define PCIE_PORT_SERVICE_BWNOTIF_SHIFT 4 /* Bandwidth notification */ |
|---|
| 24 | +#define PCIE_PORT_SERVICE_BWNOTIF (1 << PCIE_PORT_SERVICE_BWNOTIF_SHIFT) |
|---|
| 23 | 25 | |
|---|
| 24 | | -#define PCIE_PORT_DEVICE_MAXSERVICES 4 |
|---|
| 26 | +#define PCIE_PORT_DEVICE_MAXSERVICES 5 |
|---|
| 27 | + |
|---|
| 28 | +extern bool pcie_ports_dpc_native; |
|---|
| 25 | 29 | |
|---|
| 26 | 30 | #ifdef CONFIG_PCIEAER |
|---|
| 27 | 31 | int pcie_aer_init(void); |
|---|
| 32 | +int pcie_aer_is_native(struct pci_dev *dev); |
|---|
| 28 | 33 | #else |
|---|
| 29 | 34 | static inline int pcie_aer_init(void) { return 0; } |
|---|
| 35 | +static inline int pcie_aer_is_native(struct pci_dev *dev) { return 0; } |
|---|
| 30 | 36 | #endif |
|---|
| 31 | 37 | |
|---|
| 32 | 38 | #ifdef CONFIG_HOTPLUG_PCI_PCIE |
|---|
| .. | .. |
|---|
| 71 | 77 | |
|---|
| 72 | 78 | struct pcie_port_service_driver { |
|---|
| 73 | 79 | const char *name; |
|---|
| 74 | | - int (*probe) (struct pcie_device *dev); |
|---|
| 75 | | - void (*remove) (struct pcie_device *dev); |
|---|
| 76 | | - int (*suspend) (struct pcie_device *dev); |
|---|
| 77 | | - int (*resume_noirq) (struct pcie_device *dev); |
|---|
| 78 | | - int (*resume) (struct pcie_device *dev); |
|---|
| 80 | + int (*probe)(struct pcie_device *dev); |
|---|
| 81 | + void (*remove)(struct pcie_device *dev); |
|---|
| 82 | + int (*suspend)(struct pcie_device *dev); |
|---|
| 83 | + int (*resume_noirq)(struct pcie_device *dev); |
|---|
| 84 | + int (*resume)(struct pcie_device *dev); |
|---|
| 85 | + int (*runtime_suspend)(struct pcie_device *dev); |
|---|
| 86 | + int (*runtime_resume)(struct pcie_device *dev); |
|---|
| 79 | 87 | |
|---|
| 80 | 88 | /* Device driver may resume normal operations */ |
|---|
| 81 | 89 | void (*error_resume)(struct pci_dev *dev); |
|---|
| 82 | | - |
|---|
| 83 | | - /* Link Reset Capability - AER service driver specific */ |
|---|
| 84 | | - pci_ers_result_t (*reset_link) (struct pci_dev *dev); |
|---|
| 85 | 90 | |
|---|
| 86 | 91 | int port_type; /* Type of the port this driver can handle */ |
|---|
| 87 | 92 | u32 service; /* Port service this device represents */ |
|---|
| .. | .. |
|---|
| 109 | 114 | int pcie_port_device_suspend(struct device *dev); |
|---|
| 110 | 115 | int pcie_port_device_resume_noirq(struct device *dev); |
|---|
| 111 | 116 | int pcie_port_device_resume(struct device *dev); |
|---|
| 117 | +int pcie_port_device_runtime_suspend(struct device *dev); |
|---|
| 118 | +int pcie_port_device_runtime_resume(struct device *dev); |
|---|
| 112 | 119 | #endif |
|---|
| 113 | 120 | void pcie_port_device_remove(struct pci_dev *dev); |
|---|
| 114 | 121 | int __must_check pcie_port_bus_register(void); |
|---|
| .. | .. |
|---|
| 136 | 143 | static inline void pcie_pme_interrupt_enable(struct pci_dev *dev, bool en) {} |
|---|
| 137 | 144 | #endif /* !CONFIG_PCIE_PME */ |
|---|
| 138 | 145 | |
|---|
| 139 | | -#ifdef CONFIG_ACPI_APEI |
|---|
| 140 | | -int pcie_aer_get_firmware_first(struct pci_dev *pci_dev); |
|---|
| 141 | | -#else |
|---|
| 142 | | -static inline int pcie_aer_get_firmware_first(struct pci_dev *pci_dev) |
|---|
| 143 | | -{ |
|---|
| 144 | | - if (pci_dev->__aer_firmware_first_valid) |
|---|
| 145 | | - return pci_dev->__aer_firmware_first; |
|---|
| 146 | | - return 0; |
|---|
| 147 | | -} |
|---|
| 148 | | -#endif |
|---|
| 149 | | - |
|---|
| 150 | | -#ifdef CONFIG_PCIEAER |
|---|
| 151 | | -irqreturn_t aer_irq(int irq, void *context); |
|---|
| 152 | | -#endif |
|---|
| 153 | | - |
|---|
| 154 | | -struct pcie_port_service_driver *pcie_port_find_service(struct pci_dev *dev, |
|---|
| 155 | | - u32 service); |
|---|
| 156 | 146 | struct device *pcie_port_find_device(struct pci_dev *dev, u32 service); |
|---|
| 157 | 147 | #endif /* _PORTDRV_H_ */ |
|---|