blob: 4d37f018d846c7c207409340d47461297cefde94 [file] [log] [blame]
xjb04a4022021-11-25 15:01:52 +08001menu "Clock Source drivers"
2 depends on GENERIC_CLOCKEVENTS
3
4config TIMER_OF
5 bool
6 select TIMER_PROBE
7
8config TIMER_ACPI
9 bool
10 select TIMER_PROBE
11
12config TIMER_PROBE
13 bool
14
15config CLKSRC_I8253
16 bool
17
18config CLKEVT_I8253
19 bool
20
21config I8253_LOCK
22 bool
23
24config OMAP_DM_TIMER
25 bool
26
27config CLKBLD_I8253
28 def_bool y if CLKSRC_I8253 || CLKEVT_I8253 || I8253_LOCK
29
30config CLKSRC_MMIO
31 bool
32
33config BCM2835_TIMER
34 bool "BCM2835 timer driver" if COMPILE_TEST
35 select CLKSRC_MMIO
36 help
37 Enables the support for the BCM2835 timer driver.
38
39config BCM_KONA_TIMER
40 bool "BCM mobile timer driver" if COMPILE_TEST
41 select CLKSRC_MMIO
42 help
43 Enables the support for the BCM Kona mobile timer driver.
44
45config DIGICOLOR_TIMER
46 bool "Digicolor timer driver" if COMPILE_TEST
47 select CLKSRC_MMIO
48 depends on HAS_IOMEM
49 help
50 Enables the support for the digicolor timer driver.
51
52config DW_APB_TIMER
53 bool "DW APB timer driver" if COMPILE_TEST
54 help
55 Enables the support for the dw_apb timer.
56
57config DW_APB_TIMER_OF
58 bool
59 select DW_APB_TIMER
60 select TIMER_OF
61
62config FTTMR010_TIMER
63 bool "Faraday Technology timer driver" if COMPILE_TEST
64 depends on HAS_IOMEM
65 select CLKSRC_MMIO
66 select TIMER_OF
67 select MFD_SYSCON
68 help
69 Enables support for the Faraday Technology timer block
70 FTTMR010.
71
72config ROCKCHIP_TIMER
73 bool "Rockchip timer driver" if COMPILE_TEST
74 depends on ARM || ARM64
75 select TIMER_OF
76 select CLKSRC_MMIO
77 help
78 Enables the support for the rockchip timer driver.
79
80config ARMADA_370_XP_TIMER
81 bool "Armada 370 and XP timer driver" if COMPILE_TEST
82 depends on ARM
83 select TIMER_OF
84 select CLKSRC_MMIO
85 help
86 Enables the support for the Armada 370 and XP timer driver.
87
88config MESON6_TIMER
89 bool "Meson6 timer driver" if COMPILE_TEST
90 select CLKSRC_MMIO
91 help
92 Enables the support for the Meson6 timer driver.
93
94config ORION_TIMER
95 bool "Orion timer driver" if COMPILE_TEST
96 depends on ARM
97 select TIMER_OF
98 select CLKSRC_MMIO
99 help
100 Enables the support for the Orion timer driver
101
102config OWL_TIMER
103 bool "Owl timer driver" if COMPILE_TEST
104 select CLKSRC_MMIO
105 help
106 Enables the support for the Actions Semi Owl timer driver.
107
108config SUN4I_TIMER
109 bool "Sun4i timer driver" if COMPILE_TEST
110 depends on HAS_IOMEM
111 select CLKSRC_MMIO
112 select TIMER_OF
113 help
114 Enables support for the Sun4i timer.
115
116config SUN5I_HSTIMER
117 bool "Sun5i timer driver" if COMPILE_TEST
118 select CLKSRC_MMIO
119 depends on COMMON_CLK
120 help
121 Enables support the Sun5i timer.
122
123config TEGRA_TIMER
124 bool "Tegra timer driver" if COMPILE_TEST
125 select CLKSRC_MMIO
126 depends on ARM
127 help
128 Enables support for the Tegra driver.
129
130config VT8500_TIMER
131 bool "VT8500 timer driver" if COMPILE_TEST
132 depends on HAS_IOMEM
133 help
134 Enables support for the VT8500 driver.
135
136config NPCM7XX_TIMER
137 bool "NPCM7xx timer driver" if COMPILE_TEST
138 depends on HAS_IOMEM
139 select TIMER_OF
140 select CLKSRC_MMIO
141 help
142 Enable 24-bit TIMER0 and TIMER1 counters in the NPCM7xx architecture,
143 While TIMER0 serves as clockevent and TIMER1 serves as clocksource.
144
145config CADENCE_TTC_TIMER
146 bool "Cadence TTC timer driver" if COMPILE_TEST
147 depends on COMMON_CLK
148 help
149 Enables support for the cadence ttc driver.
150
151config ASM9260_TIMER
152 bool "ASM9260 timer driver" if COMPILE_TEST
153 select CLKSRC_MMIO
154 select TIMER_OF
155 help
156 Enables support for the ASM9260 timer.
157
158config CLKSRC_NOMADIK_MTU
159 bool "Nomakdik clocksource driver" if COMPILE_TEST
160 depends on ARM
161 select CLKSRC_MMIO
162 help
163 Support for Multi Timer Unit. MTU provides access
164 to multiple interrupt generating programmable
165 32-bit free running decrementing counters.
166
167config CLKSRC_NOMADIK_MTU_SCHED_CLOCK
168 bool
169 depends on CLKSRC_NOMADIK_MTU
170 help
171 Use the Multi Timer Unit as the sched_clock.
172
173config CLKSRC_DBX500_PRCMU
174 bool "Clocksource PRCMU Timer" if COMPILE_TEST
175 depends on HAS_IOMEM
176 help
177 Use the always on PRCMU Timer as clocksource
178
179config CLPS711X_TIMER
180 bool "Cirrus logic timer driver" if COMPILE_TEST
181 select CLKSRC_MMIO
182 help
183 Enables support for the Cirrus Logic PS711 timer.
184
185config ATLAS7_TIMER
186 bool "Atlas7 timer driver" if COMPILE_TEST
187 select CLKSRC_MMIO
188 help
189 Enables support for the Atlas7 timer.
190
191config MXS_TIMER
192 bool "Mxs timer driver" if COMPILE_TEST
193 select CLKSRC_MMIO
194 select STMP_DEVICE
195 help
196 Enables support for the Mxs timer.
197
198config PRIMA2_TIMER
199 bool "Prima2 timer driver" if COMPILE_TEST
200 select CLKSRC_MMIO
201 help
202 Enables support for the Prima2 timer.
203
204config U300_TIMER
205 bool "U300 timer driver" if COMPILE_TEST
206 depends on ARM
207 select CLKSRC_MMIO
208 help
209 Enables support for the U300 timer.
210
211config NSPIRE_TIMER
212 bool "NSpire timer driver" if COMPILE_TEST
213 select CLKSRC_MMIO
214 help
215 Enables support for the Nspire timer.
216
217config KEYSTONE_TIMER
218 bool "Keystone timer driver" if COMPILE_TEST
219 depends on ARM || ARM64
220 select CLKSRC_MMIO
221 help
222 Enables support for the Keystone timer.
223
224config INTEGRATOR_AP_TIMER
225 bool "Integrator-ap timer driver" if COMPILE_TEST
226 select CLKSRC_MMIO
227 help
228 Enables support for the Integrator-ap timer.
229
230config CLKSRC_DBX500_PRCMU_SCHED_CLOCK
231 bool "Clocksource PRCMU Timer sched_clock"
232 depends on (CLKSRC_DBX500_PRCMU && !CLKSRC_NOMADIK_MTU_SCHED_CLOCK)
233 default y
234 help
235 Use the always on PRCMU Timer as sched_clock
236
237config CLKSRC_EFM32
238 bool "Clocksource for Energy Micro's EFM32 SoCs" if !ARCH_EFM32
239 depends on OF && ARM && (ARCH_EFM32 || COMPILE_TEST)
240 select CLKSRC_MMIO
241 default ARCH_EFM32
242 help
243 Support to use the timers of EFM32 SoCs as clock source and clock
244 event device.
245
246config CLKSRC_LPC32XX
247 bool "Clocksource for LPC32XX" if COMPILE_TEST
248 depends on HAS_IOMEM
249 depends on ARM
250 select CLKSRC_MMIO
251 select TIMER_OF
252 help
253 Support for the LPC32XX clocksource.
254
255config CLKSRC_PISTACHIO
256 bool "Clocksource for Pistachio SoC" if COMPILE_TEST
257 depends on HAS_IOMEM
258 select TIMER_OF
259 help
260 Enables the clocksource for the Pistachio SoC.
261
262config CLKSRC_TI_32K
263 bool "Texas Instruments 32.768 Hz Clocksource" if COMPILE_TEST
264 depends on GENERIC_SCHED_CLOCK
265 select TIMER_OF if OF
266 help
267 This option enables support for Texas Instruments 32.768 Hz clocksource
268 available on many OMAP-like platforms.
269
270config CLKSRC_NPS
271 bool "NPS400 clocksource driver" if COMPILE_TEST
272 depends on !PHYS_ADDR_T_64BIT
273 select CLKSRC_MMIO
274 select TIMER_OF if OF
275 help
276 NPS400 clocksource support.
277 Got 64 bit counter with update rate up to 1000MHz.
278 This counter is accessed via couple of 32 bit memory mapped registers.
279
280config CLKSRC_STM32
281 bool "Clocksource for STM32 SoCs" if !ARCH_STM32
282 depends on OF && ARM && (ARCH_STM32 || COMPILE_TEST)
283 select CLKSRC_MMIO
284 select TIMER_OF
285
286config CLKSRC_MPS2
287 bool "Clocksource for MPS2 SoCs" if COMPILE_TEST
288 depends on GENERIC_SCHED_CLOCK
289 select CLKSRC_MMIO
290 select TIMER_OF
291
292config ARC_TIMERS
293 bool "Support for 32-bit TIMERn counters in ARC Cores" if COMPILE_TEST
294 depends on GENERIC_SCHED_CLOCK
295 select TIMER_OF
296 help
297 These are legacy 32-bit TIMER0 and TIMER1 counters found on all ARC cores
298 (ARC700 as well as ARC HS38).
299 TIMER0 serves as clockevent while TIMER1 provides clocksource
300
301config ARC_TIMERS_64BIT
302 bool "Support for 64-bit counters in ARC HS38 cores" if COMPILE_TEST
303 depends on ARC_TIMERS
304 select TIMER_OF
305 help
306 This enables 2 different 64-bit timers: RTC (for UP) and GFRC (for SMP)
307 RTC is implemented inside the core, while GFRC sits outside the core in
308 ARConnect IP block. Driver automatically picks one of them for clocksource
309 as appropriate.
310
311config ARM_ARCH_TIMER
312 bool
313 select TIMER_OF if OF
314 select TIMER_ACPI if ACPI
315
316config ARM_ARCH_TIMER_EVTSTREAM
317 bool "Enable ARM architected timer event stream generation by default"
318 default y if ARM_ARCH_TIMER
319 depends on ARM_ARCH_TIMER
320 help
321 This option enables support by default for event stream generation
322 based on the ARM architected timer. It is used for waking up CPUs
323 executing the wfe instruction at a frequency represented as a
324 power-of-2 divisor of the clock rate. The behaviour can also be
325 overridden on the command line using the
326 clocksource.arm_arch_timer.evtstream parameter.
327 The main use of the event stream is wfe-based timeouts of userspace
328 locking implementations. It might also be useful for imposing timeout
329 on wfe to safeguard against any programming errors in case an expected
330 event is not generated.
331 This must be disabled for hardware validation purposes to detect any
332 hardware anomalies of missing events.
333
334config ARM_ARCH_TIMER_OOL_WORKAROUND
335 bool
336
337config FSL_ERRATUM_A008585
338 bool "Workaround for Freescale/NXP Erratum A-008585"
339 default y
340 depends on ARM_ARCH_TIMER && ARM64
341 select ARM_ARCH_TIMER_OOL_WORKAROUND
342 help
343 This option enables a workaround for Freescale/NXP Erratum
344 A-008585 ("ARM generic timer may contain an erroneous
345 value"). The workaround will only be active if the
346 fsl,erratum-a008585 property is found in the timer node.
347
348config HISILICON_ERRATUM_161010101
349 bool "Workaround for Hisilicon Erratum 161010101"
350 default y
351 select ARM_ARCH_TIMER_OOL_WORKAROUND
352 depends on ARM_ARCH_TIMER && ARM64
353 help
354 This option enables a workaround for Hisilicon Erratum
355 161010101. The workaround will be active if the hisilicon,erratum-161010101
356 property is found in the timer node.
357
358config ARM64_ERRATUM_858921
359 bool "Workaround for Cortex-A73 erratum 858921"
360 default y
361 select ARM_ARCH_TIMER_OOL_WORKAROUND
362 depends on ARM_ARCH_TIMER && ARM64
363 help
364 This option enables a workaround applicable to Cortex-A73
365 (all versions), whose counter may return incorrect values.
366 The workaround will be dynamically enabled when an affected
367 core is detected.
368
369config SUN50I_ERRATUM_UNKNOWN1
370 bool "Workaround for Allwinner A64 erratum UNKNOWN1"
371 default y
372 depends on ARM_ARCH_TIMER && ARM64 && ARCH_SUNXI
373 select ARM_ARCH_TIMER_OOL_WORKAROUND
374 help
375 This option enables a workaround for instability in the timer on
376 the Allwinner A64 SoC. The workaround will only be active if the
377 allwinner,erratum-unknown1 property is found in the timer node.
378
379config ARM_GLOBAL_TIMER
380 bool "Support for the ARM global timer" if COMPILE_TEST
381 select TIMER_OF if OF
382 depends on ARM
383 help
384 This options enables support for the ARM global timer unit
385
386config ARM_TIMER_SP804
387 bool "Support for Dual Timer SP804 module"
388 depends on GENERIC_SCHED_CLOCK && CLKDEV_LOOKUP
389 select CLKSRC_MMIO
390 select TIMER_OF if OF
391
392config CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
393 bool
394 depends on ARM_GLOBAL_TIMER
395 default y
396 help
397 Use ARM global timer clock source as sched_clock
398
399config ARMV7M_SYSTICK
400 bool "Support for the ARMv7M system time" if COMPILE_TEST
401 select TIMER_OF if OF
402 select CLKSRC_MMIO
403 help
404 This options enables support for the ARMv7M system timer unit
405
406config ATMEL_PIT
407 select TIMER_OF if OF
408 def_bool SOC_AT91SAM9 || SOC_SAMA5
409
410config ATMEL_ST
411 bool "Atmel ST timer support" if COMPILE_TEST
412 depends on HAS_IOMEM
413 select TIMER_OF
414 select MFD_SYSCON
415 help
416 Support for the Atmel ST timer.
417
418config CLKSRC_EXYNOS_MCT
419 bool "Exynos multi core timer driver" if COMPILE_TEST
420 depends on ARM || ARM64
421 help
422 Support for Multi Core Timer controller on Exynos SoCs.
423
424config CLKSRC_SAMSUNG_PWM
425 bool "PWM timer driver for Samsung S3C, S5P" if COMPILE_TEST
426 depends on HAS_IOMEM
427 help
428 This is a new clocksource driver for the PWM timer found in
429 Samsung S3C, S5P and Exynos SoCs, replacing an earlier driver
430 for all devicetree enabled platforms. This driver will be
431 needed only on systems that do not have the Exynos MCT available.
432
433config FSL_FTM_TIMER
434 bool "Freescale FlexTimer Module driver" if COMPILE_TEST
435 depends on HAS_IOMEM
436 select CLKSRC_MMIO
437 help
438 Support for Freescale FlexTimer Module (FTM) timer.
439
440config VF_PIT_TIMER
441 bool
442 select CLKSRC_MMIO
443 help
444 Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
445
446config OXNAS_RPS_TIMER
447 bool "Oxford Semiconductor OXNAS RPS Timers driver" if COMPILE_TEST
448 select TIMER_OF
449 select CLKSRC_MMIO
450 help
451 This enables support for the Oxford Semiconductor OXNAS RPS timers.
452
453config SYS_SUPPORTS_SH_CMT
454 bool
455
456config MTK_TIMER
457 bool "Mediatek timer driver" if COMPILE_TEST
458 depends on HAS_IOMEM
459 select TIMER_OF
460 select CLKSRC_MMIO
461 help
462 Support for Mediatek timer driver.
463
464config SPRD_TIMER
465 bool "Spreadtrum timer driver" if EXPERT
466 depends on HAS_IOMEM
467 depends on (ARCH_SPRD || COMPILE_TEST)
468 default ARCH_SPRD
469 select TIMER_OF
470 help
471 Enables support for the Spreadtrum timer driver.
472
473config SYS_SUPPORTS_SH_MTU2
474 bool
475
476config SYS_SUPPORTS_SH_TMU
477 bool
478
479config SYS_SUPPORTS_EM_STI
480 bool
481
482config CLKSRC_JCORE_PIT
483 bool "J-Core PIT timer driver" if COMPILE_TEST
484 depends on OF
485 depends on HAS_IOMEM
486 select CLKSRC_MMIO
487 help
488 This enables build of clocksource and clockevent driver for
489 the integrated PIT in the J-Core synthesizable, open source SoC.
490
491config SH_TIMER_CMT
492 bool "Renesas CMT timer driver" if COMPILE_TEST
493 depends on HAS_IOMEM
494 default SYS_SUPPORTS_SH_CMT
495 help
496 This enables build of a clocksource and clockevent driver for
497 the Compare Match Timer (CMT) hardware available in 16/32/48-bit
498 variants on a wide range of Mobile and Automotive SoCs from Renesas.
499
500config SH_TIMER_MTU2
501 bool "Renesas MTU2 timer driver" if COMPILE_TEST
502 depends on HAS_IOMEM
503 default SYS_SUPPORTS_SH_MTU2
504 help
505 This enables build of a clockevent driver for the Multi-Function
506 Timer Pulse Unit 2 (MTU2) hardware available on SoCs from Renesas.
507 This hardware comes with 16 bit-timer registers.
508
509config RENESAS_OSTM
510 bool "Renesas OSTM timer driver" if COMPILE_TEST
511 select CLKSRC_MMIO
512 help
513 Enables the support for the Renesas OSTM.
514
515config SH_TIMER_TMU
516 bool "Renesas TMU timer driver" if COMPILE_TEST
517 depends on HAS_IOMEM
518 default SYS_SUPPORTS_SH_TMU
519 help
520 This enables build of a clocksource and clockevent driver for
521 the 32-bit Timer Unit (TMU) hardware available on a wide range
522 SoCs from Renesas.
523
524config EM_TIMER_STI
525 bool "Renesas STI timer driver" if COMPILE_TEST
526 depends on HAS_IOMEM
527 default SYS_SUPPORTS_EM_STI
528 help
529 This enables build of a clocksource and clockevent driver for
530 the 48-bit System Timer (STI) hardware available on a SoCs
531 such as EMEV2 from former NEC Electronics.
532
533config CLKSRC_QCOM
534 bool "Qualcomm MSM timer" if COMPILE_TEST
535 depends on ARM
536 select TIMER_OF
537 help
538 This enables the clocksource and the per CPU clockevent driver for the
539 Qualcomm SoCs.
540
541config CLKSRC_VERSATILE
542 bool "ARM Versatile (Express) reference platforms clock source" if COMPILE_TEST
543 depends on GENERIC_SCHED_CLOCK && !ARCH_USES_GETTIMEOFFSET
544 select TIMER_OF
545 default y if MFD_VEXPRESS_SYSREG
546 help
547 This option enables clock source based on free running
548 counter available in the "System Registers" block of
549 ARM Versatile, RealView and Versatile Express reference
550 platforms.
551
552config CLKSRC_MIPS_GIC
553 bool
554 depends on MIPS_GIC
555 select TIMER_OF
556
557config CLKSRC_TANGO_XTAL
558 bool "Clocksource for Tango SoC" if COMPILE_TEST
559 depends on ARM
560 select TIMER_OF
561 select CLKSRC_MMIO
562 help
563 This enables the clocksource for Tango SoC
564
565config CLKSRC_PXA
566 bool "Clocksource for PXA or SA-11x0 platform" if COMPILE_TEST
567 depends on HAS_IOMEM
568 select CLKSRC_MMIO
569 help
570 This enables OST0 support available on PXA and SA-11x0
571 platforms.
572
573config H8300_TMR8
574 bool "Clockevent timer for the H8300 platform" if COMPILE_TEST
575 depends on HAS_IOMEM
576 help
577 This enables the 8 bits timer for the H8300 platform.
578
579config H8300_TMR16
580 bool "Clockevent timer for the H83069 platform" if COMPILE_TEST
581 depends on HAS_IOMEM
582 help
583 This enables the 16 bits timer for the H8300 platform with the
584 H83069 cpu.
585
586config H8300_TPU
587 bool "Clocksource for the H8300 platform" if COMPILE_TEST
588 depends on HAS_IOMEM
589 help
590 This enables the clocksource for the H8300 platform with the
591 H8S2678 cpu.
592
593config CLKSRC_IMX_GPT
594 bool "Clocksource using i.MX GPT" if COMPILE_TEST
595 depends on ARM && CLKDEV_LOOKUP
596 select CLKSRC_MMIO
597
598config CLKSRC_IMX_TPM
599 bool "Clocksource using i.MX TPM" if COMPILE_TEST
600 depends on ARM && CLKDEV_LOOKUP
601 select CLKSRC_MMIO
602 help
603 Enable this option to use IMX Timer/PWM Module (TPM) timer as
604 clocksource.
605
606config CLKSRC_ST_LPC
607 bool "Low power clocksource found in the LPC" if COMPILE_TEST
608 select TIMER_OF if OF
609 depends on HAS_IOMEM
610 select CLKSRC_MMIO
611 help
612 Enable this option to use the Low Power controller timer
613 as clocksource.
614
615config ATCPIT100_TIMER
616 bool "ATCPIT100 timer driver"
617 depends on NDS32 || COMPILE_TEST
618 depends on HAS_IOMEM
619 select TIMER_OF
620 default NDS32
621 help
622 This option enables support for the Andestech ATCPIT100 timers.
623
624config RISCV_TIMER
625 bool "Timer for the RISC-V platform"
626 depends on RISCV
627 default y
628 select TIMER_PROBE
629 select TIMER_OF
630 help
631 This enables the per-hart timer built into all RISC-V systems, which
632 is accessed via both the SBI and the rdcycle instruction. This is
633 required for all RISC-V systems.
634
635endmenu