int pcibios_enable_device(struct pci_dev *dev, int mask) { int err; if ((err = pcibios_enable_resources(dev, mask)) < 0) return err; return 0; }
int pcibios_enable_device (struct pci_dev *dev, int mask) { int ret; ret = pcibios_enable_resources(dev, mask); if (ret < 0) return ret; return acpi_pci_irq_enable(dev); }
int pcibios_enable_device(struct pci_dev *dev, int mask) { int err; if ((err = pcibios_enable_resources(dev, mask)) < 0) return err; if (!dev->msi_enabled) pcibios_enable_irq(dev); return 0; }
int pcibios_enable_device (struct pci_dev *dev, int mask) { int ret; ret = pcibios_enable_resources(dev, mask); if (ret < 0) return ret; printk(KERN_INFO "PCI: Found IRQ %d for device %s\n", dev->irq, pci_name(dev)); return acpi_pci_irq_enable(dev); }
int pcibios_enable_device(struct pci_dev *dev, int mask) { int err; if ((err = pcibios_enable_resources(dev, mask)) < 0) return err; /* * Linux enables IRQs here. */ return 0; }
static void __init quirk_sbpci_bridge(struct pci_dev *dev) { if (dev->bus->number != 1 || PCI_SLOT(dev->devfn) != 0) return; printk("PCI: Fixing up bridge\n"); /* Enable PCI bridge bus mastering and memory space */ pci_set_master(dev); pcibios_enable_resources(dev); /* Enable PCI bridge BAR1 prefetch and burst */ pci_write_config_dword(dev, PCI_BAR1_CONTROL, 3); }
/* * Initialization. Try all known PCI access methods. Note that we support * using both PCI BIOS and direct access: in such cases, we use I/O ports * to access config space, but we still keep BIOS order of cards to be * compatible with 2.0.X. This should go away some day. */ static int __init pcibios_init(void) { ioport_resource.start = 0xA0000000; ioport_resource.end = 0xDFFFFFFF; iomem_resource.start = 0xA0000000; iomem_resource.end = 0xDFFFFFFF; if (!pci_probe) return 0; if (pci_check_direct() < 0) { printk(KERN_WARNING "PCI: No PCI bus detected\n"); return 0; } printk(KERN_INFO "PCI: Probing PCI hardware [mempage %08x]\n", MEM_PAGING_REG); { #if 0 static struct pci_bus am33_root_bus = { .children = LIST_HEAD_INIT(am33_root_bus.children), .devices = LIST_HEAD_INIT(am33_root_bus.devices), .number = 0, .secondary = 0, .resource = { &ioport_resource, &iomem_resource }, }; am33_root_bus.ops = pci_root_ops; list_add_tail(&am33_root_bus.node, &pci_root_buses); am33_root_bus.subordinate = pci_do_scan_bus(0); pci_root_bus = &am33_root_bus; #else pci_root_bus = pci_scan_bus(0, &pci_direct_ampci, NULL); #endif } pcibios_irq_init(); pcibios_fixup_irqs(); #if 0 pcibios_resource_survey(); #endif return 0; } arch_initcall(pcibios_init); char *__init pcibios_setup(char *str) { if (!strcmp(str, "off")) { pci_probe = 0; return NULL; } else if (!strncmp(str, "lastbus=", 8)) { pcibios_last_bus = simple_strtol(str+8, NULL, 0); return NULL; } return str; } int pcibios_enable_device(struct pci_dev *dev, int mask) { int err; err = pcibios_enable_resources(dev, mask); if (err == 0) pcibios_enable_irq(dev); return err; }
int pcibios_enable_device(struct pci_dev *dev, int mask) { ulong flags; uint coreidx; void *regs; /* External PCI device enable */ if (dev->bus->number != 0) return pcibios_enable_resources(dev); /* These cores come out of reset enabled */ if (dev->device == SB_MIPS || dev->device == SB_MIPS33 || dev->device == SB_EXTIF || dev->device == SB_CC) return 0; spin_lock_irqsave(&sbh_lock, flags); coreidx = sb_coreidx(sbh); regs = sb_setcoreidx(sbh, PCI_SLOT(dev->devfn)); if (!regs) return PCIBIOS_DEVICE_NOT_FOUND; /* * The USB core requires a special bit to be set during core * reset to enable host (OHCI) mode. Resetting the SB core in * pcibios_enable_device() is a hack for compatibility with * vanilla usb-ohci so that it does not have to know about * SB. A driver that wants to use the USB core in device mode * should know about SB and should reset the bit back to 0 * after calling pcibios_enable_device(). */ if (sb_coreid(sbh) == SB_USB) { sb_core_disable(sbh, sb_coreflags(sbh, 0, 0)); sb_core_reset(sbh, 1 << 29, 0); } /* * USB 2.0 special considerations: * * 1. Since the core supports both OHCI and EHCI functions, it must * only be reset once. * * 2. In addition to the standard SB reset sequence, the Host Control * Register must be programmed to bring the USB core and various * phy components out of reset. */ else if (sb_coreid(sbh) == SB_USB20H) { if (!sb_iscoreup(sbh)) { sb_core_reset(sbh, 0, 0); writel(0x7FF, (ulong)regs + 0x200); udelay(1); } } else sb_core_reset(sbh, 0, 0); sb_setcoreidx(sbh, coreidx); spin_unlock_irqrestore(&sbh_lock, flags); return 0; }