linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / mips / sgi-ip22 / ip22-time.c
index 0e06189..b7300cc 100644 (file)
@@ -7,12 +7,11 @@
  * Ralf Baechle or David S. Miller (sorry guys, i'm really not sure)
  *
  * Copyright (C) 2001 by Ladislav Michl
- * Copyright (C) 2003, 06 Ralf Baechle (ralf@linux-mips.org)
+ * Copyright (C) 2003 Ralf Baechle (ralf@linux-mips.org)
  */
 #include <linux/bcd.h>
 #include <linux/ds1286.h>
 #include <linux/init.h>
-#include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
@@ -77,7 +76,7 @@ static int indy_rtc_set_time(unsigned long tim)
        save_control = hpc3c0->rtcregs[RTC_CMD] & 0xff;
        hpc3c0->rtcregs[RTC_CMD] = save_control | RTC_TE;
 
-       hpc3c0->rtcregs[RTC_YEAR] = BIN2BCD(tm.tm_year);
+       hpc3c0->rtcregs[RTC_YEAR] = BIN2BCD(tm.tm_sec);
        hpc3c0->rtcregs[RTC_MONTH] = BIN2BCD(tm.tm_mon);
        hpc3c0->rtcregs[RTC_DATE] = BIN2BCD(tm.tm_mday);
        hpc3c0->rtcregs[RTC_HOURS] = BIN2BCD(tm.tm_hour);
@@ -199,7 +198,9 @@ void indy_r4k_timer_interrupt(struct pt_regs *regs)
        irq_exit();
 }
 
-void __init plat_timer_setup(struct irqaction *irq)
+extern int setup_irq(unsigned int irq, struct irqaction *irqaction);
+
+static void indy_timer_setup(struct irqaction *irq)
 {
        /* over-write the handler, we use our own way */
        irq->handler = no_action;
@@ -211,8 +212,9 @@ void __init plat_timer_setup(struct irqaction *irq)
 void __init ip22_time_init(void)
 {
        /* setup hookup functions */
-       rtc_mips_get_time = indy_rtc_get_time;
-       rtc_mips_set_time = indy_rtc_set_time;
+       rtc_get_time = indy_rtc_get_time;
+       rtc_set_time = indy_rtc_set_time;
 
        board_time_init = indy_time_init;
+       board_timer_setup = indy_timer_setup;
 }