Generic udelay() with watchdog support
[platform/kernel/u-boot.git] / cpu / arm926ejs / omap / timer.c
index 49e74ab..2ac38c4 100644 (file)
@@ -11,7 +11,7 @@
  * Alex Zuepke <azu@sysgo.de>
  *
  * (C) Copyright 2002-2004
- * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
+ * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
  *
  * (C) Copyright 2004
  * Philippe Robin, ARM Ltd. <philippe.robin@arm.com>
@@ -36,7 +36,6 @@
  */
 
 #include <common.h>
-#include <arm926ejs.h>
 
 #define TIMER_LOAD_VAL 0xffffffff
 
@@ -52,7 +51,7 @@ int timer_init (void)
 
        /* Start the decrementer ticking down from 0xffffffff */
        *((int32_t *) (CONFIG_SYS_TIMERBASE + LOAD_TIM)) = TIMER_LOAD_VAL;
-       val = MPUTIM_ST | MPUTIM_AR | MPUTIM_CLOCK_ENABLE | (CONFIG_SYS_PVT << MPUTIM_PTV_BIT);
+       val = MPUTIM_ST | MPUTIM_AR | MPUTIM_CLOCK_ENABLE | (CONFIG_SYS_PTV << MPUTIM_PTV_BIT);
        *((int32_t *) (CONFIG_SYS_TIMERBASE + CNTL_TIMER)) = val;
 
        /* init the timestamp and lastdec value */
@@ -81,7 +80,7 @@ void set_timer (ulong t)
 }
 
 /* delay x useconds AND perserve advance timstamp value */
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        ulong tmo, tmp;