Skip to content

Commit 82e627e

Browse files
committed
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next
Pull timer core updates from Thomas Gleixner: "This time you get nothing really exciting: - A huge update to the sh* clocksource drivers - Support for two more ARM SoCs - Removal of the deprecated setup_sched_clock() API - The usual pile of fixlets all over the place" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits) clocksource: Add Freescale FlexTimer Module (FTM) timer support ARM: dts: vf610: Add Freescale FlexTimer Module timer node. clocksource: ftm: Add FlexTimer Module (FTM) Timer devicetree Documentation clocksource: sh_tmu: Remove unnecessary OOM messages clocksource: sh_mtu2: Remove unnecessary OOM messages clocksource: sh_cmt: Remove unnecessary OOM messages clocksource: em_sti: Remove unnecessary OOM messages clocksource: dw_apb_timer_of: Do not trace read_sched_clock clocksource: Fix clocksource_mmio_readX_down clocksource: Fix type confusion for clocksource_mmio_readX_Y clocksource: sh_tmu: Fix channel IRQ retrieval in legacy case clocksource: qcom: Implement read_current_timer for udelay ntp: Make is_error_status() use its argument ntp: Convert simple_strtol to kstrtol timer_stats/doc: Fix /proc/timer_stats documentation sched_clock: Remove deprecated setup_sched_clock() API ARM: sun6i: a31: Add support for the High Speed Timers clocksource: sun5i: Add support for reset controller clocksource: efm32: use $vendor,$device scheme for compatible string KConfig: Vexpress: build the ARM_GLOBAL_TIMER with vexpress platform ...
2 parents f1a7cd0 + 331b483 commit 82e627e

25 files changed

Lines changed: 496 additions & 50 deletions

‎Documentation/devicetree/bindings/arm/global_timer.txt‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44

55
** Timer node required properties:
66

7-
- compatible : Should be "arm,cortex-a9-global-timer"
8-
Driver supports versions r2p0 and above.
7+
- compatible : should contain
8+
* "arm,cortex-a5-global-timer" for Cortex-A5 global timers.
9+
* "arm,cortex-a9-global-timer" for Cortex-A9 global
10+
timers or any compatible implementation. Note: driver
11+
supports versions r2p0 and above.
912

1013
- interrupts : One interrupt to each core
1114

‎Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ Required properties:
99
one)
1010
- clocks: phandle to the source clock (usually the AHB clock)
1111

12+
Optionnal properties:
13+
- resets: phandle to a reset controller asserting the timer
14+
1215
Example:
1316

