diff options
Diffstat (limited to 'include/linux/pci.h')
| -rw-r--r-- | include/linux/pci.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 360a966a97a5..211e9da8a7d7 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <linux/atomic.h> | 29 | #include <linux/atomic.h> |
| 30 | #include <linux/device.h> | 30 | #include <linux/device.h> |
| 31 | #include <linux/io.h> | 31 | #include <linux/io.h> |
| 32 | #include <linux/resource_ext.h> | ||
| 32 | #include <uapi/linux/pci.h> | 33 | #include <uapi/linux/pci.h> |
| 33 | 34 | ||
| 34 | #include <linux/pci_ids.h> | 35 | #include <linux/pci_ids.h> |
| @@ -175,6 +176,10 @@ enum pci_dev_flags { | |||
| 175 | PCI_DEV_FLAGS_DMA_ALIAS_DEVFN = (__force pci_dev_flags_t) (1 << 4), | 176 | PCI_DEV_FLAGS_DMA_ALIAS_DEVFN = (__force pci_dev_flags_t) (1 << 4), |
| 176 | /* Use a PCIe-to-PCI bridge alias even if !pci_is_pcie */ | 177 | /* Use a PCIe-to-PCI bridge alias even if !pci_is_pcie */ |
| 177 | PCI_DEV_FLAG_PCIE_BRIDGE_ALIAS = (__force pci_dev_flags_t) (1 << 5), | 178 | PCI_DEV_FLAG_PCIE_BRIDGE_ALIAS = (__force pci_dev_flags_t) (1 << 5), |
| 179 | /* Do not use bus resets for device */ | ||
| 180 | PCI_DEV_FLAGS_NO_BUS_RESET = (__force pci_dev_flags_t) (1 << 6), | ||
| 181 | /* Do not use PM reset even if device advertises NoSoftRst- */ | ||
| 182 | PCI_DEV_FLAGS_NO_PM_RESET = (__force pci_dev_flags_t) (1 << 7), | ||
| 178 | }; | 183 | }; |
| 179 | 184 | ||
| 180 | enum pci_irq_reroute_variant { | 185 | enum pci_irq_reroute_variant { |
| @@ -395,16 +400,10 @@ static inline int pci_channel_offline(struct pci_dev *pdev) | |||
| 395 | return (pdev->error_state != pci_channel_io_normal); | 400 | return (pdev->error_state != pci_channel_io_normal); |
| 396 | } | 401 | } |
| 397 | 402 | ||
| 398 | struct pci_host_bridge_window { | ||
| 399 | struct list_head list; | ||
| 400 | struct resource *res; /* host bridge aperture (CPU address) */ | ||
| 401 | resource_size_t offset; /* bus address + offset = CPU address */ | ||
| 402 | }; | ||
| 403 | |||
| 404 | struct pci_host_bridge { | 403 | struct pci_host_bridge { |
| 405 | struct device dev; | 404 | struct device dev; |
| 406 | struct pci_bus *bus; /* root bus */ | 405 | struct pci_bus *bus; /* root bus */ |
| 407 | struct list_head windows; /* pci_host_bridge_windows */ | 406 | struct list_head windows; /* resource_entry */ |
| 408 | void (*release_fn)(struct pci_host_bridge *); | 407 | void (*release_fn)(struct pci_host_bridge *); |
| 409 | void *release_data; | 408 | void *release_data; |
| 410 | }; | 409 | }; |
| @@ -560,6 +559,7 @@ static inline int pcibios_err_to_errno(int err) | |||
| 560 | /* Low-level architecture-dependent routines */ | 559 | /* Low-level architecture-dependent routines */ |
| 561 | 560 | ||
| 562 | struct pci_ops { | 561 | struct pci_ops { |
| 562 | void __iomem *(*map_bus)(struct pci_bus *bus, unsigned int devfn, int where); | ||
| 563 | int (*read)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val); | 563 | int (*read)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val); |
| 564 | int (*write)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val); | 564 | int (*write)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val); |
| 565 | }; | 565 | }; |
| @@ -857,6 +857,16 @@ int pci_bus_write_config_word(struct pci_bus *bus, unsigned int devfn, | |||
| 857 | int where, u16 val); | 857 | int where, u16 val); |
| 858 | int pci_bus_write_config_dword(struct pci_bus *bus, unsigned int devfn, | 858 | int pci_bus_write_config_dword(struct pci_bus *bus, unsigned int devfn, |
| 859 | int where, u32 val); | 859 | int where, u32 val); |
| 860 | |||
| 861 | int pci_generic_config_read(struct pci_bus *bus, unsigned int devfn, | ||
| 862 | int where, int size, u32 *val); | ||
| 863 | int pci_generic_config_write(struct pci_bus *bus, unsigned int devfn, | ||
| 864 | int where, int size, u32 val); | ||
| 865 | int pci_generic_config_read32(struct pci_bus *bus, unsigned int devfn, | ||
| 866 | int where, int size, u32 *val); | ||
| 867 | int pci_generic_config_write32(struct pci_bus *bus, unsigned int devfn, | ||
| 868 | int where, int size, u32 val); | ||
| 869 | |||
| 860 | struct pci_ops *pci_bus_set_ops(struct pci_bus *bus, struct pci_ops *ops); | 870 | struct pci_ops *pci_bus_set_ops(struct pci_bus *bus, struct pci_ops *ops); |
| 861 | 871 | ||
| 862 | static inline int pci_read_config_byte(const struct pci_dev *dev, int where, u8 *val) | 872 | static inline int pci_read_config_byte(const struct pci_dev *dev, int where, u8 *val) |
| @@ -1065,6 +1075,7 @@ resource_size_t pcibios_retrieve_fw_addr(struct pci_dev *dev, int idx); | |||
| 1065 | void pci_bus_assign_resources(const struct pci_bus *bus); | 1075 | void pci_bus_assign_resources(const struct pci_bus *bus); |
| 1066 | void pci_bus_size_bridges(struct pci_bus *bus); | 1076 | void pci_bus_size_bridges(struct pci_bus *bus); |
| 1067 | int pci_claim_resource(struct pci_dev *, int); | 1077 | int pci_claim_resource(struct pci_dev *, int); |
| 1078 | int pci_claim_bridge_resource(struct pci_dev *bridge, int i); | ||
| 1068 | void pci_assign_unassigned_resources(void); | 1079 | void pci_assign_unassigned_resources(void); |
| 1069 | void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge); | 1080 | void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge); |
| 1070 | void pci_assign_unassigned_bus_resources(struct pci_bus *bus); | 1081 | void pci_assign_unassigned_bus_resources(struct pci_bus *bus); |
| @@ -1847,6 +1858,8 @@ static inline void pci_set_of_node(struct pci_dev *dev) { } | |||
| 1847 | static inline void pci_release_of_node(struct pci_dev *dev) { } | 1858 | static inline void pci_release_of_node(struct pci_dev *dev) { } |
| 1848 | static inline void pci_set_bus_of_node(struct pci_bus *bus) { } | 1859 | static inline void pci_set_bus_of_node(struct pci_bus *bus) { } |
| 1849 | static inline void pci_release_bus_of_node(struct pci_bus *bus) { } | 1860 | static inline void pci_release_bus_of_node(struct pci_bus *bus) { } |
| 1861 | static inline struct device_node * | ||
| 1862 | pci_device_to_OF_node(const struct pci_dev *pdev) { return NULL; } | ||
| 1850 | #endif /* CONFIG_OF */ | 1863 | #endif /* CONFIG_OF */ |
| 1851 | 1864 | ||
| 1852 | #ifdef CONFIG_EEH | 1865 | #ifdef CONFIG_EEH |
