]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: kirkwood: make it CONFIG_TIMER aware
authorMichael Walle <michael@walle.cc>
Wed, 17 Aug 2022 19:37:50 +0000 (21:37 +0200)
committerStefan Roese <sr@denx.de>
Tue, 23 Aug 2022 10:38:54 +0000 (12:38 +0200)
If we switch to CONFIG_TIMER, we don't need the legacy timer macros and
functions anymore. Add the proper guards to exclude them from compiling.

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
arch/arm/mach-kirkwood/include/mach/config.h
arch/arm/mach-mvebu/Makefile

index 90e86ab99b414d815069cdc6b3f074f6fb8ed8bf..d877be119fc8442275e72e9a33eb24dda9003809 100644 (file)
 #endif /* CONFIG_IDE */
 
 /* Use common timer */
+#ifndef CONFIG_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
 
 #endif /* _KW_CONFIG_H */
index 61eeb9c8c186f691aab84ea5aeef471d2eb0fc59..103e64cf2047d6a368791d19ff5b0e75c278e47a 100644 (file)
@@ -15,7 +15,10 @@ ifdef CONFIG_ARCH_KIRKWOOD
 obj-y  = dram.o
 obj-y  += gpio.o
 obj-y  += mbus.o
+
+ifndef CONFIG_TIMER
 obj-y  += timer.o
+endif
 
 else # CONFIG_ARCH_KIRKWOOD