Skip to content

Commit 749b61c

Browse files
committed
Merge tag 'timers-v6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/daniel.lezcano/linux into timers/clocksource
Pull clocksource/events driver updates from Daniel Lezcano: - Add the module owner to all the drivers which can be converted into modules in order to have the core time framework to take the refcount and prevent wild module removal. In addition export the symbols for the sched_clock_register() function to allow the drivers to be converted into modules (Daniel Lezcano) - Convert the faraday,fttmr010 DT bindings to yaml schema (Rob Herring) - Add the DT bindings compatible string for the MT6572 (Max Shevchenko) - Fix the fsl,ftm-timer bindings by using the items to describe a register (Frank Li) - Add the DT binding documentation for Andes machine timer (Ben Zong-You Xie) - Avoid 64-bit divide operation which fails on xtensa and simplify the timeleft computation with 32 bits operations on Tegra186 (Guenter Roeck) - Add the fsl,timrot.yaml DT bindings for i.MX23/i.MX28 timer (Frank Li) - Replace comma by semicolon which were introduced when moving the static structure initialization (Chen Ni) - Add a new compatible for the MediaTek MT8196 SoC, fully compatible with MT6765 (AngeloGioacchino Del Regno) - Add the support for the s32g2 and s32g3 platforms in the PIT timer after cleaning up the code to support multiple instances (Daniel Lezcano) - Generate platform devices for MMIO timers with ACPI and integrate it with the arch ARM timer (Marc Zyngier) - Fix RTL OTTO timer by working around dying timers (Markus Stockhausen) - Remove extra error message in the tegra186 timer (Wolfram Sang) - Convert from round_rate() to determine_rate() in the Ingenic sysost driver (Brian Masney) - Add PWM capture functionality in the OMAP DM driver (Gokul Praveen) - Autodetect the clock rate to initialize a prescaler value compatible with the frequency changes on the ARM global timer (Markus Schneider-Pargmann) - Fix rollbacks missing resource deallocation in case of error on the clps711x (Zhen Ni) - Reorganize the code to split the start and the stop routine on the sh_cmt driver (Niklas Söderlund) - Add the compatible definition for ARTPEC-9 on exynos MCT (SungMin Park)
2 parents 8f5ae30 + 45d78cd commit 749b61c

32 files changed

+1386
-957
lines changed

Documentation/devicetree/bindings/timer/faraday,fttmr010.txt

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/timer/faraday,fttmr010.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Faraday FTTMR010 timer
8+
9+
maintainers:
10+
- Joel Stanley <joel@jms.id.au>
11+
- Linus Walleij <linus.walleij@linaro.org>
12+
13+
description:
14+
This timer is a generic IP block from Faraday Technology, embedded in the
15+
Cortina Systems Gemini SoCs and other designs.
16+
17+
properties:
18+
compatible:
19+
oneOf:
20+
- items:
21+
- const: moxa,moxart-timer
22+
- const: faraday,fttmr010
23+
- enum:
24+
- aspeed,ast2400-timer
25+
- aspeed,ast2500-timer
26+
- aspeed,ast2600-timer
27+
- cortina,gemini-timer
28+
- faraday,fttmr010
29+
30+
reg:
31+
maxItems: 1
32+
33+
interrupts:
34+
minItems: 1
35+
maxItems: 8
36+
description: One interrupt per timer
37+
38+
clocks:
39+
minItems: 1
40+
items:
41+
- description: Peripheral clock
42+
- description: External tick clock
43+
44+
clock-names:
45+
minItems: 1
46+
items:
47+
- const: PCLK
48+
- const: EXTCLK
49+
50+
resets:
51+
maxItems: 1
52+
53+
syscon:
54+
description: System controller phandle for Gemini systems
55+
$ref: /schemas/types.yaml#/definitions/phandle
56+
57+
required:
58+
- compatible
59+
- reg
60+
- interrupts
61+
62+
allOf:
63+
- if:
64+
properties:
65+
compatible:
66+
contains:
67+
const: cortina,gemini-timer
68+
then:
69+
required:
70+
- syscon
71+
else:
72+
properties:
73+
syscon: false
74+
75+
additionalProperties: false
76+
77+
examples:
78+
- |
79+
#include <dt-bindings/interrupt-controller/irq.h>
80+
81+
timer@43000000 {
82+
compatible = "faraday,fttmr010";
83+
reg = <0x43000000 0x1000>;
84+
interrupts = <14 IRQ_TYPE_EDGE_FALLING>, /* Timer 1 */
85+
<15 IRQ_TYPE_EDGE_FALLING>, /* Timer 2 */
86+
<16 IRQ_TYPE_EDGE_FALLING>; /* Timer 3 */
87+
clocks = <&pclk>, <&extclk>;
88+
clock-names = "PCLK", "EXTCLK";
89+
};

