aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-09-05 11:04:56 -0400
committerDaniel Lezcano <daniel.lezcano@linaro.org>2017-10-19 17:49:03 -0400
commit2f8a26c166eba01382765bc2fa575387e41079ac (patch)
treeef9e88c1e967145c037d249d207d3bc931be25ea
parent2554828b17ad16892cdd1becb43230782f0c0cfd (diff)
clocksource: Improve GENERIC_CLOCKEVENTS dependency
We regularly run into build errors when a clocksource driver selects CONFIG_TIMER_OF while CONFIG_GENERIC_CLOCKEVENTS is disabled: In file included from drivers/clocksource/timer-of.c:25:0: drivers/clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type At the moment, three drivers can show this behavior: ARMV7M_SYSTICK, CLKSRC_ST_LPC and CLKSRC_NPS. We could add further dependencies as we did many times, but I have looked a little bit more at what architectures are left that don't use GENERIC_CLOCKEVENTS, and this shows that there is a better solution. On arch/frv and arch/ia64, we never select CONFIG_GENERIC_CLOCKEVENTS and we also don't use ARCH_USES_GETTIMEOFFSET, which would block the clocksource Kconfig menu. On m68k, some platforms use CONFIG_GENERIC_CLOCKEVENTS, some use ARCH_USES_GETTIMEOFFSET, and some use neither of them. The good news is that there is no configuration that does not set CONFIG_GENERIC_CLOCKEVENTS but that wants to enable any of the Kconfig symbols in the menu, so we can simply replace the dependency with the stricter one. While in theory one could have a clocksource driver without the clockevent infrastructure, this seems unlikely to be relevant in the future any more. We can probably drop some of the other dependencies as well now, e.g. there should generally be no reason to depend on CONFIG_ARM unless the driver uses architecture specific assembly. Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r--drivers/clocksource/Kconfig50
1 files changed, 9 insertions, 41 deletions
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index cc6062049170..c729a88007d0 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -1,9 +1,8 @@
1menu "Clock Source drivers" 1menu "Clock Source drivers"
2 depends on !ARCH_USES_GETTIMEOFFSET 2 depends on GENERIC_CLOCKEVENTS
3 3
4config TIMER_OF 4config TIMER_OF
5 bool 5 bool
6 depends on GENERIC_CLOCKEVENTS
7 select TIMER_PROBE 6 select TIMER_PROBE
8 7
9config TIMER_ACPI 8config TIMER_ACPI
@@ -30,21 +29,18 @@ config CLKSRC_MMIO
30 29
31config BCM2835_TIMER 30config BCM2835_TIMER
32 bool "BCM2835 timer driver" if COMPILE_TEST 31 bool "BCM2835 timer driver" if COMPILE_TEST
33 depends on GENERIC_CLOCKEVENTS
34 select CLKSRC_MMIO 32 select CLKSRC_MMIO
35 help 33 help
36 Enables the support for the BCM2835 timer driver. 34 Enables the support for the BCM2835 timer driver.
37 35
38config BCM_KONA_TIMER 36config BCM_KONA_TIMER
39 bool "BCM mobile timer driver" if COMPILE_TEST 37 bool "BCM mobile timer driver" if COMPILE_TEST
40 depends on GENERIC_CLOCKEVENTS
41 select CLKSRC_MMIO 38 select CLKSRC_MMIO
42 help 39 help
43 Enables the support for the BCM Kona mobile timer driver. 40 Enables the support for the BCM Kona mobile timer driver.
44 41
45config DIGICOLOR_TIMER 42config DIGICOLOR_TIMER
46 bool "Digicolor timer driver" if COMPILE_TEST 43 bool "Digicolor timer driver" if COMPILE_TEST
47 depends on GENERIC_CLOCKEVENTS
48 select CLKSRC_MMIO 44 select CLKSRC_MMIO
49 depends on HAS_IOMEM 45 depends on HAS_IOMEM
50 help 46 help
@@ -52,7 +48,6 @@ config DIGICOLOR_TIMER
52 48
53config DW_APB_TIMER 49config DW_APB_TIMER
54 bool "DW APB timer driver" if COMPILE_TEST 50 bool "DW APB timer driver" if COMPILE_TEST
55 depends on GENERIC_CLOCKEVENTS
56 help 51 help
57 Enables the support for the dw_apb timer. 52 Enables the support for the dw_apb timer.
58 53
@@ -63,7 +58,6 @@ config DW_APB_TIMER_OF
63 58
64config FTTMR010_TIMER 59config FTTMR010_TIMER
65 bool "Faraday Technology timer driver" if COMPILE_TEST 60 bool "Faraday Technology timer driver" if COMPILE_TEST
66 depends on GENERIC_CLOCKEVENTS
67 depends on HAS_IOMEM 61 depends on HAS_IOMEM
68 select CLKSRC_MMIO 62 select CLKSRC_MMIO
69 select TIMER_OF 63 select TIMER_OF
@@ -90,7 +84,6 @@ config ARMADA_370_XP_TIMER
90 84
91config MESON6_TIMER 85config MESON6_TIMER
92 bool "Meson6 timer driver" if COMPILE_TEST 86 bool "Meson6 timer driver" if COMPILE_TEST
93 depends on GENERIC_CLOCKEVENTS
94 select CLKSRC_MMIO 87 select CLKSRC_MMIO
95 help 88 help
96 Enables the support for the Meson6 timer driver. 89 Enables the support for the Meson6 timer driver.
@@ -105,14 +98,12 @@ config ORION_TIMER
105 98
106config OWL_TIMER 99config OWL_TIMER
107 bool "Owl timer driver" if COMPILE_TEST 100 bool "Owl timer driver" if COMPILE_TEST
108 depends on GENERIC_CLOCKEVENTS
109 select CLKSRC_MMIO 101 select CLKSRC_MMIO
110 help 102 help
111 Enables the support for the Actions Semi Owl timer driver. 103 Enables the support for the Actions Semi Owl timer driver.
112 104
113config SUN4I_TIMER 105config SUN4I_TIMER
114 bool "Sun4i timer driver" if COMPILE_TEST 106 bool "Sun4i timer driver" if COMPILE_TEST
115 depends on GENERIC_CLOCKEVENTS
116 depends on HAS_IOMEM 107 depends on HAS_IOMEM
117 select CLKSRC_MMIO 108 select CLKSRC_MMIO
118 select TIMER_OF 109 select TIMER_OF
@@ -135,7 +126,6 @@ config TEGRA_TIMER
135 126
136config VT8500_TIMER 127config VT8500_TIMER
137 bool "VT8500 timer driver" if COMPILE_TEST 128 bool "VT8500 timer driver" if COMPILE_TEST
138 depends on GENERIC_CLOCKEVENTS
139 depends on HAS_IOMEM 129 depends on HAS_IOMEM
140 help 130 help
141 Enables support for the VT8500 driver. 131 Enables support for the VT8500 driver.
@@ -148,7 +138,6 @@ config CADENCE_TTC_TIMER
148 138
149config ASM9260_TIMER 139config ASM9260_TIMER
150 bool "ASM9260 timer driver" if COMPILE_TEST 140 bool "ASM9260 timer driver" if COMPILE_TEST
151 depends on GENERIC_CLOCKEVENTS
152 select CLKSRC_MMIO 141 select CLKSRC_MMIO
153 select TIMER_OF 142 select TIMER_OF
154 help 143 help
@@ -171,28 +160,24 @@ config CLKSRC_NOMADIK_MTU_SCHED_CLOCK
171 160
172config CLKSRC_DBX500_PRCMU 161config CLKSRC_DBX500_PRCMU
173 bool "Clocksource PRCMU Timer" if COMPILE_TEST 162 bool "Clocksource PRCMU Timer" if COMPILE_TEST
174 depends on GENERIC_CLOCKEVENTS
175 depends on HAS_IOMEM 163 depends on HAS_IOMEM
176 help 164 help
177 Use the always on PRCMU Timer as clocksource 165 Use the always on PRCMU Timer as clocksource
178 166
179config CLPS711X_TIMER 167config CLPS711X_TIMER
180 bool "Cirrus logic timer driver" if COMPILE_TEST 168 bool "Cirrus logic timer driver" if COMPILE_TEST
181 depends on GENERIC_CLOCKEVENTS
182 select CLKSRC_MMIO 169 select CLKSRC_MMIO
183 help 170 help
184 Enables support for the Cirrus Logic PS711 timer. 171 Enables support for the Cirrus Logic PS711 timer.
185 172
186config ATLAS7_TIMER 173config ATLAS7_TIMER
187 bool "Atlas7 timer driver" if COMPILE_TEST 174 bool "Atlas7 timer driver" if COMPILE_TEST
188 depends on GENERIC_CLOCKEVENTS
189 select CLKSRC_MMIO 175 select CLKSRC_MMIO
190 help 176 help
191 Enables support for the Atlas7 timer. 177 Enables support for the Atlas7 timer.
192 178
193config MXS_TIMER 179config MXS_TIMER
194 bool "Mxs timer driver" if COMPILE_TEST 180 bool "Mxs timer driver" if COMPILE_TEST
195 depends on GENERIC_CLOCKEVENTS
196 select CLKSRC_MMIO 181 select CLKSRC_MMIO
197 select STMP_DEVICE 182 select STMP_DEVICE
198 help 183 help
@@ -200,14 +185,12 @@ config MXS_TIMER
200 185
201config PRIMA2_TIMER 186config PRIMA2_TIMER
202 bool "Prima2 timer driver" if COMPILE_TEST 187 bool "Prima2 timer driver" if COMPILE_TEST
203 depends on GENERIC_CLOCKEVENTS
204 select CLKSRC_MMIO 188 select CLKSRC_MMIO
205 help 189 help
206 Enables support for the Prima2 timer. 190 Enables support for the Prima2 timer.
207 191
208config U300_TIMER 192config U300_TIMER
209 bool "U300 timer driver" if COMPILE_TEST 193 bool "U300 timer driver" if COMPILE_TEST
210 depends on GENERIC_CLOCKEVENTS
211 depends on ARM 194 depends on ARM
212 select CLKSRC_MMIO 195 select CLKSRC_MMIO
213 help 196 help
@@ -215,14 +198,12 @@ config U300_TIMER
215 198
216config NSPIRE_TIMER 199config NSPIRE_TIMER
217 bool "NSpire timer driver" if COMPILE_TEST 200 bool "NSpire timer driver" if COMPILE_TEST
218 depends on GENERIC_CLOCKEVENTS
219 select CLKSRC_MMIO 201 select CLKSRC_MMIO
220 help 202 help
221 Enables support for the Nspire timer. 203 Enables support for the Nspire timer.
222 204
223config KEYSTONE_TIMER 205config KEYSTONE_TIMER
224 bool "Keystone timer driver" if COMPILE_TEST 206 bool "Keystone timer driver" if COMPILE_TEST
225 depends on GENERIC_CLOCKEVENTS
226 depends on ARM || ARM64 207 depends on ARM || ARM64
227 select CLKSRC_MMIO 208 select CLKSRC_MMIO
228 help 209 help
@@ -230,7 +211,6 @@ config KEYSTONE_TIMER
230 211
231config INTEGRATOR_AP_TIMER 212config INTEGRATOR_AP_TIMER
232 bool "Integrator-ap timer driver" if COMPILE_TEST 213 bool "Integrator-ap timer driver" if COMPILE_TEST
233 depends on GENERIC_CLOCKEVENTS
234 select CLKSRC_MMIO 214 select CLKSRC_MMIO
235 help 215 help
236 Enables support for the Integrator-ap timer. 216 Enables support for the Integrator-ap timer.
@@ -253,7 +233,7 @@ config CLKSRC_EFM32
253 233
254config CLKSRC_LPC32XX 234config CLKSRC_LPC32XX
255 bool "Clocksource for LPC32XX" if COMPILE_TEST 235 bool "Clocksource for LPC32XX" if COMPILE_TEST
256 depends on GENERIC_CLOCKEVENTS && HAS_IOMEM 236 depends on HAS_IOMEM
257 depends on ARM 237 depends on ARM
258 select CLKSRC_MMIO 238 select CLKSRC_MMIO
259 select TIMER_OF 239 select TIMER_OF
@@ -262,7 +242,7 @@ config CLKSRC_LPC32XX
262 242
263config CLKSRC_PISTACHIO 243config CLKSRC_PISTACHIO
264 bool "Clocksource for Pistachio SoC" if COMPILE_TEST 244 bool "Clocksource for Pistachio SoC" if COMPILE_TEST
265 depends on GENERIC_CLOCKEVENTS && HAS_IOMEM 245 depends on HAS_IOMEM
266 select TIMER_OF 246 select TIMER_OF
267 help 247 help
268 Enables the clocksource for the Pistachio SoC. 248 Enables the clocksource for the Pistachio SoC.
@@ -298,7 +278,6 @@ config CLKSRC_MPS2
298 278
299config ARC_TIMERS 279config ARC_TIMERS
300 bool "Support for 32-bit TIMERn counters in ARC Cores" if COMPILE_TEST 280 bool "Support for 32-bit TIMERn counters in ARC Cores" if COMPILE_TEST
301 depends on GENERIC_CLOCKEVENTS
302 select TIMER_OF 281 select TIMER_OF
303 help 282 help
304 These are legacy 32-bit TIMER0 and TIMER1 counters found on all ARC cores 283 These are legacy 32-bit TIMER0 and TIMER1 counters found on all ARC cores
@@ -307,7 +286,6 @@ config ARC_TIMERS
307 286
308config ARC_TIMERS_64BIT 287config ARC_TIMERS_64BIT
309 bool "Support for 64-bit counters in ARC HS38 cores" if COMPILE_TEST 288 bool "Support for 64-bit counters in ARC HS38 cores" if COMPILE_TEST
310 depends on GENERIC_CLOCKEVENTS
311 depends on ARC_TIMERS 289 depends on ARC_TIMERS
312 select TIMER_OF 290 select TIMER_OF
313 help 291 help
@@ -407,7 +385,6 @@ config ATMEL_PIT
407 385
408config ATMEL_ST 386config ATMEL_ST
409 bool "Atmel ST timer support" if COMPILE_TEST 387 bool "Atmel ST timer support" if COMPILE_TEST
410 depends on GENERIC_CLOCKEVENTS
411 select TIMER_OF 388 select TIMER_OF
412 select MFD_SYSCON 389 select MFD_SYSCON
413 help 390 help
@@ -426,7 +403,6 @@ config CLKSRC_EXYNOS_MCT
426 403
427config CLKSRC_SAMSUNG_PWM 404config CLKSRC_SAMSUNG_PWM
428 bool "PWM timer driver for Samsung S3C, S5P" if COMPILE_TEST 405 bool "PWM timer driver for Samsung S3C, S5P" if COMPILE_TEST
429 depends on GENERIC_CLOCKEVENTS
430 depends on HAS_IOMEM 406 depends on HAS_IOMEM
431 help 407 help
432 This is a new clocksource driver for the PWM timer found in 408 This is a new clocksource driver for the PWM timer found in
@@ -436,7 +412,6 @@ config CLKSRC_SAMSUNG_PWM
436 412
437config FSL_FTM_TIMER 413config FSL_FTM_TIMER
438 bool "Freescale FlexTimer Module driver" if COMPILE_TEST 414 bool "Freescale FlexTimer Module driver" if COMPILE_TEST
439 depends on GENERIC_CLOCKEVENTS
440 depends on HAS_IOMEM 415 depends on HAS_IOMEM
441 select CLKSRC_MMIO 416 select CLKSRC_MMIO
442 help 417 help
@@ -450,7 +425,6 @@ config VF_PIT_TIMER
450 425
451config OXNAS_RPS_TIMER 426config OXNAS_RPS_TIMER
452 bool "Oxford Semiconductor OXNAS RPS Timers driver" if COMPILE_TEST 427 bool "Oxford Semiconductor OXNAS RPS Timers driver" if COMPILE_TEST
453 depends on GENERIC_CLOCKEVENTS
454 select TIMER_OF 428 select TIMER_OF
455 select CLKSRC_MMIO 429 select CLKSRC_MMIO
456 help 430 help
@@ -461,7 +435,7 @@ config SYS_SUPPORTS_SH_CMT
461 435
462config MTK_TIMER 436config MTK_TIMER
463 bool "Mediatek timer driver" if COMPILE_TEST 437 bool "Mediatek timer driver" if COMPILE_TEST
464 depends on GENERIC_CLOCKEVENTS && HAS_IOMEM 438 depends on HAS_IOMEM
465 select TIMER_OF 439 select TIMER_OF
466 select CLKSRC_MMIO 440 select CLKSRC_MMIO
467 help 441 help
@@ -479,7 +453,6 @@ config SYS_SUPPORTS_EM_STI
479config CLKSRC_JCORE_PIT 453config CLKSRC_JCORE_PIT
480 bool "J-Core PIT timer driver" if COMPILE_TEST 454 bool "J-Core PIT timer driver" if COMPILE_TEST
481 depends on OF 455 depends on OF
482 depends on GENERIC_CLOCKEVENTS
483 depends on HAS_IOMEM 456 depends on HAS_IOMEM
484 select CLKSRC_MMIO 457 select CLKSRC_MMIO
485 help 458 help
@@ -488,7 +461,6 @@ config CLKSRC_JCORE_PIT
488 461
489config SH_TIMER_CMT 462config SH_TIMER_CMT
490 bool "Renesas CMT timer driver" if COMPILE_TEST 463 bool "Renesas CMT timer driver" if COMPILE_TEST
491 depends on GENERIC_CLOCKEVENTS
492 depends on HAS_IOMEM 464 depends on HAS_IOMEM
493 default SYS_SUPPORTS_SH_CMT 465 default SYS_SUPPORTS_SH_CMT
494 help 466 help
@@ -498,7 +470,6 @@ config SH_TIMER_CMT
498 470
499config SH_TIMER_MTU2 471config SH_TIMER_MTU2
500 bool "Renesas MTU2 timer driver" if COMPILE_TEST 472 bool "Renesas MTU2 timer driver" if COMPILE_TEST
501 depends on GENERIC_CLOCKEVENTS
502 depends on HAS_IOMEM 473 depends on HAS_IOMEM
503 default SYS_SUPPORTS_SH_MTU2 474 default SYS_SUPPORTS_SH_MTU2
504 help 475 help
@@ -508,14 +479,12 @@ config SH_TIMER_MTU2
508 479
509config RENESAS_OSTM 480config RENESAS_OSTM
510 bool "Renesas OSTM timer driver" if COMPILE_TEST 481 bool "Renesas OSTM timer driver" if COMPILE_TEST
511 depends on GENERIC_CLOCKEVENTS
512 select CLKSRC_MMIO 482 select CLKSRC_MMIO
513 help 483 help
514 Enables the support for the Renesas OSTM. 484 Enables the support for the Renesas OSTM.
515 485
516config SH_TIMER_TMU 486config SH_TIMER_TMU
517 bool "Renesas TMU timer driver" if COMPILE_TEST 487 bool "Renesas TMU timer driver" if COMPILE_TEST
518 depends on GENERIC_CLOCKEVENTS
519 depends on HAS_IOMEM 488 depends on HAS_IOMEM
520 default SYS_SUPPORTS_SH_TMU 489 default SYS_SUPPORTS_SH_TMU
521 help 490 help
@@ -525,7 +494,7 @@ config SH_TIMER_TMU
525 494
526config EM_TIMER_STI 495config EM_TIMER_STI
527 bool "Renesas STI timer driver" if COMPILE_TEST 496 bool "Renesas STI timer driver" if COMPILE_TEST
528 depends on GENERIC_CLOCKEVENTS && HAS_IOMEM 497 depends on HAS_IOMEM
529 default SYS_SUPPORTS_EM_STI 498 default SYS_SUPPORTS_EM_STI
530 help 499 help
531 This enables build of a clocksource and clockevent driver for 500 This enables build of a clocksource and clockevent driver for
@@ -566,7 +535,6 @@ config CLKSRC_TANGO_XTAL
566 535
567config CLKSRC_PXA 536config CLKSRC_PXA
568 bool "Clocksource for PXA or SA-11x0 platform" if COMPILE_TEST 537 bool "Clocksource for PXA or SA-11x0 platform" if COMPILE_TEST
569 depends on GENERIC_CLOCKEVENTS
570 depends on HAS_IOMEM 538 depends on HAS_IOMEM
571 select CLKSRC_MMIO 539 select CLKSRC_MMIO
572 help 540 help
@@ -575,20 +543,20 @@ config CLKSRC_PXA
575 543
576config H8300_TMR8 544config H8300_TMR8
577 bool "Clockevent timer for the H8300 platform" if COMPILE_TEST 545 bool "Clockevent timer for the H8300 platform" if COMPILE_TEST
578 depends on GENERIC_CLOCKEVENTS && HAS_IOMEM 546 depends on HAS_IOMEM
579 help 547 help
580 This enables the 8 bits timer for the H8300 platform. 548 This enables the 8 bits timer for the H8300 platform.
581 549
582config H8300_TMR16 550config H8300_TMR16
583 bool "Clockevent timer for the H83069 platform" if COMPILE_TEST 551 bool "Clockevent timer for the H83069 platform" if COMPILE_TEST
584 depends on GENERIC_CLOCKEVENTS && HAS_IOMEM 552 depends on HAS_IOMEM
585 help 553 help
586 This enables the 16 bits timer for the H8300 platform with the 554 This enables the 16 bits timer for the H8300 platform with the
587 H83069 cpu. 555 H83069 cpu.
588 556
589config H8300_TPU 557config H8300_TPU
590 bool "Clocksource for the H8300 platform" if COMPILE_TEST 558 bool "Clocksource for the H8300 platform" if COMPILE_TEST
591 depends on GENERIC_CLOCKEVENTS && HAS_IOMEM 559 depends on HAS_IOMEM
592 help 560 help
593 This enables the clocksource for the H8300 platform with the 561 This enables the clocksource for the H8300 platform with the
594 H8S2678 cpu. 562 H8S2678 cpu.
@@ -600,7 +568,7 @@ config CLKSRC_IMX_GPT
600 568
601config CLKSRC_IMX_TPM 569config CLKSRC_IMX_TPM
602 bool "Clocksource using i.MX TPM" if COMPILE_TEST 570 bool "Clocksource using i.MX TPM" if COMPILE_TEST
603 depends on ARM && CLKDEV_LOOKUP && GENERIC_CLOCKEVENTS 571 depends on ARM && CLKDEV_LOOKUP
604 select CLKSRC_MMIO 572 select CLKSRC_MMIO
605 help 573 help
606 Enable this option to use IMX Timer/PWM Module (TPM) timer as 574 Enable this option to use IMX Timer/PWM Module (TPM) timer as