summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/highbank/timer.c
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2013-08-18 14:14:34 -0400
committerTom Rini <trini@ti.com>2013-08-18 14:14:34 -0400
commite20cc2ca15b5b0644f51b6e58d530d70acd2bc00 (patch)
treef85a22536682ef54e77b1ba95cf0b71d00644632 /arch/arm/cpu/armv7/highbank/timer.c
parentf21876174364391757e743cb8673d3fc5fce7ac7 (diff)
parent9ed887caecb9ecb0c68773a1870d143b9f28d3da (diff)
Merge branch 'master' of git://88.191.163.10/u-boot-arm
Fixup an easy conflict over adding the clk_get prototype and USB_OTG defines for am33xx having moved. Conflicts: arch/arm/include/asm/arch-am33xx/hardware.h Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'arch/arm/cpu/armv7/highbank/timer.c')
-rw-r--r--arch/arm/cpu/armv7/highbank/timer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/cpu/armv7/highbank/timer.c b/arch/arm/cpu/armv7/highbank/timer.c
index 792a828cbf..b61cd69bc6 100644
--- a/arch/arm/cpu/armv7/highbank/timer.c
+++ b/arch/arm/cpu/armv7/highbank/timer.c
@@ -15,7 +15,7 @@
#undef SYSTIMER_BASE
#define SYSTIMER_BASE 0xFFF34000 /* Timer 0 and 1 base */
-#define SYSTIMER_RATE 150000000
+#define SYSTIMER_RATE (150000000 / 256)
static ulong timestamp;
static ulong lastinc;
@@ -29,11 +29,11 @@ int timer_init(void)
/*
* Setup timer0
*/
+ writel(0, &systimer_base->timer0control);
writel(SYSTIMER_RELOAD, &systimer_base->timer0load);
writel(SYSTIMER_RELOAD, &systimer_base->timer0value);
- writel(SYSTIMER_EN | SYSTIMER_32BIT, &systimer_base->timer0control);
-
- reset_timer_masked();
+ writel(SYSTIMER_EN | SYSTIMER_32BIT | SYSTIMER_PRESC_256,
+ &systimer_base->timer0control);
return 0;
@@ -113,5 +113,5 @@ ulong get_timer_masked(void)
ulong get_tbclk(void)
{
- return CONFIG_SYS_HZ;
+ return SYSTIMER_RATE;
}