Skip to content

Commit dabc4df

Browse files
committed
Merge tag 'timers-core-2020-06-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer updates from Thomas Gleixner: "The truly boring timer and clocksource updates for 5.8: - Not a single new clocksource or clockevent driver! - Device tree updates for various chips - Fixes and improvements and cleanups all over the place" * tag 'timers-core-2020-06-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits) dt-bindings: timer: Add renesas,em-sti bindings clocksource/drivers/timer-versatile: Clear OF_POPULATED flag clocksource: mips-gic-timer: Mark GIC timer as unstable if ref clock changes clocksource: mips-gic-timer: Register as sched_clock clocksource: dw_apb_timer_of: Fix missing clockevent timers clocksource: dw_apb_timer: Affiliate of-based timer with any CPU clocksource: dw_apb_timer: Make CPU-affiliation being optional dt-bindings: timer: Move snps,dw-apb-timer DT schema from rtc dt-bindings: rtc: Convert snps,dw-apb-timer to DT schema clocksource/drivers/timer-ti-dm: Do one override clock parent in prepare() clocksource/drivers/timer-ti-dm: Fix spelling mistake "detectt" -> "detect" clocksource/drivers/timer-ti-dm: Fix warning for set but not used clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support clocksource/drivers/timer-ti-32k: Add support for initializing directly drivers/clocksource/arm_arch_timer: Remove duplicate error message clocksource/drivers/arc_timer: Remove duplicate error message clocksource/drivers/rda: drop redundant Kconfig dependency clocksource/drivers/timer-ti-dm: Fix warning for set but not used clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support clocksource/drivers/timer-ti-32k: Add support for initializing directly ...
2 parents f6606d0 + 809eb4e commit dabc4df

21 files changed

+992
-75
lines changed

Documentation/devicetree/bindings/rtc/dw-apb.txt

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/timer/renesas,em-sti.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Renesas EMMA Mobile System Timer
8+
9+
maintainers:
10+
- Magnus Damm <[email protected]>
11+
12+
properties:
13+
compatible:
14+
const: renesas,em-sti
15+
16+
reg:
17+
maxItems: 1
18+
19+
interrupts:
20+
maxItems: 1
21+
22+
clocks:
23+
maxItems: 1
24+
25+
clock-names:
26+
const: sclk
27+
28+
required:
29+
- compatible
30+
- reg
31+
- interrupts
32+
- clocks
33+
- clock-names
34+
35+
additionalProperties: false
36+
37+
examples:
38+
- |
39+
#include <dt-bindings/interrupt-controller/arm-gic.h>
40+
timer@e0180000 {
41+
compatible = "renesas,em-sti";
42+
reg = <0xe0180000 0x54>;
43+
interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
44+
clocks = <&sti_sclk>;
45+
clock-names = "sclk";
46+
};
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/timer/snps,dw-apb-timer.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Synopsys DesignWare APB Timer
8+
9+
maintainers:
10+
- Daniel Lezcano <[email protected]>
11+
12+
properties:
13+
compatible:
14+
oneOf:
15+
- const: snps,dw-apb-timer
16+
- enum:
17+
- snps,dw-apb-timer-sp
18+
- snps,dw-apb-timer-osc
19+
deprecated: true
20+
21+
reg:
22+
maxItems: 1
23+
24+
interrupts:
25+
maxItems: 1
26+
27+
clocks:
28+
minItems: 1
29+
items:
30+
- description: Timer ticks reference clock source
31+
- description: APB interface clock source
32+
33+
clock-names:
34+
minItems: 1
35+
items:
36+
- const: timer
37+
- const: pclk
38+
39+
clock-frequency: true
40+
41+
clock-freq:
42+
$ref: "/schemas/types.yaml#/definitions/uint32"
43+
description: |
44+
Has the same meaning as the 'clock-frequency' property - timer clock
45+
frequency in HZ, but is defined only for the backwards compatibility
46+
with the picoxcell platform.
47+
48+
unevaluatedProperties: false
49+
50+
required:
51+
- compatible
52+
- reg
53+
- interrupts
54+
55+
oneOf:
56+
- required:
57+
- clocks
58+
- clock-names
59+
- required:
60+
- clock-frequency
61+
- required:
62+
- clock-freq
63+
64+
examples:
65+
- |
66+
timer@ffe00000 {
67+
compatible = "snps,dw-apb-timer";
68+
interrupts = <0 170 4>;
69+
reg = <0xffe00000 0x1000>;
70+
clocks = <&timer_clk>, <&timer_pclk>;
71+
clock-names = "timer", "pclk";
72+
};
73+
- |
74+
timer@ffe00000 {
75+
compatible = "snps,dw-apb-timer";
76+
interrupts = <0 170 4>;
77+
reg = <0xffe00000 0x1000>;
78+
clocks = <&timer_clk>;
79+
clock-names = "timer";
80+
};
81+
- |
82+
timer@ffe00000 {
83+
compatible = "snps,dw-apb-timer";
84+
interrupts = <0 170 4>;
85+
reg = <0xffe00000 0x1000>;
86+
clock-frequency = <25000000>;
87+
};
88+
...

