mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
irqchip: Switch to irq_domain_create_*()
irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Changhuang Liang <changhuang.liang@starfivetech.com> Link: https://lore.kernel.org/all/20250319092951.37667-22-jirislaby@kernel.org
This commit is contained in:
committed by
Thomas Gleixner
parent
7f68126a87
commit
affdc0d1bd
@@ -180,7 +180,7 @@ static void __init combiner_init(void __iomem *combiner_base,
|
||||
if (!combiner_data)
|
||||
return;
|
||||
|
||||
combiner_irq_domain = irq_domain_add_linear(np, nr_irq,
|
||||
combiner_irq_domain = irq_domain_create_linear(of_fwnode_handle(np), nr_irq,
|
||||
&combiner_irq_domain_ops, combiner_data);
|
||||
if (WARN_ON(!combiner_irq_domain)) {
|
||||
pr_warn("%s: irq domain init failed\n", __func__);
|
||||
|
||||
@@ -139,7 +139,7 @@ static int al_fic_register(struct device_node *node,
|
||||
struct irq_chip_generic *gc;
|
||||
int ret;
|
||||
|
||||
fic->domain = irq_domain_add_linear(node,
|
||||
fic->domain = irq_domain_create_linear(of_fwnode_handle(node),
|
||||
NR_FIC_IRQS,
|
||||
&irq_generic_chip_ops,
|
||||
fic);
|
||||
|
||||
@@ -205,9 +205,8 @@ static int alpine_msix_init_domains(struct alpine_msix_data *priv,
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
middle_domain = irq_domain_add_hierarchy(gic_domain, 0, 0, NULL,
|
||||
&alpine_msix_middle_domain_ops,
|
||||
priv);
|
||||
middle_domain = irq_domain_create_hierarchy(gic_domain, 0, 0, NULL,
|
||||
&alpine_msix_middle_domain_ops, priv);
|
||||
if (!middle_domain) {
|
||||
pr_err("Failed to create the MSIX middle domain\n");
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -348,7 +348,7 @@ static int __init mpic_msi_init(struct mpic *mpic, struct device_node *node,
|
||||
mpic->msi_doorbell_mask = PCI_MSI_FULL_DOORBELL_MASK;
|
||||
}
|
||||
|
||||
mpic->msi_inner_domain = irq_domain_add_linear(NULL, mpic->msi_doorbell_size,
|
||||
mpic->msi_inner_domain = irq_domain_create_linear(NULL, mpic->msi_doorbell_size,
|
||||
&mpic_msi_domain_ops, mpic);
|
||||
if (!mpic->msi_inner_domain)
|
||||
return -ENOMEM;
|
||||
@@ -861,7 +861,7 @@ static int __init mpic_of_init(struct device_node *node, struct device_node *par
|
||||
if (!mpic_is_ipi_available(mpic))
|
||||
nr_irqs = MPIC_PER_CPU_IRQS_NR;
|
||||
|
||||
mpic->domain = irq_domain_add_linear(node, nr_irqs, &mpic_irq_ops, mpic);
|
||||
mpic->domain = irq_domain_create_linear(of_fwnode_handle(node), nr_irqs, &mpic_irq_ops, mpic);
|
||||
if (!mpic->domain) {
|
||||
pr_err("%pOF: Unable to add IRQ domain\n", node);
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -82,7 +82,7 @@ static int __init aspeed_i2c_ic_of_init(struct device_node *node,
|
||||
goto err_iounmap;
|
||||
}
|
||||
|
||||
i2c_ic->irq_domain = irq_domain_add_linear(node, ASPEED_I2C_IC_NUM_BUS,
|
||||
i2c_ic->irq_domain = irq_domain_create_linear(of_fwnode_handle(node), ASPEED_I2C_IC_NUM_BUS,
|
||||
&aspeed_i2c_ic_irq_domain_ops,
|
||||
NULL);
|
||||
if (!i2c_ic->irq_domain) {
|
||||
|
||||
@@ -102,7 +102,7 @@ static int __init aspeed_intc_ic_of_init(struct device_node *node,
|
||||
writel(0xffffffff, intc_ic->base + INTC_INT_STATUS_REG);
|
||||
writel(0x0, intc_ic->base + INTC_INT_ENABLE_REG);
|
||||
|
||||
intc_ic->irq_domain = irq_domain_add_linear(node, INTC_IRQS_PER_WORD,
|
||||
intc_ic->irq_domain = irq_domain_create_linear(of_fwnode_handle(node), INTC_IRQS_PER_WORD,
|
||||
&aspeed_intc_ic_irq_domain_ops, intc_ic);
|
||||
if (!intc_ic->irq_domain) {
|
||||
ret = -ENOMEM;
|
||||
|
||||
@@ -165,7 +165,7 @@ static int aspeed_scu_ic_of_init_common(struct aspeed_scu_ic *scu_ic,
|
||||
goto err;
|
||||
}
|
||||
|
||||
scu_ic->irq_domain = irq_domain_add_linear(node, scu_ic->num_irqs,
|
||||
scu_ic->irq_domain = irq_domain_create_linear(of_fwnode_handle(node), scu_ic->num_irqs,
|
||||
&aspeed_scu_ic_domain_ops,
|
||||
scu_ic);
|
||||
if (!scu_ic->irq_domain) {
|
||||
|
||||
@@ -211,8 +211,8 @@ static int __init avic_of_init(struct device_node *node,
|
||||
set_handle_irq(avic_handle_irq);
|
||||
|
||||
/* Register our domain */
|
||||
vic->dom = irq_domain_add_simple(node, NUM_IRQS, 0,
|
||||
&avic_dom_ops, vic);
|
||||
vic->dom = irq_domain_create_simple(of_fwnode_handle(node), NUM_IRQS, 0,
|
||||
&avic_dom_ops, vic);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ static int __init ath79_misc_intc_of_init(
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
domain = irq_domain_add_linear(node, ATH79_MISC_IRQ_COUNT,
|
||||
domain = irq_domain_create_linear(of_fwnode_handle(node), ATH79_MISC_IRQ_COUNT,
|
||||
&misc_irq_domain_ops, base);
|
||||
if (!domain) {
|
||||
pr_err("Failed to add MISC irqdomain\n");
|
||||
@@ -188,7 +188,7 @@ void __init ath79_misc_irq_init(void __iomem *regs, int irq,
|
||||
else
|
||||
ath79_misc_irq_chip.irq_ack = ar724x_misc_irq_ack;
|
||||
|
||||
domain = irq_domain_add_legacy(NULL, ATH79_MISC_IRQ_COUNT,
|
||||
domain = irq_domain_create_legacy(NULL, ATH79_MISC_IRQ_COUNT,
|
||||
irq_base, 0, &misc_irq_domain_ops, regs);
|
||||
if (!domain)
|
||||
panic("Failed to create MISC irqdomain");
|
||||
|
||||
@@ -228,7 +228,7 @@ struct irq_domain *__init aic_common_of_init(struct device_node *node,
|
||||
goto err_iounmap;
|
||||
}
|
||||
|
||||
domain = irq_domain_add_linear(node, nchips * 32, ops, aic);
|
||||
domain = irq_domain_create_linear(of_fwnode_handle(node), nchips * 32, ops, aic);
|
||||
if (!domain) {
|
||||
ret = -ENOMEM;
|
||||
goto err_free_aic;
|
||||
|
||||
@@ -173,8 +173,8 @@ static int mip_init_domains(struct mip_priv *mip, struct device_node *np)
|
||||
{
|
||||
struct irq_domain *middle;
|
||||
|
||||
middle = irq_domain_add_hierarchy(mip->parent, 0, mip->num_msis, np,
|
||||
&mip_middle_domain_ops, mip);
|
||||
middle = irq_domain_create_hierarchy(mip->parent, 0, mip->num_msis, of_fwnode_handle(np),
|
||||
&mip_middle_domain_ops, mip);
|
||||
if (!middle)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ static int __init armctrl_of_init(struct device_node *node,
|
||||
if (!base)
|
||||
panic("%pOF: unable to map IC registers\n", node);
|
||||
|
||||
intc.domain = irq_domain_add_linear(node, MAKE_HWIRQ(NR_BANKS, 0),
|
||||
intc.domain = irq_domain_create_linear(of_fwnode_handle(node), MAKE_HWIRQ(NR_BANKS, 0),
|
||||
&armctrl_ops, NULL);
|
||||
if (!intc.domain)
|
||||
panic("%pOF: unable to create IRQ domain\n", node);
|
||||
|
||||
@@ -325,7 +325,7 @@ static int __init bcm2836_arm_irqchip_l1_intc_of_init(struct device_node *node,
|
||||
|
||||
bcm2835_init_local_timer_frequency();
|
||||
|
||||
intc.domain = irq_domain_add_linear(node, LAST_IRQ + 1,
|
||||
intc.domain = irq_domain_create_linear(of_fwnode_handle(node), LAST_IRQ + 1,
|
||||
&bcm2836_arm_irqchip_intc_ops,
|
||||
NULL);
|
||||
if (!intc.domain)
|
||||
|
||||
@@ -316,7 +316,7 @@ static int __init bcm6345_l1_of_init(struct device_node *dn,
|
||||
|
||||
raw_spin_lock_init(&intc->lock);
|
||||
|
||||
intc->domain = irq_domain_add_linear(dn, IRQS_PER_WORD * intc->n_words,
|
||||
intc->domain = irq_domain_create_linear(of_fwnode_handle(dn), IRQS_PER_WORD * intc->n_words,
|
||||
&bcm6345_l1_domain_ops,
|
||||
intc);
|
||||
if (!intc->domain) {
|
||||
|
||||
@@ -416,7 +416,7 @@ static int __init bcm7038_l1_of_init(struct device_node *dn,
|
||||
}
|
||||
}
|
||||
|
||||
intc->domain = irq_domain_add_linear(dn, IRQS_PER_WORD * intc->n_words,
|
||||
intc->domain = irq_domain_create_linear(of_fwnode_handle(dn), IRQS_PER_WORD * intc->n_words,
|
||||
&bcm7038_l1_domain_ops,
|
||||
intc);
|
||||
if (!intc->domain) {
|
||||
|
||||
@@ -264,7 +264,7 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn,
|
||||
goto out_free_l1_data;
|
||||
}
|
||||
|
||||
data->domain = irq_domain_add_linear(dn, IRQS_PER_WORD * data->n_words,
|
||||
data->domain = irq_domain_create_linear(of_fwnode_handle(dn), IRQS_PER_WORD * data->n_words,
|
||||
&irq_generic_chip_ops, NULL);
|
||||
if (!data->domain) {
|
||||
ret = -ENOMEM;
|
||||
|
||||
@@ -182,7 +182,7 @@ static int __init brcmstb_l2_intc_of_init(struct device_node *np,
|
||||
goto out_unmap;
|
||||
}
|
||||
|
||||
data->domain = irq_domain_add_linear(np, 32,
|
||||
data->domain = irq_domain_create_linear(of_fwnode_handle(np), 32,
|
||||
&irq_generic_chip_ops, NULL);
|
||||
if (!data->domain) {
|
||||
ret = -ENOMEM;
|
||||
|
||||
@@ -184,8 +184,8 @@ static int __init _clps711x_intc_init(struct device_node *np,
|
||||
clps711x_intc->ops.map = clps711x_intc_irq_map;
|
||||
clps711x_intc->ops.xlate = irq_domain_xlate_onecell;
|
||||
clps711x_intc->domain =
|
||||
irq_domain_add_legacy(np, ARRAY_SIZE(clps711x_irqs),
|
||||
0, 0, &clps711x_intc->ops, NULL);
|
||||
irq_domain_create_legacy(of_fwnode_handle(np), ARRAY_SIZE(clps711x_irqs), 0, 0,
|
||||
&clps711x_intc->ops, NULL);
|
||||
if (!clps711x_intc->domain) {
|
||||
err = -ENOMEM;
|
||||
goto out_irqfree;
|
||||
|
||||
@@ -351,10 +351,8 @@ static int __init irqcrossbar_init(struct device_node *node,
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
domain = irq_domain_add_hierarchy(parent_domain, 0,
|
||||
cb->max_crossbar_sources,
|
||||
node, &crossbar_domain_ops,
|
||||
NULL);
|
||||
domain = irq_domain_create_hierarchy(parent_domain, 0, cb->max_crossbar_sources,
|
||||
of_fwnode_handle(node), &crossbar_domain_ops, NULL);
|
||||
if (!domain) {
|
||||
pr_err("%pOF: failed to allocated domain\n", node);
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -114,7 +114,7 @@ ck_intc_init_comm(struct device_node *node, struct device_node *parent)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
root_domain = irq_domain_add_linear(node, nr_irq,
|
||||
root_domain = irq_domain_create_linear(of_fwnode_handle(node), nr_irq,
|
||||
&irq_generic_chip_ops, NULL);
|
||||
if (!root_domain) {
|
||||
pr_err("C-SKY Intc irq_domain_add failed.\n");
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user