Skip to contentSkip to conversation

sparc32: introduce build_device_irq

PATCH Applied Sam Ravnborg 2 participants 2 messages Feb 20, 2011 – Feb 26, 2011 SPARC + UltraSPARC (sparc/sparc64)

v1 of 4 Applied Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 3/5 sparc32: introduce build_device_irq

build_device_irq() is used to encapsulate the plaform specific details when we build an irq.
For now the default is a simple 1:1 but sun4d differs. This patch refactors functionality - but does not change the existing functionality.

---
 arch/sparc/kernel/irq.h          |    4 ++
 arch/sparc/kernel/irq_32.c       |    8 +++++
 arch/sparc/kernel/of_device_32.c |   59 +++----------------------------------
 arch/sparc/kernel/sun4d_irq.c    |   51 ++++++++++++++++++++++++++++++++
 4 files changed, 68 insertions(+), 54 deletions(-)
arch/sparc/kernel/irq.h +4 -0
index 4b4e54f..0b4d5b9 100644
@@ -1,3 +1,5 @@
+#include <linux/platform_device.h>
+
 #include <asm/btfixup.h>
 
 /*
@@ -7,6 +9,8 @@
  */
 struct sparc_irq_config {
 	void (*init_timers)(irq_handler_t);
+	unsigned int (*build_device_irq)(struct platform_device *op,
+	                                 unsigned int real_irq);
 };
 extern struct sparc_irq_config sparc_irq_config;
 
arch/sparc/kernel/irq_32.c +8 -0
index b80b8bf..7c93df4 100644
@@ -582,6 +582,12 @@ int probe_irq_off(unsigned long mask)
 }
 EXPORT_SYMBOL(probe_irq_off);
 
+static unsigned int build_device_irq(struct platform_device *op,
+                                     unsigned int real_irq)
+{
+	return real_irq;
+}
+
 /* djhr
  * This could probably be made indirect too and assigned in the CPU
  * bits of the code. That would be much nicer I think and would also
@@ -592,6 +598,8 @@ EXPORT_SYMBOL(probe_irq_off);
 
 void __init init_IRQ(void)
 {
+	sparc_irq_config.build_device_irq = build_device_irq;
+
 	switch (sparc_cpu_model) {
 	case sun4c:
 	case sun4:
arch/sparc/kernel/of_device_32.c +3 -54

79 lines not on this page · raw message

arch/sparc/kernel/sun4d_irq.c +51 -0

63 lines not on this page · raw message

Signature · 1 line
1.6.0.6
maintainer Applied
#1 lore raw

From: Sam Ravnborg <[email protected]>
Date: Sun, 20 Feb 2011 21:39:58 +0100

Quoted 7 lines

build_device_irq() is used to encapsulate the plaform specific details when we build an irq.
For now the default is a simple 1:1 but sun4d differs. This patch refactors functionality - but does not change the existing functionality.

Applied.