diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/device.h | 1 | ||||
-rw-r--r-- | include/linux/msi.h | 11 | ||||
-rw-r--r-- | include/linux/pci.h | 27 |
3 files changed, 27 insertions, 12 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index a0cd2ced31a9..ff83b61d283d 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -80,7 +80,6 @@ struct bus_type { | |||
80 | int (*resume)(struct device * dev); | 80 | int (*resume)(struct device * dev); |
81 | 81 | ||
82 | unsigned int drivers_autoprobe:1; | 82 | unsigned int drivers_autoprobe:1; |
83 | unsigned int multithread_probe:1; | ||
84 | }; | 83 | }; |
85 | 84 | ||
86 | extern int __must_check bus_register(struct bus_type * bus); | 85 | extern int __must_check bus_register(struct bus_type * bus); |
diff --git a/include/linux/msi.h b/include/linux/msi.h index e38fe6822cb4..94bb46d82efd 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef LINUX_MSI_H | 1 | #ifndef LINUX_MSI_H |
2 | #define LINUX_MSI_H | 2 | #define LINUX_MSI_H |
3 | 3 | ||
4 | #include <linux/list.h> | ||
5 | |||
4 | struct msi_msg { | 6 | struct msi_msg { |
5 | u32 address_lo; /* low 32 bits of msi message address */ | 7 | u32 address_lo; /* low 32 bits of msi message address */ |
6 | u32 address_hi; /* high 32 bits of msi message address */ | 8 | u32 address_hi; /* high 32 bits of msi message address */ |
@@ -24,10 +26,8 @@ struct msi_desc { | |||
24 | unsigned default_irq; /* default pre-assigned irq */ | 26 | unsigned default_irq; /* default pre-assigned irq */ |
25 | }msi_attrib; | 27 | }msi_attrib; |
26 | 28 | ||
27 | struct { | 29 | unsigned int irq; |
28 | __u16 head; | 30 | struct list_head list; |
29 | __u16 tail; | ||
30 | }link; | ||
31 | 31 | ||
32 | void __iomem *mask_base; | 32 | void __iomem *mask_base; |
33 | struct pci_dev *dev; | 33 | struct pci_dev *dev; |
@@ -41,6 +41,9 @@ struct msi_desc { | |||
41 | */ | 41 | */ |
42 | int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc); | 42 | int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc); |
43 | void arch_teardown_msi_irq(unsigned int irq); | 43 | void arch_teardown_msi_irq(unsigned int irq); |
44 | extern int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type); | ||
45 | extern void arch_teardown_msi_irqs(struct pci_dev *dev); | ||
46 | extern int arch_msi_check_device(struct pci_dev* dev, int nvec, int type); | ||
44 | 47 | ||
45 | 48 | ||
46 | #endif /* LINUX_MSI_H */ | 49 | #endif /* LINUX_MSI_H */ |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 972491089ac9..fbf3766dac1e 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -96,6 +96,19 @@ enum pci_channel_state { | |||
96 | pci_channel_io_perm_failure = (__force pci_channel_state_t) 3, | 96 | pci_channel_io_perm_failure = (__force pci_channel_state_t) 3, |
97 | }; | 97 | }; |
98 | 98 | ||
99 | typedef unsigned int __bitwise pcie_reset_state_t; | ||
100 | |||
101 | enum pcie_reset_state { | ||
102 | /* Reset is NOT asserted (Use to deassert reset) */ | ||
103 | pcie_deassert_reset = (__force pcie_reset_state_t) 1, | ||
104 | |||
105 | /* Use #PERST to reset PCI-E device */ | ||
106 | pcie_warm_reset = (__force pcie_reset_state_t) 2, | ||
107 | |||
108 | /* Use PCI-E Hot Reset to reset device */ | ||
109 | pcie_hot_reset = (__force pcie_reset_state_t) 3 | ||
110 | }; | ||
111 | |||
99 | typedef unsigned short __bitwise pci_bus_flags_t; | 112 | typedef unsigned short __bitwise pci_bus_flags_t; |
100 | enum pci_bus_flags { | 113 | enum pci_bus_flags { |
101 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, | 114 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, |
@@ -176,10 +189,12 @@ struct pci_dev { | |||
176 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ | 189 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ |
177 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ | 190 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ |
178 | #ifdef CONFIG_PCI_MSI | 191 | #ifdef CONFIG_PCI_MSI |
179 | unsigned int first_msi_irq; | 192 | struct list_head msi_list; |
180 | #endif | 193 | #endif |
181 | }; | 194 | }; |
182 | 195 | ||
196 | extern struct pci_dev *alloc_pci_dev(void); | ||
197 | |||
183 | #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list) | 198 | #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list) |
184 | #define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list) | 199 | #define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list) |
185 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) | 200 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) |
@@ -392,12 +407,6 @@ struct pci_driver { | |||
392 | .vendor = PCI_ANY_ID, .device = PCI_ANY_ID, \ | 407 | .vendor = PCI_ANY_ID, .device = PCI_ANY_ID, \ |
393 | .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID | 408 | .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID |
394 | 409 | ||
395 | /* | ||
396 | * pci_module_init is obsolete, this stays here till we fix up all usages of it | ||
397 | * in the tree. | ||
398 | */ | ||
399 | #define pci_module_init pci_register_driver | ||
400 | |||
401 | /** | 410 | /** |
402 | * PCI_VDEVICE - macro used to describe a specific pci device in short form | 411 | * PCI_VDEVICE - macro used to describe a specific pci device in short form |
403 | * @vend: the vendor name | 412 | * @vend: the vendor name |
@@ -532,6 +541,7 @@ static inline int pci_is_managed(struct pci_dev *pdev) | |||
532 | 541 | ||
533 | void pci_disable_device(struct pci_dev *dev); | 542 | void pci_disable_device(struct pci_dev *dev); |
534 | void pci_set_master(struct pci_dev *dev); | 543 | void pci_set_master(struct pci_dev *dev); |
544 | int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); | ||
535 | #define HAVE_PCI_SET_MWI | 545 | #define HAVE_PCI_SET_MWI |
536 | int __must_check pci_set_mwi(struct pci_dev *dev); | 546 | int __must_check pci_set_mwi(struct pci_dev *dev); |
537 | void pci_clear_mwi(struct pci_dev *dev); | 547 | void pci_clear_mwi(struct pci_dev *dev); |
@@ -730,6 +740,9 @@ static inline int pci_set_power_state(struct pci_dev *dev, pci_power_t state) { | |||
730 | static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; } | 740 | static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; } |
731 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; } | 741 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; } |
732 | 742 | ||
743 | static inline int pci_request_regions(struct pci_dev *dev, const char *res_name) { return -EIO; } | ||
744 | static inline void pci_release_regions(struct pci_dev *dev) { } | ||
745 | |||
733 | #define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0) | 746 | #define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0) |
734 | 747 | ||
735 | static inline void pci_block_user_cfg_access(struct pci_dev *dev) { } | 748 | static inline void pci_block_user_cfg_access(struct pci_dev *dev) { } |