示例#1
0
int __init pci_acpi_init(void)
{
	struct pci_dev *dev = NULL;

	if (acpi_noirq)
		return -ENODEV;

	printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");
	acpi_irq_penalty_init();
	pcibios_enable_irq = acpi_pci_irq_enable;
	pcibios_disable_irq = acpi_pci_irq_disable;
	x86_init.pci.init_irq = x86_init_noop;

	if (pci_routeirq) {
		/*
		 * PCI IRQ routing is set up by pci_enable_device(), but we
		 * also do it here in case there are still broken drivers that
		 * don't use pci_enable_device().
		 */
		printk(KERN_INFO "PCI: Routing PCI interrupts for all devices because \"pci=routeirq\" specified\n");
		for_each_pci_dev(dev)
			acpi_pci_irq_enable(dev);
	}

	return 0;
}
示例#2
0
static void __init cell_pcibios_fixup(void)
{
	struct pci_dev *dev = NULL;

	for_each_pci_dev(dev)
		pci_read_irq_line(dev);
}
示例#3
0
static int __init l4vpci_x86_init(void)
{
	struct pci_dev *dev = NULL;
	struct pci_bus *bus;
	struct pci_sysdata *sd = kzalloc(sizeof(*sd), GFP_KERNEL);
	if (!sd)
		return -ENOMEM;

	bus = pci_scan_bus(0, &l4vpci_ops, sd);
	if (!bus) {
		pr_err("Failed to scan PCI bus\n");
		return -ENODEV;
	}

	pci_bus_add_devices(bus);

	pr_info("l4vPCI: Using L4-IO for IRQ routing\n");

	for_each_pci_dev(dev)
		l4vpci_irq_enable(dev);

	pcibios_resource_survey();

	return 0;
}
示例#4
0
/*
 * pci_dev parity list iterator
 *
 *	Scan the PCI device list looking for SERRORs, Master Parity ERRORS or
 *	Parity ERRORs on primary or secondary devices.
 */
static inline void edac_pci_dev_parity_iterator(pci_parity_check_fn_t fn)
{
	struct pci_dev *dev = NULL;

	for_each_pci_dev(dev)
		fn(dev);
}
void __devinit
pci_fixup_irqs(u8 (*swizzle)(struct pci_dev *, u8 *),
	       int (*map_irq)(const struct pci_dev *, u8, u8))
{
	struct pci_dev *dev = NULL;
	for_each_pci_dev(dev)
		pdev_fixup_irq(dev, swizzle, map_irq);
}
示例#6
0
void __init mpc83xx_pcibios_fixup(void)
{
	struct pci_dev *dev = NULL;

	/* map all the PCI irqs */
	for_each_pci_dev(dev)
		pci_read_irq_line(dev);
}
示例#7
0
static int __init pci_proc_init(void)
{
    struct pci_dev *dev = NULL;
    proc_bus_pci_dir = proc_mkdir("bus/pci", NULL);
    proc_create("devices", 0, proc_bus_pci_dir,
                &proc_bus_pci_dev_operations);
    proc_initialized = 1;
    for_each_pci_dev(dev)
    pci_proc_attach_device(dev);

    return 0;
}
示例#8
0
struct pci_bus * __init l4vpci_scan_bus(int nr, struct pci_sys_data *sys)
{
	struct pci_bus *b;
	struct pci_dev *dev = NULL;
	b = pci_scan_root_bus(NULL, sys->busnr, &l4vpci_ops, sys,
	                      &sys->resources);
	for_each_pci_dev(dev)
		l4vpci_irq_enable(dev);

	pci_bus_add_devices(b);

	return b;
}
示例#9
0
static int __init l4vpci_init(void)
{
	struct pci_dev *dev = NULL;
#ifdef CONFIG_ARM
	struct pci_sys_data *sd;
#else
	struct pci_sysdata *sd;
#endif
	int err;
	L4XV_V(f);

	vbus = l4re_get_env_cap("vbus");
	if (l4_is_invalid_cap(vbus))
		return -ENOENT;

	L4XV_L(f);

	err = l4vbus_get_device_by_hid(vbus, 0, &root_bridge, "PNP0A03", 0, 0);
	if (err < 0) {
		printk(KERN_INFO "PCI: no root bridge found, no PCI\n");
		L4XV_U(f);
		return err;
	}

	L4XV_U(f);

	printk(KERN_INFO "PCI: L4 root bridge is device %lx\n", root_bridge);

	sd = kzalloc(sizeof(*sd), GFP_KERNEL);
	if (!sd)
		return -ENOMEM;

	pci_scan_bus(0, &l4vpci_ops, sd);

	printk(KERN_INFO "PCI: Using L4-IO for IRQ routing\n");

	for_each_pci_dev(dev)
		l4vpci_irq_enable(dev);

#ifdef CONFIG_X86
	pcibios_resource_survey();
#endif

	return 0;
}