Documentation/devicetree/bindings/timer/fsl,ftm-timer.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ properties:
1414
const: fsl,ftm-timer
1515

1616
reg:
17-
maxItems: 1
17+
items:
18+
- description: clock event device
19+
- description: clock source device
1820

1921
interrupts:
2022
maxItems: 1
@@ -50,7 +52,8 @@ examples:
5052
5153
ftm@400b8000 {
5254
compatible = "fsl,ftm-timer";
53-
reg = <0x400b8000 0x1000>;
55+
reg = <0x400b8000 0x1000>,
56+
<0x400b9000 0x1000>;
5457
interrupts = <0 44 IRQ_TYPE_LEVEL_HIGH>;
5558
clock-names = "ftm-evt", "ftm-src", "ftm-evt-counter-en", "ftm-src-counter-en";
5659
clocks = <&clks VF610_CLK_FTM2>, <&clks VF610_CLK_FTM3>,
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/timer/fsl,timrot.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Freescale MXS Timer
8+
9+
maintainers:
10+
- Frank Li <Frank.Li@nxp.com>
11+
12+
properties:
13+
compatible:
14+
items:
15+
- enum:
16+
- fsl,imx23-timrot
17+
- fsl,imx28-timrot
18+
- const: fsl,timrot
19+
20+
reg:
21+
maxItems: 1
22+
23+
interrupts:
24+
items:
25+
- description: irq for timer0
26+
- description: irq for timer1
27+
- description: irq for timer2
28+
- description: irq for timer3
29+
30+
clocks:
31+
maxItems: 1
32+
33+
required:
34+
- compatible
35+
- reg
36+
- interrupts
37+
- clocks
38+
39+
additionalProperties: false
40+
41+
examples:
42+
- |
43+
timer: timer@80068000 {
44+
compatible = "fsl,imx28-timrot", "fsl,timrot";
45+
reg = <0x80068000 0x2000>;
46+
interrupts = <48>, <49>, <50>, <51>;
47+
clocks = <&clks 26>;
48+
};

Documentation/devicetree/bindings/timer/fsl,vf610-pit.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ description:
1515

1616
properties:
1717
compatible:
18-
enum:
19-
- fsl,vf610-pit
18+
oneOf:
19+
- enum:
20+
- fsl,vf610-pit
21+
- nxp,s32g2-pit
22+
- items:
23+
- const: nxp,s32g3-pit
24+
- const: nxp,s32g2-pit
2025

2126
reg:
2227
maxItems: 1

Documentation/devicetree/bindings/timer/mediatek,timer.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ properties:
2626
- items:
2727
- enum:
2828
- mediatek,mt2701-timer
29+
- mediatek,mt6572-timer
2930
- mediatek,mt6580-timer
3031
- mediatek,mt6582-timer
3132
- mediatek,mt6589-timer
@@ -44,6 +45,7 @@ properties:
4445
- mediatek,mt8188-timer
4546
- mediatek,mt8192-timer
4647
- mediatek,mt8195-timer
48+
- mediatek,mt8196-timer
4749
- mediatek,mt8365-systimer
4850
- const: mediatek,mt6765-timer
4951

Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ properties:
2626
- items:
2727
- enum:
2828
- axis,artpec8-mct
29+
- axis,artpec9-mct
2930
- google,gs101-mct
3031
- samsung,exynos2200-mct-peris
3132
- samsung,exynos3250-mct
@@ -131,6 +132,7 @@ allOf:
131132
contains:
132133
enum:
133134
- axis,artpec8-mct
135+
- axis,artpec9-mct
134136
- google,gs101-mct
135137
- samsung,exynos2200-mct-peris
136138
- samsung,exynos5260-mct

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1990,6 +1990,7 @@ S: Maintained
19901990
F: arch/arm/include/asm/arch_timer.h
19911991
F: arch/arm64/include/asm/arch_timer.h
19921992
F: drivers/clocksource/arm_arch_timer.c
1993+
F: drivers/clocksource/arm_arch_timer_mmio.c
19931994

19941995
ARM GENERIC INTERRUPT CONTROLLER DRIVERS
19951996
M: Marc Zyngier <maz@kernel.org>

drivers/acpi/arm64/gtdt.c

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,11 +388,11 @@ static int __init gtdt_import_sbsa_gwdt(struct acpi_gtdt_watchdog *wd,
388388
return 0;
389389
}
390390

391-
static int __init gtdt_sbsa_gwdt_init(void)
391+
static int __init gtdt_platform_timer_init(void)
392392
{
393393
void *platform_timer;
394394
struct acpi_table_header *table;
395-
int ret, timer_count, gwdt_count = 0;
395+
int ret, timer_count, gwdt_count = 0, mmio_timer_count = 0;
396396

397397
if (acpi_disabled)
398398
return 0;
@@ -414,20 +414,41 @@ static int __init gtdt_sbsa_gwdt_init(void)
414414
goto out_put_gtdt;
415415

416416
for_each_platform_timer(platform_timer) {
417+
ret = 0;
418+
417419
if (is_non_secure_watchdog(platform_timer)) {
418420
ret = gtdt_import_sbsa_gwdt(platform_timer, gwdt_count);
419421
if (ret)
420-
break;
422+
continue;
421423
gwdt_count++;
424+
} else if (is_timer_block(platform_timer)) {
425+
struct arch_timer_mem atm = {};
426+
struct platform_device *pdev;
427+
428+
ret = gtdt_parse_timer_block(platform_timer, &atm);
429+
if (ret)
430+
continue;
431+
432+
pdev = platform_device_register_data(NULL, "gtdt-arm-mmio-timer",
433+
gwdt_count, &atm,
434+
sizeof(atm));
435+
if (IS_ERR(pdev)) {
436+
pr_err("Can't register timer %d\n", gwdt_count);
437+
continue;
438+
}
439+
440+
mmio_timer_count++;
422441
}
423442
}
424443

425444
if (gwdt_count)
426445
pr_info("found %d SBSA generic Watchdog(s).\n", gwdt_count);
446+
if (mmio_timer_count)
447+
pr_info("found %d Generic MMIO timer(s).\n", mmio_timer_count);
427448

428449
out_put_gtdt:
429450
acpi_put_table(table);
430451
return ret;
431452
}
432453

433-
device_initcall(gtdt_sbsa_gwdt_init);
454+
device_initcall(gtdt_platform_timer_init);

drivers/clocksource/Kconfig

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,7 @@ config ARM_GLOBAL_TIMER
395395

396396
config ARM_GT_INITIAL_PRESCALER_VAL
397397
int "ARM global timer initial prescaler value"
398-
default 2 if ARCH_ZYNQ
399-
default 1
398+
default 0
400399
depends on ARM_GLOBAL_TIMER
401400
help
402401
When the ARM global timer initializes, its current rate is declared
@@ -406,6 +405,7 @@ config ARM_GT_INITIAL_PRESCALER_VAL
406405
bounds about how much the parent clock is allowed to decrease or
407406
increase wrt the initial clock value.
408407
This affects CPU_FREQ max delta from the initial frequency.
408+
Use 0 to use auto-detection in the driver.
409409

410410
config ARM_TIMER_SP804
411411
bool "Support for Dual Timer SP804 module"
@@ -474,11 +474,14 @@ config FSL_FTM_TIMER
474474
help
475475
Support for Freescale FlexTimer Module (FTM) timer.
476476

477-
config VF_PIT_TIMER
478-
bool
477+
config NXP_PIT_TIMER
478+
bool "NXP Periodic Interrupt Timer" if COMPILE_TEST
479479
select CLKSRC_MMIO
480480
help
481-
Support for Periodic Interrupt Timer on Freescale Vybrid Family SoCs.
481+
Support for Periodic Interrupt Timer on Freescale / NXP
482+
SoCs. This periodic timer is found on the Vybrid Family and
483+
the Automotive S32G2/3 platforms. It contains 4 channels
484+
where two can be coupled to form a 64 bits channel.
482485

483486
config SYS_SUPPORTS_SH_CMT
484487
bool

0 commit comments

Comments
 (0)