diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pci.h | 33 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 3 | ||||
-rw-r--r-- | include/linux/pm_legacy.h | 7 |
3 files changed, 34 insertions, 9 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 0aad5a378e95..3a6a4e37a482 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -97,7 +97,13 @@ enum pci_channel_state { | |||
97 | 97 | ||
98 | typedef unsigned short __bitwise pci_bus_flags_t; | 98 | typedef unsigned short __bitwise pci_bus_flags_t; |
99 | enum pci_bus_flags { | 99 | enum pci_bus_flags { |
100 | PCI_BUS_FLAGS_NO_MSI = (pci_bus_flags_t) 1, | 100 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, |
101 | }; | ||
102 | |||
103 | struct pci_cap_saved_state { | ||
104 | struct hlist_node next; | ||
105 | char cap_nr; | ||
106 | u32 data[0]; | ||
101 | }; | 107 | }; |
102 | 108 | ||
103 | /* | 109 | /* |
@@ -159,6 +165,7 @@ struct pci_dev { | |||
159 | unsigned int block_ucfg_access:1; /* userspace config space access is blocked */ | 165 | unsigned int block_ucfg_access:1; /* userspace config space access is blocked */ |
160 | 166 | ||
161 | u32 saved_config_space[16]; /* config space saved at suspend time */ | 167 | u32 saved_config_space[16]; /* config space saved at suspend time */ |
168 | struct hlist_head saved_cap_space; | ||
162 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ | 169 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ |
163 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ | 170 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ |
164 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ | 171 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ |
@@ -169,6 +176,30 @@ struct pci_dev { | |||
169 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) | 176 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) |
170 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) | 177 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) |
171 | 178 | ||
179 | static inline struct pci_cap_saved_state *pci_find_saved_cap( | ||
180 | struct pci_dev *pci_dev,char cap) | ||
181 | { | ||
182 | struct pci_cap_saved_state *tmp; | ||
183 | struct hlist_node *pos; | ||
184 | |||
185 | hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) { | ||
186 | if (tmp->cap_nr == cap) | ||
187 | return tmp; | ||
188 | } | ||
189 | return NULL; | ||
190 | } | ||
191 | |||
192 | static inline void pci_add_saved_cap(struct pci_dev *pci_dev, | ||
193 | struct pci_cap_saved_state *new_cap) | ||
194 | { | ||
195 | hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space); | ||
196 | } | ||
197 | |||
198 | static inline void pci_remove_saved_cap(struct pci_cap_saved_state *cap) | ||
199 | { | ||
200 | hlist_del(&cap->next); | ||
201 | } | ||
202 | |||
172 | /* | 203 | /* |
173 | * For PCI devices, the region numbers are assigned this way: | 204 | * For PCI devices, the region numbers are assigned this way: |
174 | * | 205 | * |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 870fe38378b1..8d03e10212f5 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -497,7 +497,8 @@ | |||
497 | #define PCI_DEVICE_ID_AMD_8111_SMBUS 0x746b | 497 | #define PCI_DEVICE_ID_AMD_8111_SMBUS 0x746b |
498 | #define PCI_DEVICE_ID_AMD_8111_AUDIO 0x746d | 498 | #define PCI_DEVICE_ID_AMD_8111_AUDIO 0x746d |
499 | #define PCI_DEVICE_ID_AMD_8151_0 0x7454 | 499 | #define PCI_DEVICE_ID_AMD_8151_0 0x7454 |
500 | #define PCI_DEVICE_ID_AMD_8131_APIC 0x7450 | 500 | #define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450 |
501 | #define PCI_DEVICE_ID_AMD_8131_APIC 0x7451 | ||
501 | #define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090 | 502 | #define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090 |
502 | #define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091 | 503 | #define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091 |
503 | #define PCI_DEVICE_ID_AMD_CS5536_AUDIO 0x2093 | 504 | #define PCI_DEVICE_ID_AMD_CS5536_AUDIO 0x2093 |
diff --git a/include/linux/pm_legacy.h b/include/linux/pm_legacy.h index 1252b45face1..008932d73c35 100644 --- a/include/linux/pm_legacy.h +++ b/include/linux/pm_legacy.h | |||
@@ -16,11 +16,6 @@ struct pm_dev __deprecated * | |||
16 | pm_register(pm_dev_t type, unsigned long id, pm_callback callback); | 16 | pm_register(pm_dev_t type, unsigned long id, pm_callback callback); |
17 | 17 | ||
18 | /* | 18 | /* |
19 | * Unregister a device with power management | ||
20 | */ | ||
21 | void __deprecated pm_unregister(struct pm_dev *dev); | ||
22 | |||
23 | /* | ||
24 | * Unregister all devices with matching callback | 19 | * Unregister all devices with matching callback |
25 | */ | 20 | */ |
26 | void __deprecated pm_unregister_all(pm_callback callback); | 21 | void __deprecated pm_unregister_all(pm_callback callback); |
@@ -41,8 +36,6 @@ static inline struct pm_dev *pm_register(pm_dev_t type, | |||
41 | return NULL; | 36 | return NULL; |
42 | } | 37 | } |
43 | 38 | ||
44 | static inline void pm_unregister(struct pm_dev *dev) {} | ||
45 | |||
46 | static inline void pm_unregister_all(pm_callback callback) {} | 39 | static inline void pm_unregister_all(pm_callback callback) {} |
47 | 40 | ||
48 | static inline int pm_send_all(pm_request_t rqst, void *data) | 41 | static inline int pm_send_all(pm_request_t rqst, void *data) |