Fix the timer to 1msec and CONFIG_SYS_HZ to 1000.
PATCH 1/1 Fix the timer to 1msec and CONFIG_SYS_HZ to 1000.
Signed-off-by Manikandan Pillai <[email protected]>
--- cpu/arm_cortexa8/omap3/interrupts.c | 6 ++++++ include/configs/omap3_evm.h | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-)
cpu/arm_cortexa8/omap3/interrupts.c +6 -0
@@ -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 */
include/configs/omap3_evm.h +1 -1
@@ -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
Signature · 1 line
1.5.6
PATCH 1/1 Fix the timer to 1msec and CONFIG_SYS_HZ to 1000.
Quoted 27 lines · Manikandan Pillai
Signed-off-by Manikandan Pillai <[email protected]>--- cpu/arm_cortexa8/omap3/interrupts.c | 6 ++++++ include/configs/omap3_evm.h | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-)(quoted diff) +0
-0
b/cpu/arm_cortexa8/omap3/interrupts.cindex 9e9817d..c415dbb 100644cpu/arm_cortexa8/omap3/interrupts.c +5
-0@@ -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) */
cpu/arm_cortexa8/omap3/interrupts.c ulong get_timer_masked(void) · line 255
Quoted 4 lines
cpu/arm_cortexa8/omap3/interrupts.c +1
-0@@ -247,6 +252,7 @@ ulong get_timer_masked(void) timestamp += (0xFFFFFFFF - lastinc) + now; lastinc = now;return timestamp; +#endif
Please remove the dead code.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================