Skip to content

Commit a67ca89

Browse files
committed
Merge tag 'timers-v5.5-rc6' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core
Pull clocksource/events driver updates from Daniel Lezcano - Add suspend/resume for Hyper-V clocksource (Dexuan Cui) - Fix Kconfig indentation (Krzysztof Kozlowski) - Add SoC specific bindings for RZ/G2N (r8a774b1) (Biju Das) - Add Microchip PIT64B support (Claudiu Beznea) - Convert the cadence ttc driver to a platform driver to initialize later (Rajan Vaja) - Fix a memory leak when the initialization fails on bcm2835 (Colin Ian King) - Use the combo devm_platform_ioremap_resource() function for em-sti, ti-dm and switch to platform_get_irq (Yangtao Li) - Fix Exynos naming in the driver (Krzysztof Kozlowski) - Fix an uninitialized pointer access in ti-dm timer (Tony Lindgren) - Fix a sparse warning in microchip-pit64b (Claudiu Beznea) - Code reorg without functional changes for Hyper-V clocksource (Andrea Parri) - Decrease the Hyper-V clocksource rating in order to let the stable TSC to be selected instead (Andrea Parri)
2 parents 49a101d + 9e0333a commit a67ca89

File tree

13 files changed

+603
-87
lines changed

13 files changed

+603
-87
lines changed

Documentation/devicetree/bindings/arm/atmel-sysregs.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ PIT Timer required properties:
1010
- interrupts: Should contain interrupt for the PIT which is the IRQ line
1111
shared across all System Controller members.
1212

13+
PIT64B Timer required properties:
14+
- compatible: Should be "microchip,sam9x60-pit64b"
15+
- reg: Should contain registers location and length
16+
- interrupts: Should contain interrupt for PIT64B timer
17+
- clocks: Should contain the available clock sources for PIT64B timer.
18+
1319
System Timer (ST) required properties:
1420
- compatible: Should be "atmel,at91rm9200-st", "syscon", "simple-mfd"
1521
- reg: Should contain registers location and length

Documentation/devicetree/bindings/timer/renesas,cmt.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ Required Properties:
2929
- "renesas,r8a77470-cmt1" for the 48-bit CMT1 device included in r8a77470.
3030
- "renesas,r8a774a1-cmt0" for the 32-bit CMT0 device included in r8a774a1.
3131
- "renesas,r8a774a1-cmt1" for the 48-bit CMT devices included in r8a774a1.
32+
- "renesas,r8a774b1-cmt0" for the 32-bit CMT0 device included in r8a774b1.
33+
- "renesas,r8a774b1-cmt1" for the 48-bit CMT devices included in r8a774b1.
3234
- "renesas,r8a774c0-cmt0" for the 32-bit CMT0 device included in r8a774c0.
3335
- "renesas,r8a774c0-cmt1" for the 48-bit CMT devices included in r8a774c0.
3436
- "renesas,r8a7790-cmt0" for the 32-bit CMT0 device included in r8a7790.

drivers/clocksource/Kconfig

Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ config ROCKCHIP_TIMER
8888
select TIMER_OF
8989
select CLKSRC_MMIO
9090
help
91-
Enables the support for the rockchip timer driver.
91+
Enables the support for the Rockchip timer driver.
9292

9393
config ARMADA_370_XP_TIMER
9494
bool "Armada 370 and XP timer driver" if COMPILE_TEST
@@ -162,13 +162,13 @@ config NPCM7XX_TIMER
162162
select CLKSRC_MMIO
163163
help
164164
Enable 24-bit TIMER0 and TIMER1 counters in the NPCM7xx architecture,
165-
While TIMER0 serves as clockevent and TIMER1 serves as clocksource.
165+
where TIMER0 serves as clockevent and TIMER1 serves as clocksource.
166166

167167
config CADENCE_TTC_TIMER
168168
bool "Cadence TTC timer driver" if COMPILE_TEST
169169
depends on COMMON_CLK
170170
help
171-
Enables support for the cadence ttc driver.
171+
Enables support for the Cadence TTC driver.
172172

