diff mbox

[U-Boot] socfpga: timer actually counts down

Message ID 20140713111045.GA20825@amd.pavel.ucw.cz
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Pavel Machek July 13, 2014, 11:10 a.m. UTC
Timer on cyclone5 actually counts down. It took me a while to figure
out, as timer counting in wrong direction actually _can_ be used, it
just appears to tick at extremely high frequency in u-boot.

The bug was introduced in commit
23ab7ee0ffa9d5efd0b4ad830befba306d24a327.
    
Signed-off-by: Pavel Machek <pavel@denx.de>

Comments

Marek Vasut July 13, 2014, 1:28 p.m. UTC | #1
On Sunday, July 13, 2014 at 01:10:45 PM, Pavel Machek wrote:
> Timer on cyclone5 actually counts down. It took me a while to figure
> out, as timer counting in wrong direction actually _can_ be used, it
> just appears to tick at extremely high frequency in u-boot.
> 
> The bug was introduced in commit
> 23ab7ee0ffa9d5efd0b4ad830befba306d24a327.
> 
> Signed-off-by: Pavel Machek <pavel@denx.de>

Acked-by: Marek Vasut <marex@denx.de>

Can we get an Altera ACK and apply for .07 as this is clearly bugfix please ?

Best regards,
Marek Vasut
Tom Rini July 14, 2014, 3:24 p.m. UTC | #2
On Sun, Jul 13, 2014 at 01:10:45PM +0200, Pavel Machek wrote:

> Timer on cyclone5 actually counts down. It took me a while to figure
> out, as timer counting in wrong direction actually _can_ be used, it
> just appears to tick at extremely high frequency in u-boot.
> 
> The bug was introduced in commit
> 23ab7ee0ffa9d5efd0b4ad830befba306d24a327.
>     
> Signed-off-by: Pavel Machek <pavel@denx.de>

Applied to u-boot/master, thanks!
Chin Liang See July 17, 2014, 10:21 a.m. UTC | #3
On Sun, 2014-07-13 at 13:10 +0200, ZY - pavel wrote:
> Timer on cyclone5 actually counts down. It took me a while to figure
> out, as timer counting in wrong direction actually _can_ be used, it
> just appears to tick at extremely high frequency in u-boot.
> 
> The bug was introduced in commit
> 23ab7ee0ffa9d5efd0b4ad830befba306d24a327.
>     
> Signed-off-by: Pavel Machek <pavel@denx.de>
> 
> diff --git a/include/configs/socfpga_cyclone5.h b/include/configs/socfpga_cyclone5.h
> index c9c8e53..cc4f690 100644
> --- a/include/configs/socfpga_cyclone5.h
> +++ b/include/configs/socfpga_cyclone5.h
> @@ -204,6 +204,7 @@
>  #else
>  #define CONFIG_SYS_TIMER_RATE		25000000
>  #endif
> +#define CONFIG_SYS_TIMER_COUNTS_DOWN
>  #define CONFIG_SYS_TIMER_COUNTER	(CONFIG_SYS_TIMERBASE + 0x4)
>  
>  #define CONFIG_ENV_IS_NOWHERE
> 

Acked-by: Chin Liang See <clsee@altera.com>

Thanks
Chin Liang
diff mbox

Patch

diff --git a/include/configs/socfpga_cyclone5.h b/include/configs/socfpga_cyclone5.h
index c9c8e53..cc4f690 100644
--- a/include/configs/socfpga_cyclone5.h
+++ b/include/configs/socfpga_cyclone5.h
@@ -204,6 +204,7 @@ 
 #else
 #define CONFIG_SYS_TIMER_RATE		25000000
 #endif
+#define CONFIG_SYS_TIMER_COUNTS_DOWN
 #define CONFIG_SYS_TIMER_COUNTER	(CONFIG_SYS_TIMERBASE + 0x4)
 
 #define CONFIG_ENV_IS_NOWHERE