aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc/dino.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/parisc/dino.c')
-rw-r--r--drivers/parisc/dino.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c
index 7ff10c1e8664..0610e91bceb2 100644
--- a/drivers/parisc/dino.c
+++ b/drivers/parisc/dino.c
@@ -553,7 +553,6 @@ dino_fixup_bus(struct pci_bus *bus)
553 struct list_head *ln; 553 struct list_head *ln;
554 struct pci_dev *dev; 554 struct pci_dev *dev;
555 struct dino_device *dino_dev = DINO_DEV(parisc_walk_tree(bus->bridge)); 555 struct dino_device *dino_dev = DINO_DEV(parisc_walk_tree(bus->bridge));
556 int port_base = HBA_PORT_BASE(dino_dev->hba.hba_num);
557 556
558 DBG(KERN_WARNING "%s(0x%p) bus %d platform_data 0x%p\n", 557 DBG(KERN_WARNING "%s(0x%p) bus %d platform_data 0x%p\n",
559 __func__, bus, bus->secondary, 558 __func__, bus, bus->secondary,
@@ -599,8 +598,6 @@ dino_fixup_bus(struct pci_bus *bus)
599 598
600 599
601 list_for_each(ln, &bus->devices) { 600 list_for_each(ln, &bus->devices) {
602 int i;
603
604 dev = pci_dev_b(ln); 601 dev = pci_dev_b(ln);
605 if (is_card_dino(&dino_dev->hba.dev->id)) 602 if (is_card_dino(&dino_dev->hba.dev->id))
606 dino_card_fixup(dev); 603 dino_card_fixup(dev);
@@ -612,21 +609,6 @@ dino_fixup_bus(struct pci_bus *bus)
612 if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) 609 if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI)
613 continue; 610 continue;
614 611
615 /* Adjust the I/O Port space addresses */
616 for (i = 0; i < PCI_NUM_RESOURCES; i++) {
617 struct resource *res = &dev->resource[i];
618 if (res->flags & IORESOURCE_IO) {
619 res->start |= port_base;
620 res->end |= port_base;
621 }
622#ifdef __LP64__
623 /* Sign Extend MMIO addresses */
624 else if (res->flags & IORESOURCE_MEM) {
625 res->start |= F_EXTEND(0UL);
626 res->end |= F_EXTEND(0UL);
627 }
628#endif
629 }
630 /* null out the ROM resource if there is one (we don't 612 /* null out the ROM resource if there is one (we don't
631 * care about an expansion rom on parisc, since it 613 * care about an expansion rom on parisc, since it
632 * usually contains (x86) bios code) */ 614 * usually contains (x86) bios code) */
@@ -991,11 +973,14 @@ static int __init dino_probe(struct parisc_device *dev)
991 973
992 dev->dev.platform_data = dino_dev; 974 dev->dev.platform_data = dino_dev;
993 975
994 pci_add_resource(&resources, &dino_dev->hba.io_space); 976 pci_add_resource_offset(&resources, &dino_dev->hba.io_space,
977 HBA_PORT_BASE(dino_dev->hba.hba_num));
995 if (dino_dev->hba.lmmio_space.flags) 978 if (dino_dev->hba.lmmio_space.flags)
996 pci_add_resource(&resources, &dino_dev->hba.lmmio_space); 979 pci_add_resource_offset(&resources, &dino_dev->hba.lmmio_space,
980 dino_dev->hba.lmmio_space_offset);
997 if (dino_dev->hba.elmmio_space.flags) 981 if (dino_dev->hba.elmmio_space.flags)
998 pci_add_resource(&resources, &dino_dev->hba.elmmio_space); 982 pci_add_resource_offset(&resources, &dino_dev->hba.elmmio_space,
983 dino_dev->hba.lmmio_space_offset);
999 if (dino_dev->hba.gmmio_space.flags) 984 if (dino_dev->hba.gmmio_space.flags)
1000 pci_add_resource(&resources, &dino_dev->hba.gmmio_space); 985 pci_add_resource(&resources, &dino_dev->hba.gmmio_space);
1001 986