aboutsummaryrefslogtreecommitdiff
path: root/arch/parisc/kernel/pci.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-20 20:19:15 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-20 20:19:15 -0700
commitcfa76f024f7c9e65169425804e5b32e71f66d0ee (patch)
treeee64e98cbfb1b654842c9256446a9584857f6730 /arch/parisc/kernel/pci.c
parent093faa1dd26fc6766f8f04c429030757a8a0def4 (diff)
parent7210c678202bb3107085bffeb63f66a9b8ba1c85 (diff)
Merge branch 'master' of hera.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* 'master' of hera.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (29 commits) [PARISC] fix uninitialized variable warning in asm/rtc.h [PARISC] Port checkstack.pl to parisc [PARISC] Make palo target work when $obj != $src [PARISC] Zap unused variable warnings in pci.c [PARISC] Fix tests in palo target [PARISC] Fix palo target [PARISC] Restore palo target [PARISC] Attempt to clean up parisc/Makefile [PARISC] Fix infinite loop in /proc/iomem [PARISC] Quiet sysfs_create_link __must_check warnings in pdc_stable [PARISC] Squelch pci_enable_device __must_check warning in superio [PARISC] Kill off broken irqstack code [PARISC] Remove hardcoded uses of PAGE_SIZE [PARISC] Clean up pointless ASM_PAGE_SIZE_DIV use [PARISC] Kill off the last vestiges of ASM_PAGE_SIZE [PARISC] Kill off ASM_PAGE_SIZE use [PARISC] Beautify parisc vmlinux.lds.S [PARISC] Clean up a resource_size_t warning in sba_iommu [PARISC] Kill incorrect cast warning in unwinder [PARISC] Kill zone_to_nid printk warning ... Fixed trivial conflict in include/asm-parisc/tlbflush.h manually
Diffstat (limited to 'arch/parisc/kernel/pci.c')
-rw-r--r--arch/parisc/kernel/pci.c42
1 files changed, 5 insertions, 37 deletions
diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c
index 563df0072de..507d0ac99f6 100644
--- a/arch/parisc/kernel/pci.c
+++ b/arch/parisc/kernel/pci.c
@@ -194,37 +194,13 @@ void __init pcibios_init_bus(struct pci_bus *bus)
pci_write_config_word(dev, PCI_BRIDGE_CONTROL, bridge_ctl);
}
-
-/* KLUGE: Link the child and parent resources - generic PCI didn't */
-static void
-pcibios_link_hba_resources( struct resource *hba_res, struct resource *r)
-{
- if (!r->parent) {
- printk(KERN_EMERG "PCI: resource not parented! [%p-%p]\n",
- (void*) r->start, (void*) r->end);
- r->parent = hba_res;
-
- /* reverse link is harder *sigh* */
- if (r->parent->child) {
- if (r->parent->sibling) {
- struct resource *next = r->parent->sibling;
- while (next->sibling)
- next = next->sibling;
- next->sibling = r;
- } else {
- r->parent->sibling = r;
- }
- } else
- r->parent->child = r;
- }
-}
-
/* called by drivers/pci/setup-bus.c:pci_setup_bridge(). */
void __devinit pcibios_resource_to_bus(struct pci_dev *dev,
struct pci_bus_region *region, struct resource *res)
{
- struct pci_bus *bus = dev->bus;
- struct pci_hba_data *hba = HBA_DATA(bus->bridge->platform_data);
+#ifdef CONFIG_64BIT
+ struct pci_hba_data *hba = HBA_DATA(dev->bus->bridge->platform_data);
+#endif
if (res->flags & IORESOURCE_IO) {
/*
@@ -243,23 +219,15 @@ void __devinit pcibios_resource_to_bus(struct pci_dev *dev,
}
DBG_RES("pcibios_resource_to_bus(%02x %s [%lx,%lx])\n",
- bus->number, res->flags & IORESOURCE_IO ? "IO" : "MEM",
+ dev->bus->number, res->flags & IORESOURCE_IO ? "IO" : "MEM",
region->start, region->end);
-
- /* KLUGE ALERT
- ** if this resource isn't linked to a "parent", then it seems
- ** to be a child of the HBA - lets link it in.
- */
- pcibios_link_hba_resources(&hba->io_space, bus->resource[0]);
- pcibios_link_hba_resources(&hba->lmmio_space, bus->resource[1]);
}
void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
struct pci_bus_region *region)
{
#ifdef CONFIG_64BIT
- struct pci_bus *bus = dev->bus;
- struct pci_hba_data *hba = HBA_DATA(bus->bridge->platform_data);
+ struct pci_hba_data *hba = HBA_DATA(dev->bus->bridge->platform_data);
#endif
if (res->flags & IORESOURCE_MEM) {