]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/x86/lib/timer.c
Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx
[karo-tx-uboot.git] / arch / x86 / lib / timer.c
index 8fc68cdcb899a72b87e8b8aec4f26c1f92860a32..fd7032e92c9f40e007348aac3a249e5078284b82 100644 (file)
@@ -3,7 +3,7 @@
  * Graeme Russ, <graeme.russ@gmail.com>
  *
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -35,15 +35,15 @@ struct timer_isr_function {
        timer_fnc_t *isr_func;
 };
 
-static struct timer_isr_function *first_timer_isr = NULL;
-static volatile unsigned long system_ticks = 0;
+static struct timer_isr_function *first_timer_isr;
+static unsigned long system_ticks;
 
 /*
  * register_timer_isr() allows multiple architecture and board specific
  * functions to be called every millisecond. Keep the execution time of
  * each function as low as possible
  */
-int register_timer_isr (timer_fnc_t *isr_func)
+int register_timer_isr(timer_fnc_t *isr_func)
 {
        struct timer_isr_function *new_func;
        struct timer_isr_function *temp;
@@ -61,7 +61,7 @@ int register_timer_isr (timer_fnc_t *isr_func)
         *  Don't allow timer interrupts while the
         *  linked list is being modified
         */
-       flag = disable_interrupts ();
+       flag = disable_interrupts();
 
        if (first_timer_isr == NULL) {
                first_timer_isr = new_func;
@@ -73,7 +73,7 @@ int register_timer_isr (timer_fnc_t *isr_func)
        }
 
        if (flag)
-               enable_interrupts ();
+               enable_interrupts();
 
        return 0;
 }
@@ -89,22 +89,12 @@ void timer_isr(void *unused)
 
        /* Execute each registered function */
        while (temp != NULL) {
-               temp->isr_func ();
+               temp->isr_func();
                temp = temp->next;
        }
 }
 
-void reset_timer (void)
+ulong get_timer(ulong base)
 {
-       system_ticks = 0;
-}
-
-ulong get_timer (ulong base)
-{
-       return (system_ticks - base);
-}
-
-void set_timer (ulong t)
-{
-       system_ticks = t;
+       return system_ticks - base;
 }