arch/arm/boot/dts/am335x-guardian.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
ti,timers = <&timer7>;
106106
pinctrl-names = "default";
107107
pinctrl-0 = <&dmtimer7_pins>;
108+
ti,clock-source = <0x01>;
108109
};
109110

110111
vmmcsd_fixed: regulator-3v3 {

arch/arm/boot/dts/am3517-evm.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@
156156
pinctrl-0 = <&pwm_pins>;
157157
ti,timers = <&timer11>;
158158
#pwm-cells = <3>;
159+
ti,clock-source = <0x01>;
159160
};
160161

161162
/* HS USB Host PHY on PORT 1 */

arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
pinctrl-0 = <&pwm_pins>;
6666
ti,timers = <&timer10>;
6767
#pwm-cells = <3>;
68+
ti,clock-source = <0x01>;
6869
};
6970

7071
};

arch/arm/boot/dts/omap3-gta04.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
compatible = "ti,omap-dmtimer-pwm";
151151
ti,timers = <&timer11>;
152152
#pwm-cells = <3>;
153+
ti,clock-source = <0x01>;
153154
};
154155

155156
hsusb2_phy: hsusb2_phy {

drivers/clocksource/Kconfig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ config OWL_TIMER
120120

121121
config RDA_TIMER
122122
bool "RDA timer driver" if COMPILE_TEST
123-
depends on GENERIC_CLOCKEVENTS
124123
select CLKSRC_MMIO
125124
select TIMER_OF
126125
help
@@ -562,16 +561,16 @@ config CLKSRC_VERSATILE
562561
bool "ARM Versatile (Express) reference platforms clock source" if COMPILE_TEST
563562
depends on GENERIC_SCHED_CLOCK && !ARCH_USES_GETTIMEOFFSET
564563
select TIMER_OF
565-
default y if MFD_VEXPRESS_SYSREG
564+
default y if (ARCH_VEXPRESS || ARCH_VERSATILE) && ARM
566565
help
567566
This option enables clock source based on free running
568567
counter available in the "System Registers" block of
569-
ARM Versatile, RealView and Versatile Express reference
570-
platforms.
568+
ARM Versatile and Versatile Express reference platforms.
571569

572570
config CLKSRC_MIPS_GIC
573571
bool
574572
depends on MIPS_GIC
573+
select CLOCKSOURCE_WATCHDOG
575574
select TIMER_OF
576575

577576
config CLKSRC_TANGO_XTAL
@@ -709,6 +708,7 @@ config MICROCHIP_PIT64B
709708
bool "Microchip PIT64B support"
710709
depends on OF || COMPILE_TEST
711710
select CLKSRC_MMIO
711+
select TIMER_OF
712712
help
713713
This option enables Microchip PIT64B timer for Atmel
714714
based system. It supports the oneshot, the periodic

drivers/clocksource/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ obj-$(CONFIG_CLKSRC_MMIO) += mmio.o
1818
obj-$(CONFIG_DAVINCI_TIMER) += timer-davinci.o
1919
obj-$(CONFIG_DIGICOLOR_TIMER) += timer-digicolor.o
2020
obj-$(CONFIG_OMAP_DM_TIMER) += timer-ti-dm.o
21+
obj-$(CONFIG_OMAP_DM_TIMER) += timer-ti-dm-systimer.o
2122
obj-$(CONFIG_DW_APB_TIMER) += dw_apb_timer.o
2223
obj-$(CONFIG_DW_APB_TIMER_OF) += dw_apb_timer_of.o
2324
obj-$(CONFIG_FTTMR010_TIMER) += timer-fttmr010.o

drivers/clocksource/arc_timer.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,8 @@ static int __init arc_clockevent_setup(struct device_node *node)
334334
}
335335

336336
ret = arc_get_timer_clk(node);
337-
if (ret) {
338-
pr_err("clockevent: missing clk\n");
337+
if (ret)
339338
return ret;
340-
}
341339

342340
/* Needs apriori irq_set_percpu_devid() done in intc map function */
343341
ret = request_percpu_irq(arc_timer_irq, timer_irq_handler,

0 commit comments

Comments
 (0)