summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorIvan Kokshaysky <ink@jurassic.park.msu.ru>2002-09-07 18:23:34 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-09-07 18:23:34 -0700
commit36780249955396f8c9a76192f360ac3a8e9d1e01 (patch)
tree5733cceaf034bbe8a3926f22c0d06cdeefeb9227 /include/linux
parentbe4bde6098bb8738c291d8f6679b0c071e227161 (diff)
[PATCH] pci bus resources, transparent bridges
Added PCI_BUS_NUM_RESOURCES as Ben suggested. Default value is 4 and can be overridden by arch (probably in asm/system.h). pci_read_bridge_bases() and pci_assign_bus_resource() changed accordingly. "for (i = 0 ; i < 4; i++)" in pci_add_new_bus() not changed, as it's used _only_ for pci-pci and cardbus bridges.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pci.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 3c76341f02bf..b82ec8e41174 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -386,6 +386,9 @@ struct pci_dev {
int ro; /* ISAPnP: read only */
unsigned short regs; /* ISAPnP: supported registers */
+ /* These fields are used by common fixups */
+ unsigned short transparent:1; /* Transparent PCI bridge */
+
int (*prepare)(struct pci_dev *dev); /* ISAPnP hooks */
int (*activate)(struct pci_dev *dev);
int (*deactivate)(struct pci_dev *dev);
@@ -406,6 +409,10 @@ struct pci_dev {
#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 4
+#endif
#define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */
@@ -415,7 +422,8 @@ struct pci_bus {
struct list_head children; /* list of child buses */
struct list_head devices; /* list of devices on this bus */
struct pci_dev *self; /* bridge device as seen by parent */
- struct resource *resource[4]; /* address space routed to this bus */
+ struct resource *resource[PCI_BUS_NUM_RESOURCES];
+ /* address space routed to this bus */
struct pci_ops *ops; /* configuration access functions */
void *sysdata; /* hook for sys-specific extension */