aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-21 18:58:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-21 18:58:35 -0400
commitbda0c0afa7a694bb1459fd023515aca681e4d79a (patch)
treecd8b9d9811463de2065cbe79d59689082d6c53cf /arch/powerpc/kernel
parent904e0ab54b7591b9cb01cfc0dbbedcc8bc0d949b (diff)
parentaf40b485ea2d957ae2f237ab0e33539ae8f29562 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6: (42 commits) PCI: Change PCI subsystem MAINTAINER PCI: pci-iommu-iotlb-flushing-speedup PCI: pci_setup_bridge() mustn't be __devinit PCI: pci_bus_size_cardbus() mustn't be __devinit PCI: pci_scan_device() mustn't be __devinit PCI: pci_alloc_child_bus() mustn't be __devinit PCI: replace remaining __FUNCTION__ occurrences PCI: Hotplug: fakephp: Return success, not ENODEV, when bus rescan is triggered PCI: Hotplug: Fix leaks in IBM Hot Plug Controller Driver - ibmphp_init_devno() PCI: clean up resource alignment management PCI: aerdrv_acpi.c: remove unneeded NULL check PCI: Update VIA CX700 quirk PCI: Expose PCI VPD through sysfs PCI: iommu: iotlb flushing PCI: simplify quirk debug output PCI: iova RB tree setup tweak PCI: parisc: use generic pci_enable_resources() PCI: ppc: use generic pci_enable_resources() PCI: powerpc: use generic pci_enable_resources() PCI: ia64: use generic pci_enable_resources() ...
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/pci-common.c34
1 files changed, 1 insertions, 33 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 89c83ccb85c1..063cdd413049 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -1161,41 +1161,9 @@ EXPORT_SYMBOL_GPL(pcibios_claim_one_bus);
1161 1161
1162int pcibios_enable_device(struct pci_dev *dev, int mask) 1162int pcibios_enable_device(struct pci_dev *dev, int mask)
1163{ 1163{
1164 u16 cmd, old_cmd;
1165 int idx;
1166 struct resource *r;
1167
1168 if (ppc_md.pcibios_enable_device_hook) 1164 if (ppc_md.pcibios_enable_device_hook)
1169 if (ppc_md.pcibios_enable_device_hook(dev)) 1165 if (ppc_md.pcibios_enable_device_hook(dev))
1170 return -EINVAL; 1166 return -EINVAL;
1171 1167
1172 pci_read_config_word(dev, PCI_COMMAND, &cmd); 1168 return pci_enable_resources(dev, mask);
1173 old_cmd = cmd;
1174 for (idx = 0; idx < PCI_NUM_RESOURCES; idx++) {
1175 /* Only set up the requested stuff */
1176 if (!(mask & (1 << idx)))
1177 continue;
1178 r = &dev->resource[idx];
1179 if (!(r->flags & (IORESOURCE_IO | IORESOURCE_MEM)))
1180 continue;
1181 if ((idx == PCI_ROM_RESOURCE) &&
1182 (!(r->flags & IORESOURCE_ROM_ENABLE)))
1183 continue;
1184 if (r->parent == NULL) {
1185 printk(KERN_ERR "PCI: Device %s not available because"
1186 " of resource collisions\n", pci_name(dev));
1187 return -EINVAL;
1188 }
1189 if (r->flags & IORESOURCE_IO)
1190 cmd |= PCI_COMMAND_IO;
1191 if (r->flags & IORESOURCE_MEM)
1192 cmd |= PCI_COMMAND_MEMORY;
1193 }
1194 if (cmd != old_cmd) {
1195 printk("PCI: Enabling device %s (%04x -> %04x)\n",
1196 pci_name(dev), old_cmd, cmd);
1197 pci_write_config_word(dev, PCI_COMMAND, cmd);
1198 }
1199 return 0;
1200} 1169}
1201