aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/pci.h37
1 files changed, 24 insertions, 13 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index c5e02f324e13..da1c22bab40e 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -82,7 +82,30 @@ enum pci_mmap_state {
82#define PCI_DMA_FROMDEVICE 2 82#define PCI_DMA_FROMDEVICE 2
83#define PCI_DMA_NONE 3 83#define PCI_DMA_NONE 3
84 84
85#define DEVICE_COUNT_RESOURCE 12 85/*
86 * For PCI devices, the region numbers are assigned this way:
87 */
88enum {
89 /* #0-5: standard PCI resources */
90 PCI_STD_RESOURCES,
91 PCI_STD_RESOURCE_END = 5,
92
93 /* #6: expansion ROM resource */
94 PCI_ROM_RESOURCE,
95
96 /* resources assigned to buses behind the bridge */
97#define PCI_BRIDGE_RESOURCE_NUM 4
98
99 PCI_BRIDGE_RESOURCES,
100 PCI_BRIDGE_RESOURCE_END = PCI_BRIDGE_RESOURCES +
101 PCI_BRIDGE_RESOURCE_NUM - 1,
102
103 /* total resources associated with a PCI device */
104 PCI_NUM_RESOURCES,
105
106 /* preserve this for compatibility */
107 DEVICE_COUNT_RESOURCE
108};
86 109
87typedef int __bitwise pci_power_t; 110typedef int __bitwise pci_power_t;
88 111
@@ -274,18 +297,6 @@ static inline void pci_add_saved_cap(struct pci_dev *pci_dev,
274 hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space); 297 hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space);
275} 298}
276 299
277/*
278 * For PCI devices, the region numbers are assigned this way:
279 *
280 * 0-5 standard PCI regions
281 * 6 expansion ROM
282 * 7-10 bridges: address space assigned to buses behind the bridge
283 */
284
285#define PCI_ROM_RESOURCE 6
286#define PCI_BRIDGE_RESOURCES 7
287#define PCI_NUM_RESOURCES 11
288
289#ifndef PCI_BUS_NUM_RESOURCES 300#ifndef PCI_BUS_NUM_RESOURCES
290#define PCI_BUS_NUM_RESOURCES 16 301#define PCI_BUS_NUM_RESOURCES 16
291#endif 302#endif