]> err.no Git - linux-2.6/blobdiff - arch/blackfin/kernel/time.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux-2.6] / arch / blackfin / kernel / time.c
index f578176b6d9240080aca1dc5061e92878635b9e1..715b3945e4c7119b4af88c4f986b38cf91d63700 100644 (file)
 /* This is an NTP setting */
 #define        TICK_SIZE (tick_nsec / 1000)
 
-static void time_sched_init(irqreturn_t(*timer_routine)
-                       (int, void *));
+static void time_sched_init(irq_handler_t timer_routine);
 static unsigned long gettimeoffset(void);
-static inline void do_leds(void);
-
-#if (defined(CONFIG_BFIN_ALIVE_LED) || defined(CONFIG_BFIN_IDLE_LED))
-void __init init_leds(void)
-{
-       unsigned int tmp = 0;
-
-#if defined(CONFIG_BFIN_ALIVE_LED)
-       /* config pins as output. */
-       tmp = bfin_read_CONFIG_BFIN_ALIVE_LED_DPORT();
-       SSYNC();
-       bfin_write_CONFIG_BFIN_ALIVE_LED_DPORT(tmp | CONFIG_BFIN_ALIVE_LED_PIN);
-       SSYNC();
-
-       /*      First set led be off */
-       tmp = bfin_read_CONFIG_BFIN_ALIVE_LED_PORT();
-       SSYNC();
-       bfin_write_CONFIG_BFIN_ALIVE_LED_PORT(tmp | CONFIG_BFIN_ALIVE_LED_PIN); /* light off */
-       SSYNC();
-#endif
-
-#if defined(CONFIG_BFIN_IDLE_LED)
-       /* config pins as output. */
-       tmp = bfin_read_CONFIG_BFIN_IDLE_LED_DPORT();
-       SSYNC();
-       bfin_write_CONFIG_BFIN_IDLE_LED_DPORT(tmp | CONFIG_BFIN_IDLE_LED_PIN);
-       SSYNC();
-
-       /*      First set led be off */
-       tmp = bfin_read_CONFIG_BFIN_IDLE_LED_PORT();
-       SSYNC();
-       bfin_write_CONFIG_BFIN_IDLE_LED_PORT(tmp | CONFIG_BFIN_IDLE_LED_PIN);   /* light off */
-       SSYNC();
-#endif
-}
-#else
-void __init init_leds(void)
-{
-}
-#endif
-
-#if defined(CONFIG_BFIN_ALIVE_LED)
-static inline void do_leds(void)
-{
-       static unsigned int count = 50;
-       static int flag = 0;
-       unsigned short tmp = 0;
-
-       if (--count == 0) {
-               count = 50;
-               flag = ~flag;
-       }
-       tmp = bfin_read_CONFIG_BFIN_ALIVE_LED_PORT();
-       SSYNC();
-
-       if (flag)
-               tmp &= ~CONFIG_BFIN_ALIVE_LED_PIN;      /* light on */
-       else
-               tmp |= CONFIG_BFIN_ALIVE_LED_PIN;       /* light off */
-
-       bfin_write_CONFIG_BFIN_ALIVE_LED_PORT(tmp);
-       SSYNC();
-
-}
-#else
-static inline void do_leds(void)
-{
-}
-#endif
 
 static struct irqaction bfin_timer_irq = {
        .name = "BFIN Timer Tick",
@@ -133,7 +63,7 @@ static struct irqaction bfin_timer_irq = {
 #define TIME_SCALE 1
 
 static void
-time_sched_init(irqreturn_t(*timer_routine) (int, void *))
+time_sched_init(irq_handler_t timer_routine)
 {
        u32 tcount;
 
@@ -200,16 +130,12 @@ irqreturn_t timer_interrupt(int irq, void *dummy)__attribute__((l1_text));
 irqreturn_t timer_interrupt(int irq, void *dummy)
 {
        /* last time the cmos clock got updated */
-       static long last_rtc_update = 0;
+       static long last_rtc_update;
 
        write_seqlock(&xtime_lock);
 
        do_timer(1);
-       do_leds();
 
-#ifndef CONFIG_SMP
-       update_process_times(user_mode(get_irq_regs()));
-#endif
        profile_tick(CPU_PROFILING);
 
        /*
@@ -231,6 +157,11 @@ irqreturn_t timer_interrupt(int irq, void *dummy)
                        last_rtc_update = xtime.tv_sec - 600;
        }
        write_sequnlock(&xtime_lock);
+
+#ifndef CONFIG_SMP
+       update_process_times(user_mode(get_irq_regs()));
+#endif
+
        return IRQ_HANDLED;
 }