diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2018-01-31 11:21:33 -0500 |
|---|---|---|
| committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-01-31 11:21:33 -0500 |
| commit | c7f75aecb2d9436c4bef8b413231f60deae3453c (patch) | |
| tree | ad6082d4a0d79226637af66ee8f2fc4b24590d4b /include/linux | |
| parent | a07ae842e209196ffe0fe8feacd489aba772d8a0 (diff) | |
| parent | 37dddf14f1aecd9fa89a5136b38b33cab54b9195 (diff) | |
Merge remote-tracking branch 'lorenzo/pci/cadence' into next
* lorenzo/pci/cadence:
PCI: cadence: Add EndPoint Controller driver for Cadence PCIe controller
dt-bindings: PCI: cadence: Add DT bindings for Cadence PCIe endpoint controller
PCI: endpoint: Fix EPF device name to support multi-function devices
PCI: endpoint: Add the function number as argument to EPC ops
PCI: cadence: Add host driver for Cadence PCIe controller
dt-bindings: PCI: cadence: Add DT bindings for Cadence PCIe host controller
PCI: Add vendor ID for Cadence
PCI: Add generic function to probe PCI host controllers
PCI: generic: fix missing call of pci_free_resource_list()
PCI: OF: Add generic function to parse and allocate PCI resources
PCI: Regroup all PCI related entries into drivers/pci/Makefile
Conflicts:
drivers/pci/of.c
include/linux/pci.h
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pci-epc.h | 43 | ||||
| -rw-r--r-- | include/linux/pci.h | 12 | ||||
| -rw-r--r-- | include/linux/pci_ids.h | 2 |
3 files changed, 38 insertions, 19 deletions
diff --git a/include/linux/pci-epc.h b/include/linux/pci-epc.h index f7a04e1af112..e58e2de8936b 100644 --- a/include/linux/pci-epc.h +++ b/include/linux/pci-epc.h | |||
| @@ -39,17 +39,20 @@ enum pci_epc_irq_type { | |||
| 39 | * @owner: the module owner containing the ops | 39 | * @owner: the module owner containing the ops |
| 40 | */ | 40 | */ |
| 41 | struct pci_epc_ops { | 41 | struct pci_epc_ops { |
| 42 | int (*write_header)(struct pci_epc *pci_epc, | 42 | int (*write_header)(struct pci_epc *epc, u8 func_no, |
| 43 | struct pci_epf_header *hdr); | 43 | struct pci_epf_header *hdr); |
| 44 | int (*set_bar)(struct pci_epc *epc, enum pci_barno bar, | 44 | int (*set_bar)(struct pci_epc *epc, u8 func_no, |
| 45 | enum pci_barno bar, | ||
| 45 | dma_addr_t bar_phys, size_t size, int flags); | 46 | dma_addr_t bar_phys, size_t size, int flags); |
| 46 | void (*clear_bar)(struct pci_epc *epc, enum pci_barno bar); | 47 | void (*clear_bar)(struct pci_epc *epc, u8 func_no, |
| 47 | int (*map_addr)(struct pci_epc *epc, phys_addr_t addr, | 48 | enum pci_barno bar); |
| 48 | u64 pci_addr, size_t size); | 49 | int (*map_addr)(struct pci_epc *epc, u8 func_no, |
| 49 | void (*unmap_addr)(struct pci_epc *epc, phys_addr_t addr); | 50 | phys_addr_t addr, u64 pci_addr, size_t size); |
| 50 | int (*set_msi)(struct pci_epc *epc, u8 interrupts); | 51 | void (*unmap_addr)(struct pci_epc *epc, u8 func_no, |
| 51 | int (*get_msi)(struct pci_epc *epc); | 52 | phys_addr_t addr); |
| 52 | int (*raise_irq)(struct pci_epc *pci_epc, | 53 | int (*set_msi)(struct pci_epc *epc, u8 func_no, u8 interrupts); |
| 54 | int (*get_msi)(struct pci_epc *epc, u8 func_no); | ||
| 55 | int (*raise_irq)(struct pci_epc *epc, u8 func_no, | ||
| 53 | enum pci_epc_irq_type type, u8 interrupt_num); | 56 | enum pci_epc_irq_type type, u8 interrupt_num); |
| 54 | int (*start)(struct pci_epc *epc); | 57 | int (*start)(struct pci_epc *epc); |
| 55 | void (*stop)(struct pci_epc *epc); | 58 | void (*stop)(struct pci_epc *epc); |
| @@ -124,17 +127,21 @@ void pci_epc_destroy(struct pci_epc *epc); | |||
| 124 | int pci_epc_add_epf(struct pci_epc *epc, struct pci_epf *epf); | 127 | int pci_epc_add_epf(struct pci_epc *epc, struct pci_epf *epf); |
| 125 | void pci_epc_linkup(struct pci_epc *epc); | 128 | void pci_epc_linkup(struct pci_epc *epc); |
| 126 | void pci_epc_remove_epf(struct pci_epc *epc, struct pci_epf *epf); | 129 | void pci_epc_remove_epf(struct pci_epc *epc, struct pci_epf *epf); |
| 127 | int pci_epc_write_header(struct pci_epc *epc, struct pci_epf_header *hdr); | 130 | int pci_epc_write_header(struct pci_epc *epc, u8 func_no, |
| 128 | int pci_epc_set_bar(struct pci_epc *epc, enum pci_barno bar, | 131 | struct pci_epf_header *hdr); |
| 132 | int pci_epc_set_bar(struct pci_epc *epc, u8 func_no, | ||
| 133 | enum pci_barno bar, | ||
| 129 | dma_addr_t bar_phys, size_t size, int flags); | 134 | dma_addr_t bar_phys, size_t size, int flags); |
| 130 | void pci_epc_clear_bar(struct pci_epc *epc, int bar); | 135 | void pci_epc_clear_bar(struct pci_epc *epc, u8 func_no, int bar); |
| 131 | int pci_epc_map_addr(struct pci_epc *epc, phys_addr_t phys_addr, | 136 | int pci_epc_map_addr(struct pci_epc *epc, u8 func_no, |
| 137 | phys_addr_t phys_addr, | ||
| 132 | u64 pci_addr, size_t size); | 138 | u64 pci_addr, size_t size); |
| 133 | void pci_epc_unmap_addr(struct pci_epc *epc, phys_addr_t phys_addr); | 139 | void pci_epc_unmap_addr(struct pci_epc *epc, u8 func_no, |
| 134 | int pci_epc_set_msi(struct pci_epc *epc, u8 interrupts); | 140 | phys_addr_t phys_addr); |
| 135 | int pci_epc_get_msi(struct pci_epc *epc); | 141 | int pci_epc_set_msi(struct pci_epc *epc, u8 func_no, u8 interrupts); |
| 136 | int pci_epc_raise_irq(struct pci_epc *epc, enum pci_epc_irq_type type, | 142 | int pci_epc_get_msi(struct pci_epc *epc, u8 func_no); |
| 137 | u8 interrupt_num); | 143 | int pci_epc_raise_irq(struct pci_epc *epc, u8 func_no, |
| 144 | enum pci_epc_irq_type type, u8 interrupt_num); | ||
| 138 | int pci_epc_start(struct pci_epc *epc); | 145 | int pci_epc_start(struct pci_epc *epc); |
| 139 | void pci_epc_stop(struct pci_epc *epc); | 146 | void pci_epc_stop(struct pci_epc *epc); |
| 140 | struct pci_epc *pci_epc_get(const char *epc_name); | 147 | struct pci_epc *pci_epc_get(const char *epc_name); |
diff --git a/include/linux/pci.h b/include/linux/pci.h index a1e10ba7b612..43dcecd6533d 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -879,6 +879,7 @@ struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata); | |||
| 879 | struct pci_bus *pci_create_root_bus(struct device *parent, int bus, | 879 | struct pci_bus *pci_create_root_bus(struct device *parent, int bus, |
| 880 | struct pci_ops *ops, void *sysdata, | 880 | struct pci_ops *ops, void *sysdata, |
| 881 | struct list_head *resources); | 881 | struct list_head *resources); |
| 882 | int pci_host_probe(struct pci_host_bridge *bridge); | ||
| 882 | int pci_bus_insert_busn_res(struct pci_bus *b, int bus, int busmax); | 883 | int pci_bus_insert_busn_res(struct pci_bus *b, int bus, int busmax); |
| 883 | int pci_bus_update_busn_res_end(struct pci_bus *b, int busmax); | 884 | int pci_bus_update_busn_res_end(struct pci_bus *b, int busmax); |
| 884 | void pci_bus_release_busn_res(struct pci_bus *b); | 885 | void pci_bus_release_busn_res(struct pci_bus *b); |
| @@ -2171,6 +2172,9 @@ void pci_release_of_node(struct pci_dev *dev); | |||
| 2171 | void pci_set_bus_of_node(struct pci_bus *bus); | 2172 | void pci_set_bus_of_node(struct pci_bus *bus); |
| 2172 | void pci_release_bus_of_node(struct pci_bus *bus); | 2173 | void pci_release_bus_of_node(struct pci_bus *bus); |
| 2173 | struct irq_domain *pci_host_bridge_of_msi_domain(struct pci_bus *bus); | 2174 | struct irq_domain *pci_host_bridge_of_msi_domain(struct pci_bus *bus); |
| 2175 | int pci_parse_request_of_pci_ranges(struct device *dev, | ||
| 2176 | struct list_head *resources, | ||
| 2177 | struct resource **bus_range); | ||
| 2174 | 2178 | ||
| 2175 | /* Arch may override this (weak) */ | 2179 | /* Arch may override this (weak) */ |
| 2176 | struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus); | 2180 | struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus); |
| @@ -2195,7 +2199,13 @@ static inline struct device_node * | |||
| 2195 | pci_device_to_OF_node(const struct pci_dev *pdev) { return NULL; } | 2199 | pci_device_to_OF_node(const struct pci_dev *pdev) { return NULL; } |
| 2196 | static inline struct irq_domain * | 2200 | static inline struct irq_domain * |
| 2197 | pci_host_bridge_of_msi_domain(struct pci_bus *bus) { return NULL; } | 2201 | pci_host_bridge_of_msi_domain(struct pci_bus *bus) { return NULL; } |
| 2198 | #endif /* CONFIG_OF */ | 2202 | static inline int pci_parse_request_of_pci_ranges(struct device *dev, |
| 2203 | struct list_head *resources, | ||
| 2204 | struct resource **bus_range) | ||
| 2205 | { | ||
| 2206 | return -EINVAL; | ||
| 2207 | } | ||
| 2208 | #endif /* CONFIG_OF */ | ||
| 2199 | 2209 | ||
| 2200 | #ifdef CONFIG_ACPI | 2210 | #ifdef CONFIG_ACPI |
| 2201 | struct irq_domain *pci_host_bridge_acpi_msi_domain(struct pci_bus *bus); | 2211 | struct irq_domain *pci_host_bridge_acpi_msi_domain(struct pci_bus *bus); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index ab20dc5db423..eb13e84e1fef 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -2381,6 +2381,8 @@ | |||
| 2381 | 2381 | ||
| 2382 | #define PCI_VENDOR_ID_LENOVO 0x17aa | 2382 | #define PCI_VENDOR_ID_LENOVO 0x17aa |
| 2383 | 2383 | ||
| 2384 | #define PCI_VENDOR_ID_CDNS 0x17cd | ||
| 2385 | |||
| 2384 | #define PCI_VENDOR_ID_ARECA 0x17d3 | 2386 | #define PCI_VENDOR_ID_ARECA 0x17d3 |
| 2385 | #define PCI_DEVICE_ID_ARECA_1110 0x1110 | 2387 | #define PCI_DEVICE_ID_ARECA_1110 0x1110 |
| 2386 | #define PCI_DEVICE_ID_ARECA_1120 0x1120 | 2388 | #define PCI_DEVICE_ID_ARECA_1120 0x1120 |
