aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 17:02:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 17:02:12 -0400
commit475c77edf826333aa61625f49d6a2bec26ecb5a6 (patch)
tree8e1c6c319e347cd3c649fdb0b3ab45971c6b19e7 /drivers/parisc
parent934e18b5cb4531cc6e81865bf54115cfd21d1ac6 (diff)
parent1488d5158dcd612fcdaf6b642451b026ee8bbcbb (diff)
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci
Pull PCI changes (including maintainer change) from Jesse Barnes: "This pull has some good cleanups from Bjorn and Yinghai, as well as some more code from Yinghai to better handle resource re-allocation when enabled. There's also a new initcall_debug feature from Arjan which will print out quirk timing information to help identify slow quirks for fixing or refinement (Yinghai sent in a few patches to do just that once the new debug code landed). Beyond that, I'm handing off PCI maintainership to Bjorn Helgaas. He's been a core PCI and Linux contributor for some time now, and has kindly volunteered to take over. I just don't feel I have the time for PCI review and work that it deserves lately (I've taken on some other projects), and haven't been as responsive lately as I'd like, so I approached Bjorn asking if he'd like to manage things. He's going to give it a try, and I'm confident he'll do at least as well as I have in keeping the tree managed, patches flowing, and keeping things stable." Fix up some fairly trivial conflicts due to other cleanups (mips device resource fixup cleanups clashing with list handling cleanup, ppc iseries removal clashing with pci_probe_only cleanup etc) * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci: (112 commits) PCI: Bjorn gets PCI hotplug too PCI: hand PCI maintenance over to Bjorn Helgaas unicore32/PCI: move <asm-generic/pci-bridge.h> include to asm/pci.h sparc/PCI: convert devtree and arch-probed bus addresses to resource powerpc/PCI: allow reallocation on PA Semi powerpc/PCI: convert devtree bus addresses to resource powerpc/PCI: compute I/O space bus-to-resource offset consistently arm/PCI: don't export pci_flags PCI: fix bridge I/O window bus-to-resource conversion x86/PCI: add spinlock held check to 'pcibios_fwaddrmap_lookup()' PCI / PCIe: Introduce command line option to disable ARI PCI: make acpihp use __pci_remove_bus_device instead PCI: export __pci_remove_bus_device PCI: Rename pci_remove_behind_bridge to pci_stop_and_remove_behind_bridge PCI: Rename pci_remove_bus_device to pci_stop_and_remove_bus_device PCI: print out PCI device info along with duration PCI: Move "pci reassigndev resource alignment" out of quirks.c PCI: Use class for quirk for usb host controller fixup PCI: Use class for quirk for ti816x class fixup PCI: Use class for quirk for intel e100 interrupt fixup ...
Diffstat (limited to 'drivers/parisc')
-rw-r--r--drivers/parisc/dino.c27
-rw-r--r--drivers/parisc/lba_pci.c31
2 files changed, 12 insertions, 46 deletions
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c
index 7ff10c1e866..0610e91bceb 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
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c
index d5f3d753a10..e8857647e21 100644
--- a/drivers/parisc/lba_pci.c
+++ b/drivers/parisc/lba_pci.c
@@ -635,7 +635,6 @@ lba_fixup_bus(struct pci_bus *bus)
635 u16 status; 635 u16 status;
636#endif 636#endif
637 struct lba_device *ldev = LBA_DEV(parisc_walk_tree(bus->bridge)); 637 struct lba_device *ldev = LBA_DEV(parisc_walk_tree(bus->bridge));
638 int lba_portbase = HBA_PORT_BASE(ldev->hba.hba_num);
639 638
640 DBG("lba_fixup_bus(0x%p) bus %d platform_data 0x%p\n", 639 DBG("lba_fixup_bus(0x%p) bus %d platform_data 0x%p\n",
641 bus, bus->secondary, bus->bridge->platform_data); 640 bus, bus->secondary, bus->bridge->platform_data);
@@ -726,27 +725,6 @@ lba_fixup_bus(struct pci_bus *bus)
726 if (!res->start) 725 if (!res->start)
727 continue; 726 continue;
728 727
729 if (res->flags & IORESOURCE_IO) {
730 DBG("lba_fixup_bus() I/O Ports [%lx/%lx] -> ",
731 res->start, res->end);
732 res->start |= lba_portbase;
733 res->end |= lba_portbase;
734 DBG("[%lx/%lx]\n", res->start, res->end);
735 } else if (res->flags & IORESOURCE_MEM) {
736 /*
737 ** Convert PCI (IO_VIEW) addresses to
738 ** processor (PA_VIEW) addresses
739 */
740 DBG("lba_fixup_bus() MMIO [%lx/%lx] -> ",
741 res->start, res->end);
742 res->start = PCI_HOST_ADDR(HBA_DATA(ldev), res->start);
743 res->end = PCI_HOST_ADDR(HBA_DATA(ldev), res->end);
744 DBG("[%lx/%lx]\n", res->start, res->end);
745 } else {
746 DBG("lba_fixup_bus() WTF? 0x%lx [%lx/%lx] XXX",
747 res->flags, res->start, res->end);
748 }
749
750 /* 728 /*
751 ** FIXME: this will result in whinging for devices 729 ** FIXME: this will result in whinging for devices
752 ** that share expansion ROMs (think quad tulip), but 730 ** that share expansion ROMs (think quad tulip), but
@@ -1514,11 +1492,14 @@ lba_driver_probe(struct parisc_device *dev)
1514 lba_dev->hba.lmmio_space.flags = 0; 1492 lba_dev->hba.lmmio_space.flags = 0;
1515 } 1493 }
1516 1494
1517 pci_add_resource(&resources, &lba_dev->hba.io_space); 1495 pci_add_resource_offset(&resources, &lba_dev->hba.io_space,
1496 HBA_PORT_BASE(lba_dev->hba.hba_num));
1518 if (lba_dev->hba.elmmio_space.start) 1497 if (lba_dev->hba.elmmio_space.start)
1519 pci_add_resource(&resources, &lba_dev->hba.elmmio_space); 1498 pci_add_resource_offset(&resources, &lba_dev->hba.elmmio_space,
1499 lba_dev->hba.lmmio_space_offset);
1520 if (lba_dev->hba.lmmio_space.flags) 1500 if (lba_dev->hba.lmmio_space.flags)
1521 pci_add_resource(&resources, &lba_dev->hba.lmmio_space); 1501 pci_add_resource_offset(&resources, &lba_dev->hba.lmmio_space,
1502 lba_dev->hba.lmmio_space_offset);
1522 if (lba_dev->hba.gmmio_space.flags) 1503 if (lba_dev->hba.gmmio_space.flags)
1523 pci_add_resource(&resources, &lba_dev->hba.gmmio_space); 1504 pci_add_resource(&resources, &lba_dev->hba.gmmio_space);
1524 1505