aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc/dino.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-05-17 21:51:11 -0400
committerBjorn Helgaas <bhelgaas@google.com>2012-06-13 17:42:22 -0400
commitb918c62e086b2130a7bae44110ca516ef10bfe5a (patch)
treee4aee0e76da9a6ddd2d787de63f4ae7ad4d10e59 /drivers/parisc/dino.c
parent92f02430934ca1c1e991a1ab3541880575042697 (diff)
PCI: replace struct pci_bus secondary/subordinate with busn_res
Replace the struct pci_bus secondary/subordinate members with the struct resource busn_res. Later we'll build a resource tree of these bus numbers. [bhelgaas: changelog] Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/parisc/dino.c')
-rw-r--r--drivers/parisc/dino.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c
index 432d4bbcc62a..70517b0f94e6 100644
--- a/drivers/parisc/dino.c
+++ b/drivers/parisc/dino.c
@@ -174,7 +174,7 @@ static int dino_cfg_read(struct pci_bus *bus, unsigned int devfn, int where,
174 int size, u32 *val) 174 int size, u32 *val)
175{ 175{
176 struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge)); 176 struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge));
177 u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; 177 u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start;
178 u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3); 178 u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3);
179 void __iomem *base_addr = d->hba.base_addr; 179 void __iomem *base_addr = d->hba.base_addr;
180 unsigned long flags; 180 unsigned long flags;
@@ -209,7 +209,7 @@ static int dino_cfg_write(struct pci_bus *bus, unsigned int devfn, int where,
209 int size, u32 val) 209 int size, u32 val)
210{ 210{
211 struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge)); 211 struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge));
212 u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; 212 u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start;
213 u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3); 213 u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3);
214 void __iomem *base_addr = d->hba.base_addr; 214 void __iomem *base_addr = d->hba.base_addr;
215 unsigned long flags; 215 unsigned long flags;
@@ -554,7 +554,7 @@ dino_fixup_bus(struct pci_bus *bus)
554 struct dino_device *dino_dev = DINO_DEV(parisc_walk_tree(bus->bridge)); 554 struct dino_device *dino_dev = DINO_DEV(parisc_walk_tree(bus->bridge));
555 555
556 DBG(KERN_WARNING "%s(0x%p) bus %d platform_data 0x%p\n", 556 DBG(KERN_WARNING "%s(0x%p) bus %d platform_data 0x%p\n",
557 __func__, bus, bus->secondary, 557 __func__, bus, bus->busn_res.start,
558 bus->bridge->platform_data); 558 bus->bridge->platform_data);
559 559
560 /* Firmware doesn't set up card-mode dino, so we have to */ 560 /* Firmware doesn't set up card-mode dino, so we have to */
@@ -998,12 +998,12 @@ static int __init dino_probe(struct parisc_device *dev)
998 return 0; 998 return 0;
999 } 999 }
1000 1000
1001 bus->subordinate = pci_scan_child_bus(bus); 1001 bus->busn_res.end = pci_scan_child_bus(bus);
1002 1002
1003 /* This code *depends* on scanning being single threaded 1003 /* This code *depends* on scanning being single threaded
1004 * if it isn't, this global bus number count will fail 1004 * if it isn't, this global bus number count will fail
1005 */ 1005 */
1006 dino_current_bus = bus->subordinate + 1; 1006 dino_current_bus = bus->busn_res.end + 1;
1007 pci_bus_assign_resources(bus); 1007 pci_bus_assign_resources(bus);
1008 pci_bus_add_devices(bus); 1008 pci_bus_add_devices(bus);
1009 return 0; 1009 return 0;