173173
config ASM9260_TIMER
174174
bool "ASM9260 timer driver" if COMPILE_TEST
@@ -190,10 +190,10 @@ config CLKSRC_DBX500_PRCMU
190190
bool "Clocksource PRCMU Timer" if COMPILE_TEST
191191
depends on HAS_IOMEM
192192
help
193-
Use the always on PRCMU Timer as clocksource
193+
Use the always on PRCMU Timer as clocksource.
194194

195195
config CLPS711X_TIMER
196-
bool "Cirrus logic timer driver" if COMPILE_TEST
196+
bool "Cirrus Logic timer driver" if COMPILE_TEST
197197
select CLKSRC_MMIO
198198
help
199199
Enables support for the Cirrus Logic PS711 timer.
@@ -205,11 +205,11 @@ config ATLAS7_TIMER
205205
Enables support for the Atlas7 timer.
206206

207207
config MXS_TIMER
208-
bool "Mxs timer driver" if COMPILE_TEST
208+
bool "MXS timer driver" if COMPILE_TEST
209209
select CLKSRC_MMIO
210210
select STMP_DEVICE
211211
help
212-
Enables support for the Mxs timer.
212+
Enables support for the MXS timer.
213213

214214
config PRIMA2_TIMER
215215
bool "Prima2 timer driver" if COMPILE_TEST
@@ -238,10 +238,10 @@ config KEYSTONE_TIMER
238238
Enables support for the Keystone timer.
239239

240240
config INTEGRATOR_AP_TIMER
241-
bool "Integrator-ap timer driver" if COMPILE_TEST
241+
bool "Integrator-AP timer driver" if COMPILE_TEST
242242
select CLKSRC_MMIO
243243
help
244-
Enables support for the Integrator-ap timer.
244+
Enables support for the Integrator-AP timer.
245245

246246
config CLKSRC_EFM32
247247
bool "Clocksource for Energy Micro's EFM32 SoCs" if !ARCH_EFM32
@@ -283,8 +283,8 @@ config CLKSRC_NPS
283283
select TIMER_OF if OF
284284
help
285285
NPS400 clocksource support.
286-
Got 64 bit counter with update rate up to 1000MHz.
287-
This counter is accessed via couple of 32 bit memory mapped registers.
286+
It has a 64-bit counter with update rate up to 1000MHz.
287+
This counter is accessed via couple of 32-bit memory-mapped registers.
288288

289289
config CLKSRC_STM32
290290
bool "Clocksource for STM32 SoCs" if !ARCH_STM32
@@ -305,14 +305,14 @@ config ARC_TIMERS
305305
help
306306
These are legacy 32-bit TIMER0 and TIMER1 counters found on all ARC cores
307307
(ARC700 as well as ARC HS38).
308-
TIMER0 serves as clockevent while TIMER1 provides clocksource
308+
TIMER0 serves as clockevent while TIMER1 provides clocksource.
309309

310310
config ARC_TIMERS_64BIT
311311
bool "Support for 64-bit counters in ARC HS38 cores" if COMPILE_TEST
312312
depends on ARC_TIMERS
313313
select TIMER_OF
314314
help
315-
This enables 2 different 64-bit timers: RTC (for UP) and GFRC (for SMP)
315+
This enables 2 different 64-bit timers: RTC (for UP) and GFRC (for SMP).
316316
RTC is implemented inside the core, while GFRC sits outside the core in
317317
ARConnect IP block. Driver automatically picks one of them for clocksource
318318
as appropriate.
@@ -390,7 +390,7 @@ config ARM_GLOBAL_TIMER
390390
select TIMER_OF if OF
391391
depends on ARM
392392
help
393-
This options enables support for the ARM global timer unit
393+
This option enables support for the ARM global timer unit.
394394

