Skip to contentSkip to conversation

arm: zynq: Fix timer loadaddress

PATCH New Michal Simek 2 participants 2 messages Aug 28, 2013 – Sep 23, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: zynq: Fix timer loadaddress

Reload address was written to the counter register instead of load register.
The problem happens when timer expires but never reload to ~0UL (it is downcount timer).

---
 arch/arm/cpu/armv7/zynq/timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/armv7/zynq/timer.c +1 -1
index 0133565..3b8d949 100644
@@ -57,7 +57,7 @@ int timer_init(void)
 			SCUTIMER_CONTROL_ENABLE_MASK;
 
 	/* Load the timer counter register */
-	writel(0xFFFFFFFF, &timer_base->counter);
+	writel(0xFFFFFFFF, &timer_base->load);
 
 	/*
 	 * Start the A9Timer device

--
1.8.2.3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130828/cb093d50/attachment.pgp>

#1 lore raw

PATCH 1/1 arm: zynq: Fix timer loadaddress

Hi Michal,

Quoted 26 lines · Michal Simek

Reload address was written to the counter register instead of load register.
The problem happens when timer expires but never reload to ~0UL (it is downcount timer).

---
 arch/arm/cpu/armv7/zynq/timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/armv7/zynq/timer.c +1 -2
index 0133565..3b8d949 100644
@@ -57,7 +57,7 @@ int timer_init(void)
 			SCUTIMER_CONTROL_ENABLE_MASK;
 
 	/* Load the timer counter register */
-	writel(0xFFFFFFFF, &timer_base->counter);
+	writel(0xFFFFFFFF, &timer_base->load);
 
 	/*
 	 * Start the A9Timer device
--
Quoted 2 lines

1.8.2.3

Applied bugfix to u-boot-arm/master, thanks!

Amicalement,

Signature · 1 line
Albert.