diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-12-19 22:54:57 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-20 00:18:11 -0500 |
commit | 549beb9ba3b03345cbd8e1233825d5b197a3f9f7 (patch) | |
tree | c192ba6cdfa13e9888d9e5f534d2862127d412cb /arch/powerpc/kernel/pci_64.c | |
parent | 24f8c827f9b8ab2c8644f7ab85a1b1d58fc0fcf7 (diff) |
[POWERPC] Merge 32 and 64 bits pcibios_enable_device
This merge the two implementations, based on the previously
fixed up 32 bits one. The pcibios_enable_device_hook in ppc_md
is now available for ppc64 use. Also remove the new unused
"initial" parameter from it and fixup users.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/pci_64.c')
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 2ec040b314d4..5949bbabd7fb 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -436,36 +436,6 @@ static int __init pcibios_init(void) | |||
436 | 436 | ||
437 | subsys_initcall(pcibios_init); | 437 | subsys_initcall(pcibios_init); |
438 | 438 | ||
439 | int pcibios_enable_device(struct pci_dev *dev, int mask) | ||
440 | { | ||
441 | u16 cmd, oldcmd; | ||
442 | int i; | ||
443 | |||
444 | pci_read_config_word(dev, PCI_COMMAND, &cmd); | ||
445 | oldcmd = cmd; | ||
446 | |||
447 | for (i = 0; i < PCI_NUM_RESOURCES; i++) { | ||
448 | struct resource *res = &dev->resource[i]; | ||
449 | |||
450 | /* Only set up the requested stuff */ | ||
451 | if (!(mask & (1<<i))) | ||
452 | continue; | ||
453 | |||
454 | if (res->flags & IORESOURCE_IO) | ||
455 | cmd |= PCI_COMMAND_IO; | ||
456 | if (res->flags & IORESOURCE_MEM) | ||
457 | cmd |= PCI_COMMAND_MEMORY; | ||
458 | } | ||
459 | |||
460 | if (cmd != oldcmd) { | ||
461 | printk(KERN_DEBUG "PCI: Enabling device: (%s), cmd %x\n", | ||
462 | pci_name(dev), cmd); | ||
463 | /* Enable the appropriate bits in the PCI command register. */ | ||
464 | pci_write_config_word(dev, PCI_COMMAND, cmd); | ||
465 | } | ||
466 | return 0; | ||
467 | } | ||
468 | |||
469 | #ifdef CONFIG_HOTPLUG | 439 | #ifdef CONFIG_HOTPLUG |
470 | 440 | ||
471 | int pcibios_unmap_io_space(struct pci_bus *bus) | 441 | int pcibios_unmap_io_space(struct pci_bus *bus) |