diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-13 18:45:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-13 18:45:47 -0400 |
commit | 3be1b98e073bdd4c1bb3144201a927c4a21330ba (patch) | |
tree | 6eb0619a4715d8f83388e8fd7a56f58d1c99f6cf /include/linux | |
parent | 392b46f31f43a71c5391eb9cffe304979d2d6c30 (diff) | |
parent | 5468d5a64bf1e002e5081fa280186d0eba09fa0e (diff) |
Merge tag 'pci-v4.1-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI changes from Bjorn Helgaas:
"Enumeration
- Read capability list as dwords, not bytes (Sean O. Stalley)
Resource management
- Don't check for PNP overlaps with unassigned PCI BARs (Bjorn Helgaas)
- Mark invalid BARs as unassigned (Bjorn Helgaas)
- Show driver, BAR#, and resource on pci_ioremap_bar() failure (Bjorn Helgaas)
- Fail pci_ioremap_bar() on unassigned resources (Bjorn Helgaas)
- Assign resources before drivers claim devices (Yijing Wang)
- Claim bus resources before pci_bus_add_devices() (Yijing Wang)
Power management
- Optimize device state transition delays (Aaron Lu)
- Don't clear ASPM bits when the FADT declares it's unsupported (Matthew Garrett)
Virtualization
- Add ACS quirks for Intel 1G NICs (Alex Williamson)
IOMMU
- Add ptr to OF node arg to of_iommu_configure() (Murali Karicheri)
- Move of_dma_configure() to device.c to help re-use (Murali Karicheri)
- Fix size when dma-range is not used (Murali Karicheri)
- Add helper functions pci_get[put]_host_bridge_device() (Murali Karicheri)
- Add of_pci_dma_configure() to update DMA configuration (Murali Karicheri)
- Update DMA configuration from DT (Murali Karicheri)
- dma-mapping: limit IOMMU mapping size (Murali Karicheri)
- Calculate device DMA masks based on DT dma-range size (Murali Karicheri)
ARM Versatile host bridge driver
- Check for devm_ioremap_resource() failures (Jisheng Zhang)
Broadcom iProc host bridge driver
- Add Broadcom iProc PCIe driver (Ray Jui)
Marvell MVEBU host bridge driver
- Add suspend/resume support (Thomas Petazzoni)
Renesas R-Car host bridge driver
- Fix position of MSI enable bit (Nobuhiro Iwamatsu)
- Write zeroes to reserved PCIEPARL bits (Nobuhiro Iwamatsu)
- Change PCIEPARL and PCIEPARH to PCIEPALR and PCIEPAUR (Nobuhiro Iwamatsu)
- Verify that mem_res is 64K-aligned (Nobuhiro Iwamatsu)
Samsung Exynos host bridge driver
- Fix INTx enablement statement termination error (Jaehoon Chung)
Miscellaneous
- Make a shareable UUID for PCI firmware ACPI _DSM (Aaron Lu)
- Clarify policy for vendor IDs in pci.txt (Michael S. Tsirkin)"
* tag 'pci-v4.1-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (36 commits)
PCI: Read capability list as dwords, not bytes
PCI: layerscape: Simplify platform_get_resource_byname() failure checking
PCI: keystone: Don't dereference possible NULL pointer
PCI: versatile: Check for devm_ioremap_resource() failures
PCI: Don't clear ASPM bits when the FADT declares it's unsupported
PCI: Clarify policy for vendor IDs in pci.txt
PCI/ACPI: Optimize device state transition delays
PCI: Export pci_find_host_bridge() for use inside PCI core
PCI: Make a shareable UUID for PCI firmware ACPI _DSM
PCI: Fix typo in Thunderbolt kernel message
PCI: exynos: Fix INTx enablement statement termination error
PCI: iproc: Add Broadcom iProc PCIe support
PCI: iproc: Add DT docs for Broadcom iProc PCIe driver
PCI: Export symbols required for loadable host driver modules
PCI: Add ACS quirks for Intel 1G NICs
PCI: mvebu: Add suspend/resume support
PCI: Cleanup control flow
sparc/PCI: Claim bus resources before pci_bus_add_devices()
PCI: Assign resources before drivers claim devices (pci_scan_root_bus())
PCI: Fail pci_ioremap_bar() on unassigned resources
...
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/of_device.h | 3 | ||||
-rw-r--r-- | include/linux/of_iommu.h | 6 | ||||
-rw-r--r-- | include/linux/of_pci.h | 3 | ||||
-rw-r--r-- | include/linux/pci-acpi.h | 5 | ||||
-rw-r--r-- | include/linux/pci-aspm.h | 4 | ||||
-rw-r--r-- | include/linux/pci.h | 4 |
6 files changed, 19 insertions, 6 deletions
diff --git a/include/linux/of_device.h b/include/linux/of_device.h index ef370210ffb2..22801b10cef5 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h | |||
@@ -53,6 +53,7 @@ static inline struct device_node *of_cpu_device_node_get(int cpu) | |||
53 | return of_node_get(cpu_dev->of_node); | 53 | return of_node_get(cpu_dev->of_node); |
54 | } | 54 | } |
55 | 55 | ||
56 | void of_dma_configure(struct device *dev, struct device_node *np); | ||
56 | #else /* CONFIG_OF */ | 57 | #else /* CONFIG_OF */ |
57 | 58 | ||
58 | static inline int of_driver_match_device(struct device *dev, | 59 | static inline int of_driver_match_device(struct device *dev, |
@@ -90,6 +91,8 @@ static inline struct device_node *of_cpu_device_node_get(int cpu) | |||
90 | { | 91 | { |
91 | return NULL; | 92 | return NULL; |
92 | } | 93 | } |
94 | static inline void of_dma_configure(struct device *dev, struct device_node *np) | ||
95 | {} | ||
93 | #endif /* CONFIG_OF */ | 96 | #endif /* CONFIG_OF */ |
94 | 97 | ||
95 | #endif /* _LINUX_OF_DEVICE_H */ | 98 | #endif /* _LINUX_OF_DEVICE_H */ |
diff --git a/include/linux/of_iommu.h b/include/linux/of_iommu.h index 16c75547d725..ffbe4707d4aa 100644 --- a/include/linux/of_iommu.h +++ b/include/linux/of_iommu.h | |||
@@ -12,7 +12,8 @@ extern int of_get_dma_window(struct device_node *dn, const char *prefix, | |||
12 | size_t *size); | 12 | size_t *size); |
13 | 13 | ||
14 | extern void of_iommu_init(void); | 14 | extern void of_iommu_init(void); |
15 | extern struct iommu_ops *of_iommu_configure(struct device *dev); | 15 | extern struct iommu_ops *of_iommu_configure(struct device *dev, |
16 | struct device_node *master_np); | ||
16 | 17 | ||
17 | #else | 18 | #else |
18 | 19 | ||
@@ -24,7 +25,8 @@ static inline int of_get_dma_window(struct device_node *dn, const char *prefix, | |||
24 | } | 25 | } |
25 | 26 | ||
26 | static inline void of_iommu_init(void) { } | 27 | static inline void of_iommu_init(void) { } |
27 | static inline struct iommu_ops *of_iommu_configure(struct device *dev) | 28 | static inline struct iommu_ops *of_iommu_configure(struct device *dev, |
29 | struct device_node *master_np) | ||
28 | { | 30 | { |
29 | return NULL; | 31 | return NULL; |
30 | } | 32 | } |
diff --git a/include/linux/of_pci.h b/include/linux/of_pci.h index ce0e5abeb454..29fd3fe1c035 100644 --- a/include/linux/of_pci.h +++ b/include/linux/of_pci.h | |||
@@ -16,6 +16,7 @@ int of_pci_get_devfn(struct device_node *np); | |||
16 | int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin); | 16 | int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin); |
17 | int of_pci_parse_bus_range(struct device_node *node, struct resource *res); | 17 | int of_pci_parse_bus_range(struct device_node *node, struct resource *res); |
18 | int of_get_pci_domain_nr(struct device_node *node); | 18 | int of_get_pci_domain_nr(struct device_node *node); |
19 | void of_pci_dma_configure(struct pci_dev *pci_dev); | ||
19 | #else | 20 | #else |
20 | static inline int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq) | 21 | static inline int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq) |
21 | { | 22 | { |
@@ -50,6 +51,8 @@ of_get_pci_domain_nr(struct device_node *node) | |||
50 | { | 51 | { |
51 | return -1; | 52 | return -1; |
52 | } | 53 | } |
54 | |||
55 | static inline void of_pci_dma_configure(struct pci_dev *pci_dev) { } | ||
53 | #endif | 56 | #endif |
54 | 57 | ||
55 | #if defined(CONFIG_OF_ADDRESS) | 58 | #if defined(CONFIG_OF_ADDRESS) |
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 24c7728ca681..a965efa52152 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
@@ -77,6 +77,11 @@ static inline void acpiphp_remove_slots(struct pci_bus *bus) { } | |||
77 | static inline void acpiphp_check_host_bridge(struct acpi_device *adev) { } | 77 | static inline void acpiphp_check_host_bridge(struct acpi_device *adev) { } |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | extern const u8 pci_acpi_dsm_uuid[]; | ||
81 | #define DEVICE_LABEL_DSM 0x07 | ||
82 | #define RESET_DELAY_DSM 0x08 | ||
83 | #define FUNCTION_DELAY_DSM 0x09 | ||
84 | |||
80 | #else /* CONFIG_ACPI */ | 85 | #else /* CONFIG_ACPI */ |
81 | static inline void acpi_pci_add_bus(struct pci_bus *bus) { } | 86 | static inline void acpi_pci_add_bus(struct pci_bus *bus) { } |
82 | static inline void acpi_pci_remove_bus(struct pci_bus *bus) { } | 87 | static inline void acpi_pci_remove_bus(struct pci_bus *bus) { } |
diff --git a/include/linux/pci-aspm.h b/include/linux/pci-aspm.h index 8af4610c2e41..207c561fb40e 100644 --- a/include/linux/pci-aspm.h +++ b/include/linux/pci-aspm.h | |||
@@ -29,7 +29,6 @@ void pcie_aspm_pm_state_change(struct pci_dev *pdev); | |||
29 | void pcie_aspm_powersave_config_link(struct pci_dev *pdev); | 29 | void pcie_aspm_powersave_config_link(struct pci_dev *pdev); |
30 | void pci_disable_link_state(struct pci_dev *pdev, int state); | 30 | void pci_disable_link_state(struct pci_dev *pdev, int state); |
31 | void pci_disable_link_state_locked(struct pci_dev *pdev, int state); | 31 | void pci_disable_link_state_locked(struct pci_dev *pdev, int state); |
32 | void pcie_clear_aspm(struct pci_bus *bus); | ||
33 | void pcie_no_aspm(void); | 32 | void pcie_no_aspm(void); |
34 | #else | 33 | #else |
35 | static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) | 34 | static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) |
@@ -47,9 +46,6 @@ static inline void pcie_aspm_powersave_config_link(struct pci_dev *pdev) | |||
47 | static inline void pci_disable_link_state(struct pci_dev *pdev, int state) | 46 | static inline void pci_disable_link_state(struct pci_dev *pdev, int state) |
48 | { | 47 | { |
49 | } | 48 | } |
50 | static inline void pcie_clear_aspm(struct pci_bus *bus) | ||
51 | { | ||
52 | } | ||
53 | static inline void pcie_no_aspm(void) | 49 | static inline void pcie_no_aspm(void) |
54 | { | 50 | { |
55 | } | 51 | } |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 211e9da8a7d7..e63112fb55be 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -406,6 +406,7 @@ struct pci_host_bridge { | |||
406 | struct list_head windows; /* resource_entry */ | 406 | struct list_head windows; /* resource_entry */ |
407 | void (*release_fn)(struct pci_host_bridge *); | 407 | void (*release_fn)(struct pci_host_bridge *); |
408 | void *release_data; | 408 | void *release_data; |
409 | unsigned int ignore_reset_delay:1; /* for entire hierarchy */ | ||
409 | }; | 410 | }; |
410 | 411 | ||
411 | #define to_pci_host_bridge(n) container_of(n, struct pci_host_bridge, dev) | 412 | #define to_pci_host_bridge(n) container_of(n, struct pci_host_bridge, dev) |
@@ -510,6 +511,9 @@ static inline struct pci_dev *pci_upstream_bridge(struct pci_dev *dev) | |||
510 | return dev->bus->self; | 511 | return dev->bus->self; |
511 | } | 512 | } |
512 | 513 | ||
514 | struct device *pci_get_host_bridge_device(struct pci_dev *dev); | ||
515 | void pci_put_host_bridge_device(struct device *dev); | ||
516 | |||
513 | #ifdef CONFIG_PCI_MSI | 517 | #ifdef CONFIG_PCI_MSI |
514 | static inline bool pci_dev_msi_enabled(struct pci_dev *pci_dev) | 518 | static inline bool pci_dev_msi_enabled(struct pci_dev *pci_dev) |
515 | { | 519 | { |