aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/sgi-ip27/ip27-timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/sgi-ip27/ip27-timer.c')
-rw-r--r--arch/mips/sgi-ip27/ip27-timer.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
index 3ca614a851e5..b029ba79c27a 100644
--- a/arch/mips/sgi-ip27/ip27-timer.c
+++ b/arch/mips/sgi-ip27/ip27-timer.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copytight (C) 1999, 2000, 05 Ralf Baechle (ralf@linux-mips.org) 2 * Copytight (C) 1999, 2000, 05, 06 Ralf Baechle (ralf@linux-mips.org)
3 * Copytight (C) 1999, 2000 Silicon Graphics, Inc. 3 * Copytight (C) 1999, 2000 Silicon Graphics, Inc.
4 */ 4 */
5#include <linux/bcd.h> 5#include <linux/bcd.h>
@@ -181,8 +181,9 @@ static __init unsigned long get_m48t35_time(void)
181 return mktime(year, month, date, hour, min, sec); 181 return mktime(year, month, date, hour, min, sec);
182} 182}
183 183
184static void startup_rt_irq(unsigned int irq) 184static unsigned int startup_rt_irq(unsigned int irq)
185{ 185{
186 return 0;
186} 187}
187 188
188static void shutdown_rt_irq(unsigned int irq) 189static void shutdown_rt_irq(unsigned int irq)
@@ -205,7 +206,7 @@ static void end_rt_irq(unsigned int irq)
205{ 206{
206} 207}
207 208
208static struct hw_interrupt_type rt_irq_type = { 209static struct irq_chip rt_irq_type = {
209 .typename = "SN HUB RT timer", 210 .typename = "SN HUB RT timer",
210 .startup = startup_rt_irq, 211 .startup = startup_rt_irq,
211 .shutdown = shutdown_rt_irq, 212 .shutdown = shutdown_rt_irq,
@@ -224,17 +225,17 @@ static struct irqaction rt_irqaction = {
224 225
225extern int allocate_irqno(void); 226extern int allocate_irqno(void);
226 227
227static void ip27_timer_setup(struct irqaction *irq) 228void __init plat_timer_setup(struct irqaction *irq)
228{ 229{
229 int irqno = allocate_irqno(); 230 int irqno = allocate_irqno();
230 231
231 if (irqno < 0) 232 if (irqno < 0)
232 panic("Can't allocate interrupt number for timer interrupt"); 233 panic("Can't allocate interrupt number for timer interrupt");
233 234
234 irq_desc[irqno].status = IRQ_DISABLED; 235 irq_desc[irqno].status = IRQ_DISABLED;
235 irq_desc[irqno].action = NULL; 236 irq_desc[irqno].action = NULL;
236 irq_desc[irqno].depth = 1; 237 irq_desc[irqno].depth = 1;
237 irq_desc[irqno].handler = &rt_irq_type; 238 irq_desc[irqno].chip = &rt_irq_type;
238 239
239 /* over-write the handler, we use our own way */ 240 /* over-write the handler, we use our own way */
240 irq->handler = no_action; 241 irq->handler = no_action;
@@ -243,6 +244,10 @@ static void ip27_timer_setup(struct irqaction *irq)
243 irq_desc[irqno].status |= IRQ_PER_CPU; 244 irq_desc[irqno].status |= IRQ_PER_CPU;
244 245
245 rt_timer_irq = irqno; 246 rt_timer_irq = irqno;
247 /*
248 * Only needed to get /proc/interrupt to display timer irq stats
249 */
250 setup_irq(irqno, &rt_irqaction);
246} 251}
247 252
248void __init ip27_time_init(void) 253void __init ip27_time_init(void)
@@ -251,8 +256,6 @@ void __init ip27_time_init(void)
251 xtime.tv_nsec = 0; 256 xtime.tv_nsec = 0;
252 257
253 do_gettimeoffset = ip27_do_gettimeoffset; 258 do_gettimeoffset = ip27_do_gettimeoffset;
254
255 board_timer_setup = ip27_timer_setup;
256} 259}
257 260
258void __init cpu_time_init(void) 261void __init cpu_time_init(void)