public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] Fix the timer to 1msec and CONFIG_SYS_HZ to 1000.
@ 2009-03-13  7:48 Manikandan Pillai
  2009-03-13  7:53 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: Manikandan Pillai @ 2009-03-13  7:48 UTC (permalink / raw)
  To: u-boot


Signed-off-by: Manikandan Pillai <mani.pillai@ti.com>
---
 cpu/arm_cortexa8/omap3/interrupts.c |    6 ++++++
 include/configs/omap3_evm.h         |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/cpu/arm_cortexa8/omap3/interrupts.c b/cpu/arm_cortexa8/omap3/interrupts.c
index 9e9817d..c415dbb 100644
--- a/cpu/arm_cortexa8/omap3/interrupts.c
+++ b/cpu/arm_cortexa8/omap3/interrupts.c
@@ -234,10 +234,15 @@ 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)
 {
+#if 1
+	return readl(&timer_base->tcrr) >> 5;	/* current tick value */
+#else
 	ulong now = readl(&timer_base->tcrr); /* current tick value */
 
 	if (now >= lastinc)	/* normal mode (non roll) */
@@ -247,6 +252,7 @@ ulong get_timer_masked(void)
 		timestamp += (0xFFFFFFFF - lastinc) + now;
 	lastinc = now;
 	return timestamp;
+#endif
 }
 
 /* waits specified delay value and resets timestamp */
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
-- 
1.5.6

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-13  7:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-13  7:48 [U-Boot] [PATCH 1/1] Fix the timer to 1msec and CONFIG_SYS_HZ to 1000 Manikandan Pillai
2009-03-13  7:53 ` Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox