The header files for other OAMP3 boards have also been changed
for CONFIG_SYS_HZ to be 1000.

Signed-off-by: Manikandan Pillai <mani.pil...@ti.com>
---
 cpu/arm_cortexa8/omap3/interrupts.c |   12 +++---------
 include/configs/omap3_beagle.h      |    2 +-
 include/configs/omap3_evm.h         |    2 +-
 include/configs/omap3_overo.h       |    2 +-
 include/configs/omap3_pandora.h     |    2 +-
 5 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/cpu/arm_cortexa8/omap3/interrupts.c 
b/cpu/arm_cortexa8/omap3/interrupts.c
index 9e9817d..d16f7bc 100644
--- a/cpu/arm_cortexa8/omap3/interrupts.c
+++ b/cpu/arm_cortexa8/omap3/interrupts.c
@@ -234,19 +234,13 @@ void reset_timer_masked(void)
        /* reset time, capture current incrementer value time */
        lastinc = readl(&timer_base->tcrr);
        timestamp = 0;          /* start "advancing" time stamp from 0 */
+       /* reset the timer count  */
+       writel(0x1, &timer_base->ttgr);
 }
 
 ulong get_timer_masked(void)
 {
-       ulong now = readl(&timer_base->tcrr); /* current tick value */
-
-       if (now >= lastinc)     /* normal mode (non roll) */
-               /* move stamp fordward with absoulte diff ticks */
-               timestamp += (now - lastinc);
-       else    /* we have rollover of incrementer */
-               timestamp += (0xFFFFFFFF - lastinc) + now;
-       lastinc = now;
-       return timestamp;
+       return readl(&timer_base->tcrr) >> 5;   /* current tick value */
 }
 
 /* waits specified delay value and resets timestamp */
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 9057606..346df43 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -227,7 +227,7 @@
 
 #define CONFIG_SYS_TIMERBASE           (OMAP34XX_GPT2)
 #define CONFIG_SYS_PVT                 V_PVT   /* 2^(pvt+1) */
-#define CONFIG_SYS_HZ                  ((V_SCLK) / (2 << CONFIG_SYS_PVT))
+#define CONFIG_SYS_HZ                  1000
 
 /*-----------------------------------------------------------------------
  * Stack sizes
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index f4498a9..59305b8 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -226,7 +226,7 @@
 
 #define CONFIG_SYS_TIMERBASE           OMAP34XX_GPT2
 #define CONFIG_SYS_PVT                 V_PVT   /* 2^(pvt+1) */
-#define CONFIG_SYS_HZ                  ((V_SCLK) / (2 << CONFIG_SYS_PVT))
+#define CONFIG_SYS_HZ                  1000
 
 /*-----------------------------------------------------------------------
  * Stack sizes
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index dee0417..7bacb5b 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -220,7 +220,7 @@
 
 #define CONFIG_SYS_TIMERBASE           (OMAP34XX_GPT2)
 #define CONFIG_SYS_PVT                 V_PVT   /* 2^(pvt+1) */
-#define CONFIG_SYS_HZ                  ((V_SCLK) / (2 << CONFIG_SYS_PVT))
+#define CONFIG_SYS_HZ                  1000
 
 /*-----------------------------------------------------------------------
  * Stack sizes
diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h
index 00c0374..0ee1602 100644
--- a/include/configs/omap3_pandora.h
+++ b/include/configs/omap3_pandora.h
@@ -222,7 +222,7 @@
 
 #define CONFIG_SYS_TIMERBASE           (OMAP34XX_GPT2)
 #define CONFIG_SYS_PVT                 V_PVT   /* 2^(pvt+1) */
-#define CONFIG_SYS_HZ                  ((V_SCLK) / (2 << CONFIG_SYS_PVT))
+#define CONFIG_SYS_HZ                  1000
 
 /*-----------------------------------------------------------------------
  * Stack sizes
-- 
1.5.6

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to