irqdomain: export irq_domain_simple_ops for !CONFIG_OF
Subsystems (2)
PATCH 1/1 irqdomain: export irq_domain_simple_ops for !CONFIG_OF
irqdomain support is used in interrupt controller drivers that may not have device tree support but only need the basic HW->Linux irq translation. Rather than having each of these implement their own IRQ domain, allow them to use the simple ops.
--- include/linux/irqdomain.h | 3 ++- kernel/irq/irqdomain.c | 12 +++++++----- 2 files changed, 9 insertions(+), 6 deletions(-)
include/linux/irqdomain.h +2 -1
@@ -91,10 +91,11 @@ static inline unsigned int irq_domain_to_irq(struct irq_domain *d,extern void irq_domain_add (struct irq_domain *domain);extern void irq_domain_del (struct irq_domain *domain); + +extern struct irq_domain_ops irq_domain_simple_ops;#endif /* CONFIG_IRQ_DOMAIN */ #if defined(CONFIG_IRQ_DOMAIN ) && defined(CONFIG_OF_IRQ ) -extern struct irq_domain_ops irq_domain_simple_ops;extern void irq_domain_add_simple (struct device_node *controller,int irq_base);extern void irq_domain_generate_simple (const struct of_device_id *match,u64 phys_base,unsigned int irq_start);
kernel/irq/irqdomain.c +7 -5
@@ -143,11 +143,6 @@ int irq_domain_simple_dt_translate(struct irq_domain *d,return 0 ; } -struct irq_domain_ops irq_domain_simple_ops = { - .dt_translate = irq_domain_simple_dt_translate, -}; -EXPORT_SYMBOL_GPL (irq_domain_simple_ops); -/** * irq_domain_create_simple() - Set up a 'simple' translation range */
@@ -182,3 +177,10 @@ void irq_domain_generate_simple(const struct of_device_id *match, }EXPORT_SYMBOL_GPL (irq_domain_generate_simple);#endif /* CONFIG_OF_IRQ */ + +struct irq_domain_ops irq_domain_simple_ops = { +#ifdef CONFIG_OF_IRQ + .dt_translate = irq_domain_simple_dt_translate, +#endif /* CONFIG_OF_IRQ */ +}; +EXPORT_SYMBOL_GPL (irq_domain_simple_ops);
Signature · 1 line
1.7.4.1
Quoted 10 lines · Jamie Iles
irqdomain support is used in interrupt controller drivers that may not have device tree support but only need the basic
HW->Linuxirq translation. Rather than having each of these implement their own IRQ domain, allow them to use the simple ops.Cc Thomas Gleixner <[email protected]>Cc Rob Herring <[email protected]>Cc Grant Likely <[email protected]>Signed-off-by Jamie Iles <[email protected]>---
Quoted 48 lines
include/linux/irqdomain.h | 3 ++- kernel/irq/irqdomain.c | 12 +++++++----- 2 files changed, 9 insertions(+), 6 deletions(-)include/linux/irqdomain.h +2
-1@@ -91,10 +91,11 @@ static inline unsigned int irq_domain_to_irq(struct irq_domain *d,extern void irq_domain_add (struct irq_domain *domain);extern void irq_domain_del (struct irq_domain *domain); + +extern struct irq_domain_ops irq_domain_simple_ops;#endif /* CONFIG_IRQ_DOMAIN */ #if defined(CONFIG_IRQ_DOMAIN ) && defined(CONFIG_OF_IRQ ) -extern struct irq_domain_ops irq_domain_simple_ops;extern void irq_domain_add_simple (struct device_node *controller,int irq_base);extern void irq_domain_generate_simple (const struct of_device_id *match,u64 phys_base,unsigned int irq_start);kernel/irq/irqdomain.c +7
-5@@ -143,11 +143,6 @@ int irq_domain_simple_dt_translate(struct irq_domain *d,return 0 ; } -struct irq_domain_ops irq_domain_simple_ops = { - .dt_translate = irq_domain_simple_dt_translate, -}; -EXPORT_SYMBOL_GPL (irq_domain_simple_ops); -/** * irq_domain_create_simple() - Set up a 'simple' translation range */ @@ -182,3 +177,10 @@ void irq_domain_generate_simple(const struct of_device_id *match, }EXPORT_SYMBOL_GPL (irq_domain_generate_simple);#endif /* CONFIG_OF_IRQ */ + +struct irq_domain_ops irq_domain_simple_ops = { +#ifdef CONFIG_OF_IRQ + .dt_translate = irq_domain_simple_dt_translate, +#endif /* CONFIG_OF_IRQ */ +}; +EXPORT_SYMBOL_GPL (irq_domain_simple_ops);
Thomas Gleixner
Acked-byQuoted 6 lines · Rob Herring
Quoted 5 lines · Jamie Iles
irqdomain support is used in interrupt controller drivers that may not have device tree support but only need the basic
HW->Linuxirq translation. Rather than having each of these implement their own IRQ domain, allow them to use the simple ops.
Quoted 7 lines
Quoted 5 lines
Cc Thomas Gleixner <[email protected]>Cc Rob Herring <[email protected]>Cc Grant Likely <[email protected]>Signed-off-by Jamie Iles <[email protected]>---
Acked-by Rob Herring <[email protected]>
Grant, are you taking it or should I pull it via tip ?
Thanks,
tglx
Quoted 14 lines · Thomas Gleixner
Quoted 12 lines · Rob Herring
Quoted 10 lines · Jamie Iles
irqdomain support is used in interrupt controller drivers that may not have device tree support but only need the basic
HW->Linuxirq translation. Rather than having each of these implement their own IRQ domain, allow them to use the simple ops.Cc Thomas Gleixner <[email protected]>Cc Rob Herring <[email protected]>Cc Grant Likely <[email protected]>Signed-off-by Jamie Iles <[email protected]>---
Quoted 5 lines
Quoted 1 line
Acked-by Rob Herring <[email protected]>Acked-by Thomas Gleixner <[email protected]>Grant, are you taking it or should I pull it via tip ?
Is okay if I send this one to Russell? I need to patch the VIC driver to use this and I could send both to Russell at the same time and a couple of other ARM drivers that want to use it could use that as a base.
Thanks,
Jamie