aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc/kernel/irq.h17
-rw-r--r--arch/sparc/kernel/irq_32.c10
-rw-r--r--arch/sparc/kernel/leon_kernel.c2
-rw-r--r--arch/sparc/kernel/sun4c_irq.c4
-rw-r--r--arch/sparc/kernel/sun4d_irq.c4
-rw-r--r--arch/sparc/kernel/sun4m_irq.c4
-rw-r--r--arch/sparc/kernel/time_32.c2
7 files changed, 25 insertions, 18 deletions
diff --git a/arch/sparc/kernel/irq.h b/arch/sparc/kernel/irq.h
index db7513881530..4b4e54f32b26 100644
--- a/arch/sparc/kernel/irq.h
+++ b/arch/sparc/kernel/irq.h
@@ -1,5 +1,16 @@
1#include <asm/btfixup.h> 1#include <asm/btfixup.h>
2 2
3/*
4 * Platform specific irq configuration
5 * The individual platforms assign their platform
6 * specifics in their init functions.
7 */
8struct sparc_irq_config {
9 void (*init_timers)(irq_handler_t);
10};
11extern struct sparc_irq_config sparc_irq_config;
12
13
3/* Dave Redman (djhr@tadpole.co.uk) 14/* Dave Redman (djhr@tadpole.co.uk)
4 * changed these to function pointers.. it saves cycles and will allow 15 * changed these to function pointers.. it saves cycles and will allow
5 * the irq dependencies to be split into different files at a later date 16 * the irq dependencies to be split into different files at a later date
@@ -45,12 +56,6 @@ static inline void load_profile_irq(int cpu, int limit)
45 BTFIXUP_CALL(load_profile_irq)(cpu, limit); 56 BTFIXUP_CALL(load_profile_irq)(cpu, limit);
46} 57}
47 58
48extern void (*sparc_init_timers)(irq_handler_t lvl10_irq);
49
50extern void claim_ticker14(irq_handler_t irq_handler,
51 int irq,
52 unsigned int timeout);
53
54#ifdef CONFIG_SMP 59#ifdef CONFIG_SMP
55BTFIXUPDEF_CALL(void, set_cpu_int, int, int) 60BTFIXUPDEF_CALL(void, set_cpu_int, int, int)
56BTFIXUPDEF_CALL(void, clear_cpu_int, int, int) 61BTFIXUPDEF_CALL(void, clear_cpu_int, int, int)
diff --git a/arch/sparc/kernel/irq_32.c b/arch/sparc/kernel/irq_32.c
index 93afee00a927..b80b8bf0bf00 100644
--- a/arch/sparc/kernel/irq_32.c
+++ b/arch/sparc/kernel/irq_32.c
@@ -29,6 +29,9 @@
29#define SMP_NOP3 29#define SMP_NOP3
30#endif /* SMP */ 30#endif /* SMP */
31 31
32/* platform specific irq setup */
33struct sparc_irq_config sparc_irq_config;
34
32unsigned long arch_local_irq_save(void) 35unsigned long arch_local_irq_save(void)
33{ 36{
34 unsigned long retval; 37 unsigned long retval;
@@ -100,14 +103,7 @@ EXPORT_SYMBOL(arch_local_irq_restore);
100 * 103 *
101 */ 104 */
102 105
103static void irq_panic(void)
104{
105 prom_printf("machine: %s doesn't have irq handlers defined!\n",
106 &cputypval[0]);
107 prom_halt();
108}
109 106
110void (*sparc_init_timers)(irq_handler_t) = (void (*)(irq_handler_t))irq_panic;
111 107
112/* 108/*
113 * Dave Redman (djhr@tadpole.co.uk) 109 * Dave Redman (djhr@tadpole.co.uk)
diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c
index 2f8a9a25d10d..2969f777fa11 100644
--- a/arch/sparc/kernel/leon_kernel.c
+++ b/arch/sparc/kernel/leon_kernel.c
@@ -347,7 +347,7 @@ void leon_enable_irq_cpu(unsigned int irq_nr, unsigned int cpu)
347 347
348void __init leon_init_IRQ(void) 348void __init leon_init_IRQ(void)
349{ 349{
350 sparc_init_timers = leon_init_timers; 350 sparc_irq_config.init_timers = leon_init_timers;
351 351
352 BTFIXUPSET_CALL(enable_irq, leon_enable_irq, BTFIXUPCALL_NORM); 352 BTFIXUPSET_CALL(enable_irq, leon_enable_irq, BTFIXUPCALL_NORM);
353 BTFIXUPSET_CALL(disable_irq, leon_disable_irq, BTFIXUPCALL_NORM); 353 BTFIXUPSET_CALL(disable_irq, leon_disable_irq, BTFIXUPCALL_NORM);
diff --git a/arch/sparc/kernel/sun4c_irq.c b/arch/sparc/kernel/sun4c_irq.c
index f543b452ebc1..90eea38ad66f 100644
--- a/arch/sparc/kernel/sun4c_irq.c
+++ b/arch/sparc/kernel/sun4c_irq.c
@@ -221,7 +221,9 @@ void __init sun4c_init_IRQ(void)
221 BTFIXUPSET_CALL(disable_pil_irq, sun4c_disable_irq, BTFIXUPCALL_NORM); 221 BTFIXUPSET_CALL(disable_pil_irq, sun4c_disable_irq, BTFIXUPCALL_NORM);
222 BTFIXUPSET_CALL(clear_clock_irq, sun4c_clear_clock_irq, BTFIXUPCALL_NORM); 222 BTFIXUPSET_CALL(clear_clock_irq, sun4c_clear_clock_irq, BTFIXUPCALL_NORM);
223 BTFIXUPSET_CALL(load_profile_irq, sun4c_load_profile_irq, BTFIXUPCALL_NOP); 223 BTFIXUPSET_CALL(load_profile_irq, sun4c_load_profile_irq, BTFIXUPCALL_NOP);
224 sparc_init_timers = sun4c_init_timers; 224
225 sparc_irq_config.init_timers = sun4c_init_timers;
226
225#ifdef CONFIG_SMP 227#ifdef CONFIG_SMP
226 BTFIXUPSET_CALL(set_cpu_int, sun4c_nop, BTFIXUPCALL_NOP); 228 BTFIXUPSET_CALL(set_cpu_int, sun4c_nop, BTFIXUPCALL_NOP);
227 BTFIXUPSET_CALL(clear_cpu_int, sun4c_nop, BTFIXUPCALL_NOP); 229 BTFIXUPSET_CALL(clear_cpu_int, sun4c_nop, BTFIXUPCALL_NOP);
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index 609a13c85823..fc1c22f121fd 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -557,7 +557,9 @@ void __init sun4d_init_IRQ(void)
557 BTFIXUPSET_CALL(disable_irq, sun4d_disable_irq, BTFIXUPCALL_NORM); 557 BTFIXUPSET_CALL(disable_irq, sun4d_disable_irq, BTFIXUPCALL_NORM);
558 BTFIXUPSET_CALL(clear_clock_irq, sun4d_clear_clock_irq, BTFIXUPCALL_NORM); 558 BTFIXUPSET_CALL(clear_clock_irq, sun4d_clear_clock_irq, BTFIXUPCALL_NORM);
559 BTFIXUPSET_CALL(load_profile_irq, sun4d_load_profile_irq, BTFIXUPCALL_NORM); 559 BTFIXUPSET_CALL(load_profile_irq, sun4d_load_profile_irq, BTFIXUPCALL_NORM);
560 sparc_init_timers = sun4d_init_timers; 560
561 sparc_irq_config.init_timers = sun4d_init_timers;
562
561#ifdef CONFIG_SMP 563#ifdef CONFIG_SMP
562 BTFIXUPSET_CALL(set_cpu_int, sun4d_set_cpu_int, BTFIXUPCALL_NORM); 564 BTFIXUPSET_CALL(set_cpu_int, sun4d_set_cpu_int, BTFIXUPCALL_NORM);
563 BTFIXUPSET_CALL(clear_cpu_int, sun4d_clear_ipi, BTFIXUPCALL_NOP); 565 BTFIXUPSET_CALL(clear_cpu_int, sun4d_clear_ipi, BTFIXUPCALL_NOP);
diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c
index 3c6657a4caec..1e13ce96dc7e 100644
--- a/arch/sparc/kernel/sun4m_irq.c
+++ b/arch/sparc/kernel/sun4m_irq.c
@@ -470,7 +470,9 @@ void __init sun4m_init_IRQ(void)
470 BTFIXUPSET_CALL(disable_pil_irq, sun4m_disable_pil_irq, BTFIXUPCALL_NORM); 470 BTFIXUPSET_CALL(disable_pil_irq, sun4m_disable_pil_irq, BTFIXUPCALL_NORM);
471 BTFIXUPSET_CALL(clear_clock_irq, sun4m_clear_clock_irq, BTFIXUPCALL_NORM); 471 BTFIXUPSET_CALL(clear_clock_irq, sun4m_clear_clock_irq, BTFIXUPCALL_NORM);
472 BTFIXUPSET_CALL(load_profile_irq, sun4m_load_profile_irq, BTFIXUPCALL_NORM); 472 BTFIXUPSET_CALL(load_profile_irq, sun4m_load_profile_irq, BTFIXUPCALL_NORM);
473 sparc_init_timers = sun4m_init_timers; 473
474 sparc_irq_config.init_timers = sun4m_init_timers;
475
474#ifdef CONFIG_SMP 476#ifdef CONFIG_SMP
475 BTFIXUPSET_CALL(set_cpu_int, sun4m_send_ipi, BTFIXUPCALL_NORM); 477 BTFIXUPSET_CALL(set_cpu_int, sun4m_send_ipi, BTFIXUPCALL_NORM);
476 BTFIXUPSET_CALL(clear_cpu_int, sun4m_clear_ipi, BTFIXUPCALL_NORM); 478 BTFIXUPSET_CALL(clear_cpu_int, sun4m_clear_ipi, BTFIXUPCALL_NORM);
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c
index 19ab42a932db..8237dd4dfeb4 100644
--- a/arch/sparc/kernel/time_32.c
+++ b/arch/sparc/kernel/time_32.c
@@ -219,7 +219,7 @@ static void __init sbus_time_init(void)
219 219
220 btfixup(); 220 btfixup();
221 221
222 sparc_init_timers(timer_interrupt); 222 sparc_irq_config.init_timers(timer_interrupt);
223} 223}
224 224
225void __init time_init(void) 225void __init time_init(void)