Skip to contentSkip to conversation

arm: mvebu/kirkwood: Use common timer functions

PATCH New Stefan Roese 1 participant 1 message Dec 1, 2015

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

PATCH 1/1 arm: mvebu/kirkwood: Use common timer functions

By using the common timer functions for mvebu/kirkwood we can get rid of quite a lot of code.

Cc Luka Perkov <[email protected]>
Cc Simon Guinot <[email protected]>
Cc Valentin Longchamp <[email protected]>
---
 arch/arm/mach-kirkwood/include/mach/config.h |   5 +
 arch/arm/mach-mvebu/include/mach/config.h    |   5 +
 arch/arm/mach-mvebu/timer.c                  | 136 +++------------------------
 3 files changed, 22 insertions(+), 124 deletions(-)
arch/arm/mach-kirkwood/include/mach/config.h +5 -0
index d049395..0c4309f 100644
@@ -135,4 +135,9 @@
 #define CONFIG_SYS_I2C_SPEED		100000
 #endif
 
+/* Use common timer */
+#define CONFIG_SYS_TIMER_COUNTS_DOWN
+#define CONFIG_SYS_TIMER_COUNTER	(MVEBU_TIMER_BASE + 0x14)
+#define CONFIG_SYS_TIMER_RATE		CONFIG_SYS_TCLK
+
 #endif /* _KW_CONFIG_H */
arch/arm/mach-mvebu/include/mach/config.h +5 -0
index 1d49cab..3281d90 100644
@@ -85,6 +85,11 @@
 #define CONFIG_SYS_I2C_SPEED		100000
 #endif
 
+/* Use common timer */
+#define CONFIG_SYS_TIMER_COUNTS_DOWN
+#define CONFIG_SYS_TIMER_COUNTER	(MVEBU_TIMER_BASE + 0x14)
+#define CONFIG_SYS_TIMER_RATE		25000000
+
 /* Common SPL configuration */
 #ifndef CONFIG_SPL_LDSCRIPT
 #define CONFIG_SPL_LDSCRIPT		"arch/arm/mach-mvebu/u-boot-spl.lds"
arch/arm/mach-mvebu/timer.c +12 -124

161 lines not on this page · raw message

Signature · 1 line
2.6.3