aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/tick14.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/arch/sparc/kernel/tick14.c b/arch/sparc/kernel/tick14.c
index 77a4f3aeec67..138bbf5f8724 100644
--- a/arch/sparc/kernel/tick14.c
+++ b/arch/sparc/kernel/tick14.c
@@ -1,30 +1,12 @@
1/* tick14.c 1/* tick14.c
2 * linux/arch/sparc/kernel/tick14.c
3 * 2 *
4 * Copyright (C) 1996 David Redman (djhr@tadpole.co.uk) 3 * Copyright (C) 1996 David Redman (djhr@tadpole.co.uk)
5 * 4 *
6 * This file handles the Sparc specific level14 ticker 5 * This file handles the Sparc specific level14 ticker
7 * This is really useful for profiling OBP uses it for keyboard 6 * This is really useful for profiling OBP uses it for keyboard
8 * aborts and other stuff. 7 * aborts and other stuff.
9 *
10 *
11 */ 8 */
12#include <linux/errno.h>
13#include <linux/sched.h>
14#include <linux/kernel.h> 9#include <linux/kernel.h>
15#include <linux/param.h>
16#include <linux/string.h>
17#include <linux/mm.h>
18#include <linux/timex.h>
19#include <linux/interrupt.h>
20
21#include <asm/oplib.h>
22#include <asm/timer.h>
23#include <asm/system.h>
24#include <asm/irq.h>
25#include <asm/io.h>
26
27#include "irq.h"
28 10
29extern unsigned long lvl14_save[5]; 11extern unsigned long lvl14_save[5];
30static unsigned long *linux_lvl14 = NULL; 12static unsigned long *linux_lvl14 = NULL;
@@ -55,31 +37,3 @@ void install_obp_ticker(void)
55 linux_lvl14[2] = obp_lvl14[2]; 37 linux_lvl14[2] = obp_lvl14[2];
56 linux_lvl14[3] = obp_lvl14[3]; 38 linux_lvl14[3] = obp_lvl14[3];
57} 39}
58
59void claim_ticker14(irq_handler_t handler,
60 int irq_nr, unsigned int timeout )
61{
62 int cpu = smp_processor_id();
63
64 /* first we copy the obp handler instructions
65 */
66 __disable_irq(irq_nr);
67 if (!handler)
68 return;
69
70 linux_lvl14 = (unsigned long *)lvl14_save[4];
71 obp_lvl14[0] = linux_lvl14[0];
72 obp_lvl14[1] = linux_lvl14[1];
73 obp_lvl14[2] = linux_lvl14[2];
74 obp_lvl14[3] = linux_lvl14[3];
75
76 if (!request_irq(irq_nr,
77 handler,
78 (IRQF_DISABLED | SA_STATIC_ALLOC),
79 "counter14",
80 NULL)) {
81 install_linux_ticker();
82 load_profile_irq(cpu, timeout);
83 __enable_irq(irq_nr);
84 }
85}