Skip to content

Commit 331b483

Browse files
committed
Merge branch 'clockevents/3.16' of git://git.linaro.org/people/daniel.lezcano/linux into timers/core
This pull request contains the following changes: * Laurent Pinchart did a lot of modifications to prepare the DT support. These modifications include a lot of cleanup (structure renaming, preparation to support multiple channel, kzalloc usage, ...) and then finishes to drop the old code to the new one. * Jingoo Han removed the dev_err when an allocation fails because this error is already given by the mm subsystems. * Matthew Leach added the ARM global timer with vexpress, enabled the ARM global timer with the A5 and added the definition in the DT. He also fixed a invalid check when looking for an usable ARM global timer for A9 * Maxime Ripard added the support for AllWinner A31 for sun4i and made the timer reset optional through the DT * Stephen Boyd used the msm timer for the udelay * Uwe Kleine-König fixed the non-standard 'compatible' binding for efm32 * Xiubo Li clarified the types for the clocksource_mmio_read* and added a new Flextimer Module (FTM) with its bindings * Yang Wei added the 'notrace' attribute to 'read_sched_clock' for the dw_apb_timer
2 parents 309179f + 2529c3a commit 331b483

22 files changed

Lines changed: 1785 additions & 702 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+
};

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,17 @@
428428
status = "disabled";
429429
};
430430

431+
timer@01c60000 {
432+
compatible = "allwinner,sun6i-a31-hstimer", "allwinner,sun7i-a20-hstimer";
433+
reg = <0x01c60000 0x1000>;
434+
interrupts = <0 51 4>,
435+
<0 52 4>,
436+
<0 53 4>,
437+
<0 54 4>;
438+
clocks = <&ahb1_gates 19>;
439+
resets = <&ahb1_rst 19>;
440+
};
441+
431442
spi0: spi@01c68000 {
432443
compatible = "allwinner,sun6i-a31-spi";
433444
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
@@ -347,6 +347,19 @@
347347
status = "disabled";
348348
};
349349

350+
ftm: ftm@400b8000 {
351+
compatible = "fsl,ftm-timer";
352+
reg = <0x400b8000 0x1000 0x400b9000 0x1000>;
353+
interrupts = <0 44 IRQ_TYPE_LEVEL_HIGH>;
354+
clock-names = "ftm-evt", "ftm-src",
355+
"ftm-evt-counter-en", "ftm-src-counter-en";
356+
clocks = <&clks VF610_CLK_FTM2>,
357+
<&clks VF610_CLK_FTM3>,
358+
<&clks VF610_CLK_FTM2_EXT_FIX_EN>,
359+
<&clks VF610_CLK_FTM3_EXT_FIX_EN>;
360+
status = "disabled";
361+
};
362+
350363
fec0: ethernet@400d0000 {
351364
compatible = "fsl,mvf600-fec";
352365
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

‎drivers/clocksource/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ obj-$(CONFIG_CADENCE_TTC_TIMER) += cadence_ttc_timer.o
3131
obj-$(CONFIG_CLKSRC_EFM32) += time-efm32.o
3232
obj-$(CONFIG_CLKSRC_EXYNOS_MCT) += exynos_mct.o
3333
obj-$(CONFIG_CLKSRC_SAMSUNG_PWM) += samsung_pwm_timer.o
34+
obj-$(CONFIG_FSL_FTM_TIMER) += fsl_ftm_timer.o
3435
obj-$(CONFIG_VF_PIT_TIMER) += vf_pit_timer.o
3536
obj-$(CONFIG_CLKSRC_QCOM) += qcom-timer.o
3637

0 commit comments

Comments
 (0)