@@ -24,9 +24,6 @@ config ARCH_OMAP2PLUS_TYPICAL
config SOC_HAS_OMAP2_SDRC
bool "OMAP2 SDRAM Controller support"
-config SOC_HAS_REALTIME_COUNTER
- bool "Real time free running counter"
-
config ARCH_OMAP2
bool "TI OMAP2"
depends on ARCH_OMAP2PLUS
@@ -79,7 +76,6 @@ config SOC_OMAP5
select ARM_GIC
select CPU_V7
select HAVE_SMP
- select SOC_HAS_REALTIME_COUNTER
select COMMON_CLK
comment "OMAP Core Type"
@@ -476,7 +476,7 @@ static void __init omap2_gptimer_clocksource_init(int gptimer_id,
gptimer_id, clksrc.rate);
}
-#ifdef CONFIG_SOC_HAS_REALTIME_COUNTER
+#ifdef CONFIG_SOC_OMAP5
/*
* The realtime counter also called master counter, is a free-running
* counter, which is related to real time. It produces the count used
@@ -549,10 +549,7 @@ static void __init realtime_counter_init(void)
iounmap(base);
}
-#else
-static inline void __init realtime_counter_init(void)
-{}
-#endif
+#endif /* CONFIG_SOC_OMAP5 */
#define OMAP_SYS_GP_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \
clksrc_nr, clksrc_src) \
In commit fa6d79d (ARM: OMAP: Add initialisation for the real-time counter), the function realtime_counter_init() was added. However, if the kernel configuration option CONFIG_SOC_OMAP5 is not selected then the following compiler warning is observed. CC arch/arm/mach-omap2/timer.o arch/arm/mach-omap2/timer.c:489:20: warning: ‘realtime_counter_init’ defined but not used [-Wunused-function] Commit fa6d79d also introduced the kernel configuration option CONFIG_SOC_HAS_REALTIME_COUNTER. If this option is not selected then the a stub function for realtime_counter_init() is defined. The option CONFIG_SOC_HAS_REALTIME_COUNTER and stub function are not really needed because ... 1. For non-OMAP5 devices, there is no realtime counter and so realtime_counter_init() function is not used. 2. For OMAP5 devices, CONFIG_SOC_HAS_REALTIME_COUNTER is always selected and cannot be disabled, so the stub function for realtime_counter_init() is never used. Fix this warning by removing the kernel configuration option CONFIG_SOC_HAS_REALTIME_COUNTER and stub function, and only include the function realtime_counter_init() if CONFIG_SOC_OMAP5 is selected. Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> Reported-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Jon Hunter <jon-hunter@ti.com> --- arch/arm/mach-omap2/Kconfig | 4 ---- arch/arm/mach-omap2/timer.c | 7 ++----- 2 files changed, 2 insertions(+), 9 deletions(-)