395395
config ARM_TIMER_SP804
396396
bool "Support for Dual Timer SP804 module" if COMPILE_TEST
@@ -403,14 +403,14 @@ config CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
403403
depends on ARM_GLOBAL_TIMER
404404
default y
405405
help
406-
Use ARM global timer clock source as sched_clock
406+
Use ARM global timer clock source as sched_clock.
407407

408408
config ARMV7M_SYSTICK
409409
bool "Support for the ARMv7M system time" if COMPILE_TEST
410410
select TIMER_OF if OF
411411
select CLKSRC_MMIO
412412
help
413-
This options enables support for the ARMv7M system timer unit
413+
This option enables support for the ARMv7M system timer unit.
414414

415415
config ATMEL_PIT
416416
bool "Atmel PIT support" if COMPILE_TEST
@@ -460,7 +460,7 @@ config VF_PIT_TIMER
460460
bool
461461
select CLKSRC_MMIO
462462
help
463-
Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
463+
Support for Periodic Interrupt Timer on Freescale Vybrid Family SoCs.
464464

465465
config OXNAS_RPS_TIMER
466466
bool "Oxford Semiconductor OXNAS RPS Timers driver" if COMPILE_TEST
@@ -470,7 +470,7 @@ config OXNAS_RPS_TIMER
470470
This enables support for the Oxford Semiconductor OXNAS RPS timers.
471471

472472
config SYS_SUPPORTS_SH_CMT
473-
bool
473+
bool
474474

475475
config MTK_TIMER
476476
bool "Mediatek timer driver" if COMPILE_TEST
@@ -490,13 +490,13 @@ config SPRD_TIMER
490490
Enables support for the Spreadtrum timer driver.
491491

492492
config SYS_SUPPORTS_SH_MTU2
493-
bool
493+
bool
494494

495495
config SYS_SUPPORTS_SH_TMU
496-
bool
496+
bool
497497

498498
config SYS_SUPPORTS_EM_STI
499-
bool
499+
bool
500500

501501
config CLKSRC_JCORE_PIT
502502
bool "J-Core PIT timer driver" if COMPILE_TEST
@@ -523,7 +523,7 @@ config SH_TIMER_MTU2
523523
help
524524
This enables build of a clockevent driver for the Multi-Function
525525
Timer Pulse Unit 2 (MTU2) hardware available on SoCs from Renesas.
526-
This hardware comes with 16 bit-timer registers.
526+
This hardware comes with 16-bit timer registers.
527527

528528
config RENESAS_OSTM
529529
bool "Renesas OSTM timer driver" if COMPILE_TEST
@@ -580,7 +580,7 @@ config CLKSRC_TANGO_XTAL
580580
select TIMER_OF
581581
select CLKSRC_MMIO
582582
help
583-
This enables the clocksource for Tango SoC
583+
This enables the clocksource for Tango SoC.
584584

585585
config CLKSRC_PXA
586586
bool "Clocksource for PXA or SA-11x0 platform" if COMPILE_TEST
@@ -591,24 +591,24 @@ config CLKSRC_PXA
591591
platforms.
592592

593593
config H8300_TMR8
594-
bool "Clockevent timer for the H8300 platform" if COMPILE_TEST
595-
depends on HAS_IOMEM
594+
bool "Clockevent timer for the H8300 platform" if COMPILE_TEST
595+
depends on HAS_IOMEM
596596
help
597597
This enables the 8 bits timer for the H8300 platform.
598598

599599
config H8300_TMR16
600-
bool "Clockevent timer for the H83069 platform" if COMPILE_TEST
601-
depends on HAS_IOMEM
600+
bool "Clockevent timer for the H83069 platform" if COMPILE_TEST
601+
depends on HAS_IOMEM
602602
help
603603
This enables the 16 bits timer for the H8300 platform with the
604-
H83069 cpu.
604+
H83069 CPU.
605605

606606
config H8300_TPU
607-
bool "Clocksource for the H8300 platform" if COMPILE_TEST
608-
depends on HAS_IOMEM
607+
bool "Clocksource for the H8300 platform" if COMPILE_TEST
608+
depends on HAS_IOMEM
609609
help
610610
This enables the clocksource for the H8300 platform with the
611-
H8S2678 cpu.
611+
H8S2678 CPU.
612612

