sparc32: introduce build_device_irq
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.
Signed-off-by Sam Ravnborg <[email protected]>
--- 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
@@ -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
@@ -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
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.Signed-off-by Sam Ravnborg <[email protected]>
Applied.