1417
timer@01c60000 {
@@ -19,4 +22,5 @@ timer@01c60000 {
1922
<0 53 1>,
2023
<0 54 1>;
2124
clocks = <&ahb1_gates 19>;
25+
resets = <&ahb1rst 19>;
2226
};

Documentation/devicetree/bindings/timer/efm32,timer.txt renamed to Documentation/devicetree/bindings/timer/energymicro,efm32-timer.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ channels and can be used as PWM or Quadrature Decoder. Available clock sources
66
are the cpu's HFPERCLK (with a 10-bit prescaler) or an external pin.
77

88
Required properties:
9-
- compatible : Should be efm32,timer
9+
- compatible : Should be "energymicro,efm32-timer"
1010
- reg : Address and length of the register set
1111
- clocks : Should contain a reference to the HFPERCLK
1212

@@ -16,7 +16,7 @@ Optional properties:
1616
Example:
1717

1818
timer@40010c00 {
19-
compatible = "efm32,timer";
19+
compatible = "energymicro,efm32-timer";
2020
reg = <0x40010c00 0x400>;
2121
interrupts = <14>;
2222
clocks = <&cmu clk_HFPERCLKTIMER3>;
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Freescale FlexTimer Module (FTM) Timer
2+
3+
Required properties:
4+
5+
- compatible : should be "fsl,ftm-timer"
6+
- reg : Specifies base physical address and size of the register sets for the
7+
clock event device and clock source device.
8+
- interrupts : Should be the clock event device interrupt.
9+
- clocks : The clocks provided by the SoC to drive the timer, must contain an
10+
entry for each entry in clock-names.
11+
- clock-names : Must include the following entries:
12+
o "ftm-evt"
13+
o "ftm-src"
14+
o "ftm-evt-counter-en"
15+
o "ftm-src-counter-en"
16+
- big-endian: One boolean property, the big endian mode will be in use if it is
17+
present, or the little endian mode will be in use for all the device registers.
18+
19+
Example:
20+
ftm: ftm@400b8000 {
21+
compatible = "fsl,ftm-timer";
22+
reg = <0x400b8000 0x1000 0x400b9000 0x1000>;
23+
interrupts = <0 44 IRQ_TYPE_LEVEL_HIGH>;
24+
clock-names = "ftm-evt", "ftm-src",
25+
"ftm-evt-counter-en", "ftm-src-counter-en";
26+
clocks = <&clks VF610_CLK_FTM2>,
27+
<&clks VF610_CLK_FTM3>,
28+
<&clks VF610_CLK_FTM2_EXT_FIX_EN>,
29+
<&clks VF610_CLK_FTM3_EXT_FIX_EN>;
30+
big-endian;
31+
};

‎Documentation/timers/timer_stats.txt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ To stop a sample period issue:
3939
The statistics can be retrieved by:
4040
# cat /proc/timer_stats
4141

42-
The readout of /proc/timer_stats automatically disables sampling. The sampled
43-
information is kept until a new sample period is started. This allows multiple
44-
readouts.
42+
While sampling is enabled, each readout from /proc/timer_stats will see
43+
newly updated statistics. Once sampling is disabled, the sampled information
44+
is kept until a new sample period is started. This allows multiple readouts.
4545

4646
Sample output of /proc/timer_stats:
4747

‎arch/arm/boot/dts/sun6i-a31.dtsi‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,17 @@
621621
status = "disabled";
622622
};
623623

624+
timer@01c60000 {
625+
compatible = "allwinner,sun6i-a31-hstimer", "allwinner,sun7i-a20-hstimer";
626+
reg = <0x01c60000 0x1000>;
627+
interrupts = <0 51 4>,
628+
<0 52 4>,
629+
<0 53 4>,
630+
<0 54 4>;
631+
clocks = <&ahb1_gates 19>;
632+
resets = <&ahb1_rst 19>;
633+
};
634+
624635
spi0: spi@01c68000 {
625636
compatible = "allwinner,sun6i-a31-spi";
626637
reg = <0x01c68000 0x1000>;

‎arch/arm/boot/dts/vexpress-v2p-ca5s.dts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@
8888
interrupts = <1 13 0x304>;
8989
};
9090

91+
timer@2c000200 {
92+
compatible = "arm,cortex-a5-global-timer",
93+
"arm,cortex-a9-global-timer";
94+
reg = <0x2c000200 0x20>;
95+
interrupts = <1 11 0x304>;
96+
clocks = <&oscclk0>;
97+
};
98+
9199
watchdog@2c000620 {
92100
compatible = "arm,cortex-a5-twd-wdt";
93101
reg = <0x2c000620 0x20>;
@@ -120,7 +128,7 @@
120128
compatible = "arm,vexpress,config-bus";
121129
arm,vexpress,config-bridge = <&v2m_sysreg>;
122130

123-
osc@0 {
131+
oscclk0: osc@0 {
124132
/* CPU and internal AXI reference clock */
125133
compatible = "arm,vexpress-osc";
126134
arm,vexpress-sysreg,func = <1 0>;

‎arch/arm/boot/dts/vf610.dtsi‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,19 @@
371371
status = "disabled";
372372
};
373373

374+
ftm: ftm@400b8000 {
375+
compatible = "fsl,ftm-timer";
376+
reg = <0x400b8000 0x1000 0x400b9000 0x1000>;
377+
interrupts = <0 44 IRQ_TYPE_LEVEL_HIGH>;
378+
clock-names = "ftm-evt", "ftm-src",
379+
"ftm-evt-counter-en", "ftm-src-counter-en";
380+
clocks = <&clks VF610_CLK_FTM2>,
381+
<&clks VF610_CLK_FTM3>,
382+
<&clks VF610_CLK_FTM2_EXT_FIX_EN>,
383+
<&clks VF610_CLK_FTM3_EXT_FIX_EN>;
384+
status = "disabled";
385+
};
386+
374387
fec0: ethernet@400d0000 {
375388
compatible = "fsl,mvf600-fec";
376389
reg = <0x400d0000 0x1000>;

‎arch/arm/mach-vexpress/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ config ARCH_VEXPRESS
44
select ARCH_SUPPORTS_BIG_ENDIAN
55
select ARM_AMBA
66
select ARM_GIC
7+
select ARM_GLOBAL_TIMER
78
select ARM_TIMER_SP804
89
select COMMON_CLK_VERSATILE
910
select HAVE_ARM_SCU if SMP

‎drivers/clocksource/Kconfig‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ config CLKSRC_SAMSUNG_PWM
136136
for all devicetree enabled platforms. This driver will be
137137
needed only on systems that do not have the Exynos MCT available.
138138

139+
config FSL_FTM_TIMER
140+
bool
141+
help
142+
Support for Freescale FlexTimer Module (FTM) timer.
143+
139144
config VF_PIT_TIMER
140145
bool
141146
help

0 commit comments

Comments
 (0)