aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 9603094ed59b..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>
@@ -177,6 +178,8 @@ enum pci_dev_flags {
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),
178 /* Do not use bus resets for device */ 179 /* Do not use bus resets for device */
179 PCI_DEV_FLAGS_NO_BUS_RESET = (__force pci_dev_flags_t) (1 << 6), 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),
180}; 183};
181 184
182enum pci_irq_reroute_variant { 185enum pci_irq_reroute_variant {
@@ -397,16 +400,10 @@ static inline int pci_channel_offline(struct pci_dev *pdev)
397 return (pdev->error_state != pci_channel_io_normal); 400 return (pdev->error_state != pci_channel_io_normal);
398} 401}
399 402
400struct pci_host_bridge_window {
401 struct list_head list;
402 struct resource *res; /* host bridge aperture (CPU address) */
403 resource_size_t offset; /* bus address + offset = CPU address */
404};
405
406struct pci_host_bridge { 403struct pci_host_bridge {
407 struct device dev; 404 struct device dev;
408 struct pci_bus *bus; /* root bus */ 405 struct pci_bus *bus; /* root bus */
409 struct list_head windows; /* pci_host_bridge_windows */ 406 struct list_head windows; /* resource_entry */
410 void (*release_fn)(struct pci_host_bridge *); 407 void (*release_fn)(struct pci_host_bridge *);
411 void *release_data; 408 void *release_data;
412}; 409};
@@ -562,6 +559,7 @@ static inline int pcibios_err_to_errno(int err)
562/* Low-level architecture-dependent routines */ 559/* Low-level architecture-dependent routines */
563 560
564struct pci_ops { 561struct pci_ops {
562 void __iomem *(*map_bus)(struct pci_bus *bus, unsigned int devfn, int where);
565 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);
566 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);
567}; 565};
@@ -859,6 +857,16 @@ int pci_bus_write_config_word(struct pci_bus *bus, unsigned int devfn,
859 int where, u16 val); 857 int where, u16 val);
860int pci_bus_write_config_dword(struct pci_bus *bus, unsigned int devfn, 858int pci_bus_write_config_dword(struct pci_bus *bus, unsigned int devfn,
861 int where, u32 val); 859 int where, u32 val);
860
861int pci_generic_config_read(struct pci_bus *bus, unsigned int devfn,
862 int where, int size, u32 *val);
863int pci_generic_config_write(struct pci_bus *bus, unsigned int devfn,
864 int where, int size, u32 val);
865int pci_generic_config_read32(struct pci_bus *bus, unsigned int devfn,
866 int where, int size, u32 *val);
867int pci_generic_config_write32(struct pci_bus *bus, unsigned int devfn,
868 int where, int size, u32 val);
869
862struct pci_ops *pci_bus_set_ops(struct pci_bus *bus, struct pci_ops *ops); 870struct pci_ops *pci_bus_set_ops(struct pci_bus *bus, struct pci_ops *ops);
863 871
864static inline int pci_read_config_byte(const struct pci_dev *dev, int where, u8 *val) 872static inline int pci_read_config_byte(const struct pci_dev *dev, int where, u8 *val)
@@ -1850,6 +1858,8 @@ static inline void pci_set_of_node(struct pci_dev *dev) { }
1850static inline void pci_release_of_node(struct pci_dev *dev) { } 1858static inline void pci_release_of_node(struct pci_dev *dev) { }
1851static inline void pci_set_bus_of_node(struct pci_bus *bus) { } 1859static inline void pci_set_bus_of_node(struct pci_bus *bus) { }
1852static inline void pci_release_bus_of_node(struct pci_bus *bus) { } 1860static inline void pci_release_bus_of_node(struct pci_bus *bus) { }
1861static inline struct device_node *
1862pci_device_to_OF_node(const struct pci_dev *pdev) { return NULL; }
1853#endif /* CONFIG_OF */ 1863#endif /* CONFIG_OF */
1854 1864
1855#ifdef CONFIG_EEH 1865#ifdef CONFIG_EEH