From 2cc0ea72ef98eba3b6dbf65cff39f08e31e137d1 Mon Sep 17 00:00:00 2001
From: Pavel Machek <pavel@denx.de>
Date: Sun, 13 Jul 2014 13:10:45 +0200
Subject: [PATCH] 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.

Signed-off-by: Pavel Machek <pavel@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
---
 include/configs/socfpga_cyclone5.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/socfpga_cyclone5.h b/include/configs/socfpga_cyclone5.h
index 7646a857c3..262e7445f6 100644
--- a/include/configs/socfpga_cyclone5.h
+++ b/include/configs/socfpga_cyclone5.h
@@ -202,6 +202,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
-- 
2.39.5