mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
irqdomain: Use irq_domain_get_of_node() instead of direct field access
The struct irq_domain contains a "struct device_node *" field (of_node) that is almost the only link between the irqdomain and the device tree infrastructure. In order to prepare for the removal of that field, convert all users to use irq_domain_get_of_node() instead. Signed-off-by: Marc Zyngier <[email protected]> Reviewed-and-tested-by: Hanjun Guo <[email protected]> Tested-by: Lorenzo Pieralisi <[email protected]> Cc: <[email protected]> Cc: Tomasz Nowicki <[email protected]> Cc: Suravee Suthikulpanit <[email protected]> Cc: Graeme Gregory <[email protected]> Cc: Jake Oshins <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
e50226b4b8
commit
5d4c9bc776
32 changed files with 75 additions and 52 deletions
|
|
@ -144,7 +144,7 @@ static int combiner_irq_domain_xlate(struct irq_domain *d,
|
|||
unsigned long *out_hwirq,
|
||||
unsigned int *out_type)
|
||||
{
|
||||
if (d->of_node != controller)
|
||||
if (irq_domain_get_of_node(d) != controller)
|
||||
return -EINVAL;
|
||||
|
||||
if (intsize < 2)
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ int aic_common_irq_domain_xlate(struct irq_domain *d,
|
|||
|
||||
static void __init aic_common_ext_irq_of_init(struct irq_domain *domain)
|
||||
{
|
||||
struct device_node *node = domain->of_node;
|
||||
struct device_node *node = irq_domain_get_of_node(domain);
|
||||
struct irq_chip_generic *gc;
|
||||
struct aic_chip_data *aic;
|
||||
struct property *prop;
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ static int allocate_gic_irq(struct irq_domain *domain, unsigned virq,
|
|||
if (i < 0)
|
||||
return -ENODEV;
|
||||
|
||||
args.np = domain->parent->of_node;
|
||||
args.np = irq_domain_get_of_node(domain->parent);
|
||||
args.args_count = 3;
|
||||
args.args[0] = 0; /* SPI */
|
||||
args.args[1] = i;
|
||||
|
|
@ -172,7 +172,7 @@ static int crossbar_domain_xlate(struct irq_domain *d,
|
|||
unsigned long *out_hwirq,
|
||||
unsigned int *out_type)
|
||||
{
|
||||
if (d->of_node != controller)
|
||||
if (irq_domain_get_of_node(d) != controller)
|
||||
return -EINVAL; /* Shouldn't happen, really... */
|
||||
if (intsize != 3)
|
||||
return -EINVAL; /* Not GIC compliant */
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ static int gicv2m_irq_gic_domain_alloc(struct irq_domain *domain,
|
|||
struct irq_data *d;
|
||||
int err;
|
||||
|
||||
args.np = domain->parent->of_node;
|
||||
args.np = irq_domain_get_of_node(domain->parent);
|
||||
args.args_count = 3;
|
||||
args.args[0] = 0;
|
||||
args.args[1] = hwirq - 32;
|
||||
|
|
|
|||
|
|
@ -1267,7 +1267,7 @@ static int its_irq_gic_domain_alloc(struct irq_domain *domain,
|
|||
{
|
||||
struct of_phandle_args args;
|
||||
|
||||
args.np = domain->parent->of_node;
|
||||
args.np = irq_domain_get_of_node(domain->parent);
|
||||
args.args_count = 3;
|
||||
args.args[0] = GIC_IRQ_TYPE_LPI;
|
||||
args.args[1] = hwirq;
|
||||
|
|
|
|||
|
|
@ -742,7 +742,7 @@ static int gic_irq_domain_xlate(struct irq_domain *d,
|
|||
const u32 *intspec, unsigned int intsize,
|
||||
unsigned long *out_hwirq, unsigned int *out_type)
|
||||
{
|
||||
if (d->of_node != controller)
|
||||
if (irq_domain_get_of_node(d) != controller)
|
||||
return -EINVAL;
|
||||
if (intsize < 3)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -923,7 +923,7 @@ static int gic_irq_domain_xlate(struct irq_domain *d,
|
|||
{
|
||||
unsigned long ret = 0;
|
||||
|
||||
if (d->of_node != controller)
|
||||
if (irq_domain_get_of_node(d) != controller)
|
||||
return -EINVAL;
|
||||
if (intsize < 3)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ static int hip04_irq_domain_xlate(struct irq_domain *d,
|
|||
{
|
||||
unsigned long ret = 0;
|
||||
|
||||
if (d->of_node != controller)
|
||||
if (irq_domain_get_of_node(d) != controller)
|
||||
return -EINVAL;
|
||||
if (intsize < 3)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ static int imx_gpcv2_domain_xlate(struct irq_domain *domain,
|
|||
unsigned int *out_type)
|
||||
{
|
||||
/* Shouldn't happen, really... */
|
||||
if (domain->of_node != controller)
|
||||
if (irq_domain_get_of_node(domain) != controller)
|
||||
return -EINVAL;
|
||||
|
||||
/* Not GIC compliant */
|
||||
|
|
@ -202,7 +202,7 @@ static int imx_gpcv2_domain_alloc(struct irq_domain *domain,
|
|||
}
|
||||
|
||||
parent_args = *args;
|
||||
parent_args.np = domain->parent->of_node;
|
||||
parent_args.np = irq_domain_get_of_node(domain->parent);
|
||||
return irq_domain_alloc_irqs_parent(domain, irq, nr_irqs, &parent_args);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ static int mtk_sysirq_domain_alloc(struct irq_domain *domain, unsigned int virq,
|
|||
&mtk_sysirq_chip,
|
||||
domain->host_data);
|
||||
|
||||
gic_data.np = domain->parent->of_node;
|
||||
gic_data.np = irq_domain_get_of_node(domain->parent);
|
||||
return irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, &gic_data);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@ static void s3c_irq_demux(struct irq_desc *desc)
|
|||
* and one big domain for the dt case where the subintc
|
||||
* starts at hwirq number 32.
|
||||
*/
|
||||
offset = (intc->domain->of_node) ? 32 : 0;
|
||||
offset = irq_domain_get_of_node(intc->domain) ? 32 : 0;
|
||||
|
||||
chained_irq_enter(chip, desc);
|
||||
|
||||
|
|
@ -342,7 +342,7 @@ static inline int s3c24xx_handle_intc(struct s3c_irq_intc *intc,
|
|||
return false;
|
||||
|
||||
/* non-dt machines use individual domains */
|
||||
if (!intc->domain->of_node)
|
||||
if (!irq_domain_get_of_node(intc->domain))
|
||||
intc_offset = 0;
|
||||
|
||||
/* We have a problem that the INTOFFSET register does not always
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ static int tegra_ictlr_domain_xlate(struct irq_domain *domain,
|
|||
unsigned long *out_hwirq,
|
||||
unsigned int *out_type)
|
||||
{
|
||||
if (domain->of_node != controller)
|
||||
if (irq_domain_get_of_node(domain) != controller)
|
||||
return -EINVAL; /* Shouldn't happen, really... */
|
||||
if (intsize != 3)
|
||||
return -EINVAL; /* Not GIC compliant */
|
||||
|
|
@ -267,7 +267,7 @@ static int tegra_ictlr_domain_alloc(struct irq_domain *domain,
|
|||
}
|
||||
|
||||
parent_args = *args;
|
||||
parent_args.np = domain->parent->of_node;
|
||||
parent_args.np = irq_domain_get_of_node(domain->parent);
|
||||
return irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, &parent_args);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ static int vf610_mscm_ir_domain_alloc(struct irq_domain *domain, unsigned int vi
|
|||
&vf610_mscm_ir_irq_chip,
|
||||
domain->host_data);
|
||||
|
||||
gic_data.np = domain->parent->of_node;
|
||||
gic_data.np = irq_domain_get_of_node(domain->parent);
|
||||
|
||||
if (mscm_ir_data->is_nvic) {
|
||||
gic_data.args_count = 1;
|
||||
|
|
@ -205,7 +205,8 @@ static int __init vf610_mscm_ir_of_init(struct device_node *node,
|
|||
goto out_unmap;
|
||||
}
|
||||
|
||||
if (of_device_is_compatible(domain->parent->of_node, "arm,armv7m-nvic"))
|
||||
if (of_device_is_compatible(irq_domain_get_of_node(domain->parent),
|
||||
"arm,armv7m-nvic"))
|
||||
mscm_ir_data->is_nvic = true;
|
||||
|
||||
cpu_pm_register_notifier(&mscm_ir_notifier_block);
|
||||
|
|
|
|||
Loading…
Reference in a new issue