ARM: OMAP: h4 must have blinky leds!!
[powerpc.git] / arch / mips / sgi-ip27 / ip27-timer.c
index 5e82a26..8c3c78c 100644 (file)
@@ -172,15 +172,6 @@ static __init unsigned long get_m48t35_time(void)
         return mktime(year, month, date, hour, min, sec);
 }
 
-static unsigned int startup_rt_irq(unsigned int irq)
-{
-       return 0;
-}
-
-static void shutdown_rt_irq(unsigned int irq)
-{
-}
-
 static void enable_rt_irq(unsigned int irq)
 {
 }
@@ -189,26 +180,17 @@ static void disable_rt_irq(unsigned int irq)
 {
 }
 
-static void mask_and_ack_rt(unsigned int irq)
-{
-}
-
-static void end_rt_irq(unsigned int irq)
-{
-}
-
 static struct irq_chip rt_irq_type = {
-       .typename       = "SN HUB RT timer",
-       .startup        = startup_rt_irq,
-       .shutdown       = shutdown_rt_irq,
-       .enable         = enable_rt_irq,
-       .disable        = disable_rt_irq,
-       .ack            = mask_and_ack_rt,
-       .end            = end_rt_irq,
+       .name           = "SN HUB RT timer",
+       .ack            = disable_rt_irq,
+       .mask           = disable_rt_irq,
+       .mask_ack       = disable_rt_irq,
+       .unmask         = enable_rt_irq,
+       .eoi            = enable_rt_irq,
 };
 
 static struct irqaction rt_irqaction = {
-       .handler        = ip27_rt_timer_interrupt,
+       .handler        = (irq_handler_t) ip27_rt_timer_interrupt,
        .flags          = IRQF_DISABLED,
        .mask           = CPU_MASK_NONE,
        .name           = "timer"
@@ -221,10 +203,7 @@ void __init plat_timer_setup(struct irqaction *irq)
        if (irqno < 0)
                panic("Can't allocate interrupt number for timer interrupt");
 
-       irq_desc[irqno].status  = IRQ_DISABLED;
-       irq_desc[irqno].action  = NULL;
-       irq_desc[irqno].depth   = 1;
-       irq_desc[irqno].chip    = &rt_irq_type;
+       set_irq_chip_and_handler(irqno, &rt_irq_type, handle_percpu_irq);
 
        /* over-write the handler, we use our own way */
        irq->handler = no_action;
@@ -239,14 +218,14 @@ void __init plat_timer_setup(struct irqaction *irq)
        setup_irq(irqno, &rt_irqaction);
 }
 
-static unsigned int ip27_hpt_read(void)
+static cycle_t ip27_hpt_read(void)
 {
        return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT);
 }
 
 void __init ip27_time_init(void)
 {
-       mips_hpt_read = ip27_hpt_read;
+       clocksource_mips.read = ip27_hpt_read;
        mips_hpt_frequency = CYCLES_PER_SEC;
        xtime.tv_sec = get_m48t35_time();
        xtime.tv_nsec = 0;