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.c32
1 files changed, 8 insertions, 24 deletions
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
index 5e82a268e3c9..7d361726bbfb 100644
--- a/arch/mips/sgi-ip27/ip27-timer.c
+++ b/arch/mips/sgi-ip27/ip27-timer.c
@@ -172,15 +172,6 @@ static __init unsigned long get_m48t35_time(void)
172 return mktime(year, month, date, hour, min, sec); 172 return mktime(year, month, date, hour, min, sec);
173} 173}
174 174
175static unsigned int startup_rt_irq(unsigned int irq)
176{
177 return 0;
178}
179
180static void shutdown_rt_irq(unsigned int irq)
181{
182}
183
184static void enable_rt_irq(unsigned int irq) 175static void enable_rt_irq(unsigned int irq)
185{ 176{
186} 177}
@@ -189,21 +180,17 @@ static void disable_rt_irq(unsigned int irq)
189{ 180{
190} 181}
191 182
192static void mask_and_ack_rt(unsigned int irq)
193{
194}
195
196static void end_rt_irq(unsigned int irq) 183static void end_rt_irq(unsigned int irq)
197{ 184{
198} 185}
199 186
200static struct irq_chip rt_irq_type = { 187static struct irq_chip rt_irq_type = {
201 .typename = "SN HUB RT timer", 188 .typename = "SN HUB RT timer",
202 .startup = startup_rt_irq, 189 .ack = disable_rt_irq,
203 .shutdown = shutdown_rt_irq, 190 .mask = disable_rt_irq,
204 .enable = enable_rt_irq, 191 .mask_ack = disable_rt_irq,
205 .disable = disable_rt_irq, 192 .unmask = enable_rt_irq,
206 .ack = mask_and_ack_rt, 193 .eoi = enable_rt_irq,
207 .end = end_rt_irq, 194 .end = end_rt_irq,
208}; 195};
209 196
@@ -221,10 +208,7 @@ void __init plat_timer_setup(struct irqaction *irq)
221 if (irqno < 0) 208 if (irqno < 0)
222 panic("Can't allocate interrupt number for timer interrupt"); 209 panic("Can't allocate interrupt number for timer interrupt");
223 210
224 irq_desc[irqno].status = IRQ_DISABLED; 211 set_irq_chip_and_handler(irqno, &rt_irq_type, handle_percpu_irq);
225 irq_desc[irqno].action = NULL;
226 irq_desc[irqno].depth = 1;
227 irq_desc[irqno].chip = &rt_irq_type;
228 212
229 /* over-write the handler, we use our own way */ 213 /* over-write the handler, we use our own way */
230 irq->handler = no_action; 214 irq->handler = no_action;
@@ -239,14 +223,14 @@ void __init plat_timer_setup(struct irqaction *irq)
239 setup_irq(irqno, &rt_irqaction); 223 setup_irq(irqno, &rt_irqaction);
240} 224}
241 225
242static unsigned int ip27_hpt_read(void) 226static cycle_t ip27_hpt_read(void)
243{ 227{
244 return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT); 228 return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT);
245} 229}
246 230
247void __init ip27_time_init(void) 231void __init ip27_time_init(void)
248{ 232{
249 mips_hpt_read = ip27_hpt_read; 233 clocksource_mips.read = ip27_hpt_read;
250 mips_hpt_frequency = CYCLES_PER_SEC; 234 mips_hpt_frequency = CYCLES_PER_SEC;
251 xtime.tv_sec = get_m48t35_time(); 235 xtime.tv_sec = get_m48t35_time();
252 xtime.tv_nsec = 0; 236 xtime.tv_nsec = 0;