613613
config CLKSRC_IMX_GPT
614614
bool "Clocksource using i.MX GPT" if COMPILE_TEST
@@ -666,8 +666,8 @@ config CSKY_MP_TIMER
666666
help
667667
Say yes here to enable C-SKY SMP timer driver used for C-SKY SMP
668668
system.
669-
csky,mptimer is not only used in SMP system, it also could be used
670-
single core system. It's not a mmio reg and it use mtcr/mfcr instruction.
669+
csky,mptimer is not only used in SMP system, it also could be used in
670+
single core system. It's not a mmio reg and it uses mtcr/mfcr instruction.
671671

672672
config GX6605S_TIMER
673673
bool "Gx6605s SOC system timer driver" if COMPILE_TEST
@@ -697,4 +697,14 @@ config INGENIC_TIMER
697697
help
698698
Support for the timer/counter unit of the Ingenic JZ SoCs.
699699

700+
config MICROCHIP_PIT64B
701+
bool "Microchip PIT64B support"
702+
depends on OF || COMPILE_TEST
703+
select CLKSRC_MMIO
704+
help
705+
This option enables Microchip PIT64B timer for Atmel
706+
based system. It supports the oneshot, the periodic
707+
modes and high resolution. It is used as a clocksource
708+
and a clockevent.
709+
700710
endmenu

drivers/clocksource/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,4 @@ obj-$(CONFIG_RISCV_TIMER) += timer-riscv.o
8888
obj-$(CONFIG_CSKY_MP_TIMER) += timer-mp-csky.o
8989
obj-$(CONFIG_GX6605S_TIMER) += timer-gx6605s.o
9090
obj-$(CONFIG_HYPERV_TIMER) += hyperv_timer.o
91+
obj-$(CONFIG_MICROCHIP_PIT64B) += timer-microchip-pit64b.o

drivers/clocksource/bcm2835_timer.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static int __init bcm2835_timer_init(struct device_node *node)
121121
ret = setup_irq(irq, &timer->act);
122122
if (ret) {
123123
pr_err("Can't set up timer IRQ\n");
124-
goto err_iounmap;
124+
goto err_timer_free;
125125
}
126126

127127
clockevents_config_and_register(&timer->evt, freq, 0xf, 0xffffffff);
@@ -130,6 +130,9 @@ static int __init bcm2835_timer_init(struct device_node *node)
130130

131131
return 0;
132132

133+
err_timer_free:
134+
kfree(timer);
135+
133136
err_iounmap:
134137
iounmap(base);
135138
return ret;

drivers/clocksource/em_sti.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,7 @@ static void em_sti_register_clockevent(struct em_sti_priv *p)
279279
static int em_sti_probe(struct platform_device *pdev)
280280
{
281281
struct em_sti_priv *p;
282-
struct resource *res;
283-
int irq;
284-
int ret;
282+
int irq, ret;
285283

286284
p = devm_kzalloc(&pdev->dev, sizeof(*p), GFP_KERNEL);
287285
if (p == NULL)
@@ -295,8 +293,7 @@ static int em_sti_probe(struct platform_device *pdev)
295293
return irq;
296294

297295
/* map memory, let base point to the STI instance */
298-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
299-
p->base = devm_ioremap_resource(&pdev->dev, res);
296+
p->base = devm_platform_ioremap_resource(pdev, 0);
300297
if (IS_ERR(p->base))
301298
return PTR_ERR(p->base);
302299

drivers/clocksource/exynos_mct.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Copyright (c) 2011 Samsung Electronics Co., Ltd.
55
* http://www.samsung.com
66
*
7-
* EXYNOS4 MCT(Multi-Core Timer) support
7+
* Exynos4 MCT(Multi-Core Timer) support
88
*/
99

1010
#include <linux/interrupt.h>

0 commit comments

Comments
 (0)