|
@@ -82,7 +82,30 @@ enum pci_mmap_state {
|
|
|
#define PCI_DMA_FROMDEVICE 2
|
|
|
#define PCI_DMA_NONE 3
|
|
|
|
|
|
-#define DEVICE_COUNT_RESOURCE 12
|
|
|
+/*
|
|
|
+ * For PCI devices, the region numbers are assigned this way:
|
|
|
+ */
|
|
|
+enum {
|
|
|
+ /* #0-5: standard PCI resources */
|
|
|
+ PCI_STD_RESOURCES,
|
|
|
+ PCI_STD_RESOURCE_END = 5,
|
|
|
+
|
|
|
+ /* #6: expansion ROM resource */
|
|
|
+ PCI_ROM_RESOURCE,
|
|
|
+
|
|
|
+ /* resources assigned to buses behind the bridge */
|
|
|
+#define PCI_BRIDGE_RESOURCE_NUM 4
|
|
|
+
|
|
|
+ PCI_BRIDGE_RESOURCES,
|
|
|
+ PCI_BRIDGE_RESOURCE_END = PCI_BRIDGE_RESOURCES +
|
|
|
+ PCI_BRIDGE_RESOURCE_NUM - 1,
|
|
|
+
|
|
|
+ /* total resources associated with a PCI device */
|
|
|
+ PCI_NUM_RESOURCES,
|
|
|
+
|
|
|
+ /* preserve this for compatibility */
|
|
|
+ DEVICE_COUNT_RESOURCE
|
|
|
+};
|
|
|
|
|
|
typedef int __bitwise pci_power_t;
|
|
|
|
|
@@ -274,18 +297,6 @@ static inline void pci_add_saved_cap(struct pci_dev *pci_dev,
|
|
|
hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space);
|
|
|
}
|
|
|
|
|
|
-/*
|
|
|
- * For PCI devices, the region numbers are assigned this way:
|
|
|
- *
|
|
|
- * 0-5 standard PCI regions
|
|
|
- * 6 expansion ROM
|
|
|
- * 7-10 bridges: address space assigned to buses behind the bridge
|
|
|
- */
|
|
|
-
|
|
|
-#define PCI_ROM_RESOURCE 6
|
|
|
-#define PCI_BRIDGE_RESOURCES 7
|
|
|
-#define PCI_NUM_RESOURCES 11
|
|
|
-
|
|
|
#ifndef PCI_BUS_NUM_RESOURCES
|
|
|
#define PCI_BUS_NUM_RESOURCES 16
|
|
|
#endif
|