Skip to contentSkip to conversation

socfpga: timer actually counts down

PATCH New Pavel Machek 4 participants 4 messages Jul 13, 2014 – Jul 17, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 socfpga: timer actually counts down

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.

include/configs/socfpga_cyclone5.h +1 -0
index c9c8e53..cc4f690 100644
@@ -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
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#1 lore raw

PATCH 1/1 socfpga: timer actually counts down

Quoted 8 lines · Pavel Machek

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.

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

Best regards,
Marek Vasut

#2 lore raw

PATCH 1/1 socfpga: timer actually counts down

In reply to Pavel Machek
Quoted 8 lines · Pavel Machek

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140714/39561bbc/attachment.pgp>
#3 lore raw

PATCH 1/1 socfpga: timer actually counts down

In reply to Pavel Machek
Quoted 15 lines · ZY - pavel

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.

include/configs/socfpga_cyclone5.h +0 -0
index c9c8e53..cc4f690 100644

include/configs/socfpga_cyclone5.h line 210

Quoted 7 lines
include/configs/socfpga_cyclone5.h +1 -0
@@ -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

Thanks
Chin Liang