Skip to contentSkip to conversation

irqdomain: export irq_domain_simple_ops for !CONFIG_OF

PATCH In review Jamie Iles 3 participants 4 messages Dec 1, 2011 – Dec 12, 2011

Subsystems (2)
lore
Share & tools
lore

Jamie Iles

author
#0 lore raw

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.

Cc Thomas Gleixner <[email protected]>
Cc Rob Herring <[email protected]>
Cc Grant Likely <[email protected]>
---
 include/linux/irqdomain.h |    3 ++-
 kernel/irq/irqdomain.c    |   12 +++++++-----
 2 files changed, 9 insertions(+), 6 deletions(-)
include/linux/irqdomain.h +2 -1
index 99834e58..bd4272b 100644
@@ -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
index 200ce83..7ca523b 100644
@@ -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
Acked-by on v1 1/1
#1 lore raw
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->Linux irq 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]>

---

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
index 99834e58..bd4272b 100644
@@ -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
index 200ce83..7ca523b 100644
@@ -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);
#2 lore raw
Quoted 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->Linux irq 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]>

---

Grant, are you taking it or should I pull it via tip ?

Thanks,

tglx

author
#3 lore raw
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->Linux irq 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]>

---

Quoted 5 lines
Quoted 1 line

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