aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2016-06-03 08:31:16 -0400
committerDaniel Lezcano <daniel.lezcano@linaro.org>2016-06-28 04:22:13 -0400
commit85f98db4adbbd3ec6b41537d31241b59bf47c66f (patch)
tree157ab3e368a7d5189a7cdee5badfcd3840b8e6e0
parentf3550d499576c423db0d902930cf8d848fe09744 (diff)
clocksource/drivers/u300: Add the COMPILE_TEST option
Change the Kconfig option logic to fullfil with the current approach. A new Kconfig option is added, CONFIG_U300_TIMER and is selected by the platform. Then the clocksource's Kconfig is changed to make this option selectable by the user if the COMPILE_TEST option is set. Otherwise, it is up to the platform's Kconfig to select the timer. Due on the delay specific code, this driver will compile only on the ARM architecture. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r--arch/arm/mach-u300/Kconfig2
-rw-r--r--drivers/clocksource/Kconfig8
-rw-r--r--drivers/clocksource/Makefile2
3 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/mach-u300/Kconfig b/arch/arm/mach-u300/Kconfig
index 301a98498453..4fdc3425ffbd 100644
--- a/arch/arm/mach-u300/Kconfig
+++ b/arch/arm/mach-u300/Kconfig
@@ -4,7 +4,7 @@ menuconfig ARCH_U300
4 select ARCH_REQUIRE_GPIOLIB 4 select ARCH_REQUIRE_GPIOLIB
5 select ARM_AMBA 5 select ARM_AMBA
6 select ARM_VIC 6 select ARM_VIC
7 select CLKSRC_MMIO 7 select U300_TIMER
8 select CPU_ARM926T 8 select CPU_ARM926T
9 select HAVE_TCM 9 select HAVE_TCM
10 select PINCTRL 10 select PINCTRL
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index c350fbd805d7..d425f80b1e42 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -191,6 +191,14 @@ config PRIMA2_TIMER
191 help 191 help
192 Enables support for the Prima2 timer. 192 Enables support for the Prima2 timer.
193 193
194config U300_TIMER
195 bool "U300 timer driver" if COMPILE_TEST
196 depends on GENERIC_CLOCKEVENTS
197 depends on ARM
198 select CLKSRC_MMIO
199 help
200 Enables support for the U300 timer.
201
194config CLKSRC_DBX500_PRCMU_SCHED_CLOCK 202config CLKSRC_DBX500_PRCMU_SCHED_CLOCK
195 bool "Clocksource PRCMU Timer sched_clock" 203 bool "Clocksource PRCMU Timer sched_clock"
196 depends on (CLKSRC_DBX500_PRCMU && !CLKSRC_NOMADIK_MTU_SCHED_CLOCK) 204 depends on (CLKSRC_DBX500_PRCMU && !CLKSRC_NOMADIK_MTU_SCHED_CLOCK)
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
index b419d5da11c7..adbc3a8082d0 100644
--- a/drivers/clocksource/Makefile
+++ b/drivers/clocksource/Makefile
@@ -26,7 +26,7 @@ obj-$(CONFIG_MOXART_TIMER) += moxart_timer.o
26obj-$(CONFIG_MXS_TIMER) += mxs_timer.o 26obj-$(CONFIG_MXS_TIMER) += mxs_timer.o
27obj-$(CONFIG_CLKSRC_PXA) += pxa_timer.o 27obj-$(CONFIG_CLKSRC_PXA) += pxa_timer.o
28obj-$(CONFIG_PRIMA2_TIMER) += timer-prima2.o 28obj-$(CONFIG_PRIMA2_TIMER) += timer-prima2.o
29obj-$(CONFIG_ARCH_U300) += timer-u300.o 29obj-$(CONFIG_U300_TIMER) += timer-u300.o
30obj-$(CONFIG_SUN4I_TIMER) += sun4i_timer.o 30obj-$(CONFIG_SUN4I_TIMER) += sun4i_timer.o
31obj-$(CONFIG_SUN5I_HSTIMER) += timer-sun5i.o 31obj-$(CONFIG_SUN5I_HSTIMER) += timer-sun5i.o
32obj-$(CONFIG_MESON6_TIMER) += meson6_timer.o 32obj-$(CONFIG_MESON6_TIMER) += meson6_timer.o