diff mbox series

[03/22] arm: kirkwood: make it CONFIG_TIMER aware

Message ID 20220817193809.1059688-4-michael@walle.cc
State Accepted
Commit 78c9b85df825f95c9b83a8d4b08c4ea75e8abc1a
Delegated to: Stefan Roese
Headers show
Series board: lsxl: major update and DM conversion | expand

Commit Message

Michael Walle Aug. 17, 2022, 7:37 p.m. UTC
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>
---
 arch/arm/mach-kirkwood/include/mach/config.h | 2 ++
 arch/arm/mach-mvebu/Makefile                 | 3 +++
 2 files changed, 5 insertions(+)

Comments

Pali Rohár Aug. 17, 2022, 7:51 p.m. UTC | #1
On Wednesday 17 August 2022 21:37:50 Michael Walle wrote:
> 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>

> ---
>  arch/arm/mach-kirkwood/include/mach/config.h | 2 ++
>  arch/arm/mach-mvebu/Makefile                 | 3 +++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/arch/arm/mach-kirkwood/include/mach/config.h b/arch/arm/mach-kirkwood/include/mach/config.h
> index 90e86ab99b..d877be119f 100644
> --- a/arch/arm/mach-kirkwood/include/mach/config.h
> +++ b/arch/arm/mach-kirkwood/include/mach/config.h
> @@ -51,8 +51,10 @@
>  #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 */
> diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
> index 61eeb9c8c1..103e64cf20 100644
> --- a/arch/arm/mach-mvebu/Makefile
> +++ b/arch/arm/mach-mvebu/Makefile
> @@ -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
>  
> -- 
> 2.30.2
>
diff mbox series

Patch

diff --git a/arch/arm/mach-kirkwood/include/mach/config.h b/arch/arm/mach-kirkwood/include/mach/config.h
index 90e86ab99b..d877be119f 100644
--- a/arch/arm/mach-kirkwood/include/mach/config.h
+++ b/arch/arm/mach-kirkwood/include/mach/config.h
@@ -51,8 +51,10 @@ 
 #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 */
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index 61eeb9c8c1..103e64cf20 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -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