[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>
This commit is contained in:

committed by
Paul Mackerras

父節點
24f8c827f9
當前提交
549beb9ba3
@@ -436,36 +436,6 @@ static int __init pcibios_init(void)
|
||||
|
||||
subsys_initcall(pcibios_init);
|
||||
|
||||
int pcibios_enable_device(struct pci_dev *dev, int mask)
|
||||
{
|
||||
u16 cmd, oldcmd;
|
||||
int i;
|
||||
|
||||
pci_read_config_word(dev, PCI_COMMAND, &cmd);
|
||||
oldcmd = cmd;
|
||||
|
||||
for (i = 0; i < PCI_NUM_RESOURCES; i++) {
|
||||
struct resource *res = &dev->resource[i];
|
||||
|
||||
/* Only set up the requested stuff */
|
||||
if (!(mask & (1<<i)))
|
||||
continue;
|
||||
|
||||
if (res->flags & IORESOURCE_IO)
|
||||
cmd |= PCI_COMMAND_IO;
|
||||
if (res->flags & IORESOURCE_MEM)
|
||||
cmd |= PCI_COMMAND_MEMORY;
|
||||
}
|
||||
|
||||
if (cmd != oldcmd) {
|
||||
printk(KERN_DEBUG "PCI: Enabling device: (%s), cmd %x\n",
|
||||
pci_name(dev), cmd);
|
||||
/* Enable the appropriate bits in the PCI command register. */
|
||||
pci_write_config_word(dev, PCI_COMMAND, cmd);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HOTPLUG
|
||||
|
||||
int pcibios_unmap_io_space(struct pci_bus *bus)
|
||||
|
Reference in New Issue
Block a user