aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-03-04 13:56:48 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-21 00:47:04 -0400
commit10f000a2fd805e8ccfe988e8615545467bb7f7df (patch)
tree571dfdd723e55c917d175d8320cace6b1d7e276f /arch/alpha
parentb81d988c04cacb1f7ffb76cbff2d150eb9f02948 (diff)
PCI: alpha: use generic pci_enable_resources()
Use the generic pci_enable_resources() instead of the arch-specific code. Unlike this arch-specific code, the generic version: - skips resources unless requested in "mask" - skips ROM resources unless IORESOURCE_ROM_ENABLE is set - checks for resource collisions with "!r->parent" Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/kernel/pci.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index 9dc1cee43265..c107cc08daf4 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -372,28 +372,7 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
372int 372int
373pcibios_enable_device(struct pci_dev *dev, int mask) 373pcibios_enable_device(struct pci_dev *dev, int mask)
374{ 374{
375 u16 cmd, oldcmd; 375 return pci_enable_resources(dev, mask);
376 int i;
377
378 pci_read_config_word(dev, PCI_COMMAND, &cmd);
379 oldcmd = cmd;
380
381 for (i = 0; i < PCI_NUM_RESOURCES; i++) {
382 struct resource *res = &dev->resource[i];
383
384 if (res->flags & IORESOURCE_IO)
385 cmd |= PCI_COMMAND_IO;
386 else if (res->flags & IORESOURCE_MEM)
387 cmd |= PCI_COMMAND_MEMORY;
388 }
389
390 if (cmd != oldcmd) {
391 printk(KERN_DEBUG "PCI: Enabling device: (%s), cmd %x\n",
392 pci_name(dev), cmd);
393 /* Enable the appropriate bits in the PCI command register. */
394 pci_write_config_word(dev, PCI_COMMAND, cmd);
395 }
396 return 0;
397} 376}
398 377
399/* 378/*