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.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 292491324b01..96acd0dae241 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -20,8 +20,6 @@
20/* Include the pci register defines */ 20/* Include the pci register defines */
21#include <linux/pci_regs.h> 21#include <linux/pci_regs.h>
22 22
23struct pci_vpd;
24
25/* 23/*
26 * The PCI interface treats multi-function devices as independent 24 * The PCI interface treats multi-function devices as independent
27 * devices. The slot/function address of each device is encoded 25 * devices. The slot/function address of each device is encoded
@@ -131,6 +129,8 @@ struct pci_cap_saved_state {
131}; 129};
132 130
133struct pcie_link_state; 131struct pcie_link_state;
132struct pci_vpd;
133
134/* 134/*
135 * The pci_dev structure is used to describe PCI devices. 135 * The pci_dev structure is used to describe PCI devices.
136 */ 136 */
@@ -254,7 +254,7 @@ static inline void pci_add_saved_cap(struct pci_dev *pci_dev,
254#define PCI_NUM_RESOURCES 11 254#define PCI_NUM_RESOURCES 11
255 255
256#ifndef PCI_BUS_NUM_RESOURCES 256#ifndef PCI_BUS_NUM_RESOURCES
257#define PCI_BUS_NUM_RESOURCES 8 257#define PCI_BUS_NUM_RESOURCES 16
258#endif 258#endif
259 259
260#define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */ 260#define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */
@@ -666,6 +666,7 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max,
666 666
667void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *), 667void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *),
668 void *userdata); 668 void *userdata);
669int pci_cfg_space_size_ext(struct pci_dev *dev, unsigned check_exp_pcix);
669int pci_cfg_space_size(struct pci_dev *dev); 670int pci_cfg_space_size(struct pci_dev *dev);
670unsigned char pci_bus_max_busnr(struct pci_bus *bus); 671unsigned char pci_bus_max_busnr(struct pci_bus *bus);
671 672
@@ -701,6 +702,8 @@ static inline int pci_enable_msi(struct pci_dev *dev)
701 return -1; 702 return -1;
702} 703}
703 704
705static inline void pci_msi_shutdown(struct pci_dev *dev)
706{ }
704static inline void pci_disable_msi(struct pci_dev *dev) 707static inline void pci_disable_msi(struct pci_dev *dev)
705{ } 708{ }
706 709
@@ -710,6 +713,8 @@ static inline int pci_enable_msix(struct pci_dev *dev,
710 return -1; 713 return -1;
711} 714}
712 715
716static inline void pci_msix_shutdown(struct pci_dev *dev)
717{ }
713static inline void pci_disable_msix(struct pci_dev *dev) 718static inline void pci_disable_msix(struct pci_dev *dev)
714{ } 719{ }
715 720
@@ -720,9 +725,11 @@ static inline void pci_restore_msi_state(struct pci_dev *dev)
720{ } 725{ }
721#else 726#else
722extern int pci_enable_msi(struct pci_dev *dev); 727extern int pci_enable_msi(struct pci_dev *dev);
728extern void pci_msi_shutdown(struct pci_dev *dev);
723extern void pci_disable_msi(struct pci_dev *dev); 729extern void pci_disable_msi(struct pci_dev *dev);
724extern int pci_enable_msix(struct pci_dev *dev, 730extern int pci_enable_msix(struct pci_dev *dev,
725 struct msix_entry *entries, int nvec); 731 struct msix_entry *entries, int nvec);
732extern void pci_msix_shutdown(struct pci_dev *dev);
726extern void pci_disable_msix(struct pci_dev *dev); 733extern void pci_disable_msix(struct pci_dev *dev);
727extern void msi_remove_pci_irq_vectors(struct pci_dev *dev); 734extern void msi_remove_pci_irq_vectors(struct pci_dev *dev);
728extern void pci_restore_msi_state(struct pci_dev *dev); 735extern void pci_restore_msi_state(struct pci_dev *dev);
@@ -1053,5 +1060,13 @@ extern unsigned long pci_cardbus_mem_size;
1053 1060
1054extern int pcibios_add_platform_entries(struct pci_dev *dev); 1061extern int pcibios_add_platform_entries(struct pci_dev *dev);
1055 1062
1063#ifdef CONFIG_PCI_MMCONFIG
1064extern void __init pci_mmcfg_early_init(void);
1065extern void __init pci_mmcfg_late_init(void);
1066#else
1067static inline void pci_mmcfg_early_init(void) { }
1068static inline void pci_mmcfg_late_init(void) { }
1069#endif
1070
1056#endif /* __KERNEL__ */ 1071#endif /* __KERNEL__ */
1057#endif /* LINUX_PCI_H */ 1072#endif /* LINUX_PCI_H */