return 0;
}
- return irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count);
+ return irq_create_of_mapping(&oirq);
}
static int __init pci_v3_dtprobe(struct platform_device *pdev,
oirq.args_count, oirq.args[0], oirq.args[1],
of_node_full_name(oirq.np));
- virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count);
+ virq = irq_create_of_mapping(&oirq);
}
if (!virq) {
pr_debug(" Failed to map !\n");
slot, pin);
return 0;
}
- irq = irq_create_of_mapping(dev_irq.np, dev_irq.args, dev_irq.args_count);
+ irq = irq_create_of_mapping(&dev_irq);
dev_info(&dev->dev, "SLOT:%d PIN:%d IRQ:%d\n", slot, pin, irq);
return irq;
}
return 0;
}
- irq = irq_create_of_mapping(dev_irq.np, dev_irq.args, dev_irq.args_count);
+ irq = irq_create_of_mapping(&dev_irq);
if (irq == 0)
pr_crit("pci %s: no irq found for pin %u\n",
oirq.args_count, oirq.args[0], oirq.args[1],
of_node_full_name(oirq.np));
- virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count);
+ virq = irq_create_of_mapping(&oirq);
}
if(virq == NO_IRQ) {
pr_debug(" Failed to map !\n");
pr_err("PCIEXC:Failed to map irq\n");
goto error;
}
- virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count);
+ virq = irq_create_of_mapping(&oirq);
if (request_irq(virq, pciex_handle_internal_irq,
0, "pciex", (void *)phb)) {
pr_err("PCIEXC:Failed to request irq\n");
#ifdef CONFIG_SERIAL_TXX9_CONSOLE
req.membase = ioremap(req.mapbase, 0x24);
#endif
- req.irq = irq_create_of_mapping(irq.np, irq.args, irq.args_count);
+ req.irq = irq_create_of_mapping(&irq);
req.flags |= UPF_IOREMAP | UPF_BUGGY_UART
/*HAVE_CTS_LINE*/;
req.uartclk = 83300000;
* tree in case the device-tree is ever fixed
*/
struct of_phandle_args oirq;
- if (of_irq_parse_one(pic->host->of_node, 0, &oirq) == 0) {
- virq = irq_create_of_mapping(oirq.np, oirq.args,
- oirq.args_count);
- return virq;
- }
+ if (of_irq_parse_one(pic->host->of_node, 0, &oirq) == 0)
+ return irq_create_of_mapping(&oirq);
/* Now do the horrible hacks */
tmp = of_get_property(pic->host->of_node, "#interrupt-cells", NULL);
ret = -EINVAL;
pr_debug(" irq %d no 0x%x on %s\n", i, oirq.args[0],
oirq.np->full_name);
- spu->irqs[i] = irq_create_of_mapping(oirq.np,
- oirq.args, oirq.args_count);
+ spu->irqs[i] = irq_create_of_mapping(&oirq);
if (spu->irqs[i] == NO_IRQ) {
pr_debug("spu_new: failed to map it !\n");
goto err;
laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(31, 0) << 8);
laddr[1] = laddr[2] = 0;
of_irq_parse_raw(hosenode, &pin, 1, laddr, &oirq);
- dev->irq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count);
+ dev->irq = irq_create_of_mapping(&oirq);
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, hpcd_quirk_uli1575);
index++) {
if (count > 15)
break;
- virqs[count] = irq_create_of_mapping(oirq.np, oirq.args,
- oirq.args_count);
+ virqs[count] = irq_create_of_mapping(&oirq);
if (virqs[count] == NO_IRQ) {
pr_err("event-sources: Unable to allocate "
"interrupt number for %s\n",
if (ret)
return ret;
- virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count);
+ virq = irq_create_of_mapping(&oirq);
if (virq == 0)
return -EINVAL;
dev->irq = virq;
if (of_irq_parse_one(dev, index, &oirq))
return 0;
- return irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count);
+ return irq_create_of_mapping(&oirq);
}
EXPORT_SYMBOL_GPL(irq_of_parse_and_map);
if (ret)
return ret;
- return irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count);
+ return irq_create_of_mapping(&oirq);
}
static struct pci_bus *mvebu_pcie_scan_bus(int nr, struct pci_sys_data *sys)
struct of_phandle_args *out_irq);
extern int of_irq_parse_one(struct device_node *device, int index,
struct of_phandle_args *out_irq);
-extern unsigned int irq_create_of_mapping(struct device_node *controller,
- const u32 *intspec,
- unsigned int intsize);
+extern unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data);
extern int of_irq_to_resource(struct device_node *dev, int index,
struct resource *r);
extern int of_irq_count(struct device_node *dev);
}
EXPORT_SYMBOL_GPL(irq_create_strict_mappings);
-unsigned int irq_create_of_mapping(struct device_node *controller,
- const u32 *intspec, unsigned int intsize)
+unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data)
{
struct irq_domain *domain;
irq_hw_number_t hwirq;
unsigned int type = IRQ_TYPE_NONE;
unsigned int virq;
- domain = controller ? irq_find_host(controller) : irq_default_domain;
+ domain = irq_data->np ? irq_find_host(irq_data->np) : irq_default_domain;
if (!domain) {
pr_warn("no irq domain found for %s !\n",
- of_node_full_name(controller));
+ of_node_full_name(irq_data->np));
return 0;
}
/* If domain has no translation, then we assume interrupt line */
if (domain->ops->xlate == NULL)
- hwirq = intspec[0];
+ hwirq = irq_data->args[0];
else {
- if (domain->ops->xlate(domain, controller, intspec, intsize,
- &hwirq, &type))
+ if (domain->ops->xlate(domain, irq_data->np, irq_data->args,
+ irq_data->args_count, &hwirq, &type))
return 0;
}