Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283377
b: refs/heads/master
c: dc7dce2
h: refs/heads/master
i:
  283375: 230ebeb
v: v3
  • Loading branch information
Bjorn Helgaas authored and Jesse Barnes committed Jan 6, 2012
1 parent 082b8fa commit de2b42f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 42605fa6665ea86bbbd4de61693a0b002830277b
refs/heads/master: dc7dce280a26d069ad5a58bf3da86e5e83415c65
29 changes: 17 additions & 12 deletions trunk/drivers/parisc/lba_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ lba_fixup_bus(struct pci_bus *bus)
}
} else {
/* Host-PCI Bridge */
int err, i;
int err;

DBG("lba_fixup_bus() %s [%lx/%lx]/%lx\n",
ldev->hba.io_space.name,
Expand All @@ -669,9 +669,6 @@ lba_fixup_bus(struct pci_bus *bus)
lba_dump_res(&ioport_resource, 2);
BUG();
}
/* advertize Host bridge resources to PCI bus */
bus->resource[0] = &(ldev->hba.io_space);
i = 1;

if (ldev->hba.elmmio_space.start) {
err = request_resource(&iomem_resource,
Expand All @@ -685,8 +682,7 @@ lba_fixup_bus(struct pci_bus *bus)

/* lba_dump_res(&iomem_resource, 2); */
/* BUG(); */
} else
bus->resource[i++] = &(ldev->hba.elmmio_space);
}
}

if (ldev->hba.lmmio_space.flags) {
Expand All @@ -696,8 +692,7 @@ lba_fixup_bus(struct pci_bus *bus)
"lmmio_space [%lx/%lx]\n",
(long)ldev->hba.lmmio_space.start,
(long)ldev->hba.lmmio_space.end);
} else
bus->resource[i++] = &(ldev->hba.lmmio_space);
}
}

#ifdef CONFIG_64BIT
Expand All @@ -712,7 +707,6 @@ lba_fixup_bus(struct pci_bus *bus)
lba_dump_res(&iomem_resource, 2);
BUG();
}
bus->resource[i++] = &(ldev->hba.gmmio_space);
}
#endif

Expand Down Expand Up @@ -1388,6 +1382,7 @@ static int __init
lba_driver_probe(struct parisc_device *dev)
{
struct lba_device *lba_dev;
LIST_HEAD(resources);
struct pci_bus *lba_bus;
struct pci_ops *cfg_ops;
u32 func_class;
Expand Down Expand Up @@ -1519,12 +1514,22 @@ lba_driver_probe(struct parisc_device *dev)
lba_dev->hba.lmmio_space.flags = 0;
}

pci_add_resource(&resources, &lba_dev->hba.io_space);
if (lba_dev->hba.elmmio_space.start)
pci_add_resource(&resources, &lba_dev->hba.elmmio_space);
if (lba_dev->hba.lmmio_space.flags)
pci_add_resource(&resources, &lba_dev->hba.lmmio_space);
if (lba_dev->hba.gmmio_space.flags)
pci_add_resource(&resources, &lba_dev->hba.gmmio_space);

dev->dev.platform_data = lba_dev;
lba_bus = lba_dev->hba.hba_bus =
pci_create_bus(&dev->dev, lba_dev->hba.bus_num.start,
cfg_ops, NULL);
if (!lba_bus)
pci_create_root_bus(&dev->dev, lba_dev->hba.bus_num.start,
cfg_ops, NULL, &resources);
if (!lba_bus) {
pci_free_resource_list(&resources);
return 0;
}

lba_bus->subordinate = pci_scan_child_bus(lba_bus);

Expand Down

0 comments on commit de2b42f

Please sign in to comment.