diff mbox

[U-Boot] arm: zynq: Fix timer loadaddress

Message ID 623c0728fe68cefd13c69a3ac056bd190c1f5642.1377668188.git.michal.simek@xilinx.com
State Accepted
Delegated to: Albert ARIBAUD
Headers show

Commit Message

Michal Simek Aug. 28, 2013, 5:36 a.m. UTC
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).

Reported-by: Stephen MacMahon <stephenm@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>

---
 arch/arm/cpu/armv7/zynq/timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
1.8.2.3

Comments

Albert ARIBAUD Sept. 23, 2013, 2:29 p.m. UTC | #1
Hi Michal,

On Wed, 28 Aug 2013 07:36:31 +0200, Michal Simek
<michal.simek@xilinx.com> wrote:

> 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).
> 
> Reported-by: Stephen MacMahon <stephenm@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> 
> ---
>  arch/arm/cpu/armv7/zynq/timer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/cpu/armv7/zynq/timer.c b/arch/arm/cpu/armv7/zynq/timer.c
> index 0133565..3b8d949 100644
> --- a/arch/arm/cpu/armv7/zynq/timer.c
> +++ b/arch/arm/cpu/armv7/zynq/timer.c
> @@ -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
> 

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

Amicalement,
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/zynq/timer.c b/arch/arm/cpu/armv7/zynq/timer.c
index 0133565..3b8d949 100644
--- a/arch/arm/cpu/armv7/zynq/timer.c
+++ b/arch/arm/cpu/armv7/zynq/timer.c
@@ -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