Skip to content

Commit f4febfd

Browse files
committed
Merge tag 'timers-v6.7-rc1' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core
Pull timer driver updates from Daniel Lezcano: - Fix DT bindings typos, readability and wrong information about underflow and overflow interrupts for the RZ/G2L MTU3a driver (Biju Das) - Fix a memory leak in the error path when probing the i.MX GPT timer (Jacky Bai) - Don't use clk_get_rate() in atomic context as the function might sleep. Store the clock and use notifiers to receive a clocke rate change notification (Ivaylo Dimitrov) - Remove superfluous error message when platform_get_irq() fails because the underlying function already prints one (Yang Li) - Add wakeup capability flag for the risc-V ACPI timer (Sunil V L) - Fix initialization of the TCB timers which are in cascade as the second timer is reset after the first wraps up leading to inconsistent scheduler behavior (Ronald Wahl) - Add DT bindings and driver for Cirrus Logic EP93xx (Nikita Shubin)
2 parents 8ceea12 + c28ca80 commit f4febfd

File tree

10 files changed

+332
-49
lines changed

10 files changed

+332
-49
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/timer/cirrus,ep9301-timer.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Cirrus Logic EP93xx timer
8+
9+
maintainers:
10+
- Alexander Sverdlin <[email protected]>
11+
- Nikita Shubin <[email protected]>
12+
13+
properties:
14+
compatible:
15+
oneOf:
16+
- const: cirrus,ep9301-timer
17+
- items:
18+
- enum:
19+
- cirrus,ep9302-timer
20+
- cirrus,ep9307-timer
21+
- cirrus,ep9312-timer
22+
- cirrus,ep9315-timer
23+
- const: cirrus,ep9301-timer
24+
25+
reg:
26+
maxItems: 1
27+
28+
interrupts:
29+
maxItems: 1
30+
31+
resets:
32+
maxItems: 1
33+
34+
required:
35+
- compatible
36+
- reg
37+
- interrupts
38+
39+
additionalProperties: false
40+
41+
examples:
42+
- |
43+
timer@80810000 {
44+
compatible = "cirrus,ep9301-timer";
45+
reg = <0x80810000 0x100>;
46+
interrupt-parent = <&vic1>;
47+
interrupts = <19>;
48+
};
49+
...

Documentation/devicetree/bindings/timer/renesas,rz-mtu3.yaml

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ maintainers:
1111

1212
description: |
1313
This hardware block consists of eight 16-bit timer channels and one
14-
32- bit timer channel. It supports the following specifications:
15-
- Pulse input/output: 28 lines max.
14+
32-bit timer channel. It supports the following specifications:
15+
- Pulse input/output: 28 lines max
1616
- Pulse input 3 lines
1717
- Count clock 11 clocks for each channel (14 clocks for MTU0, 12 clocks
1818
for MTU2, and 10 clocks for MTU5, four clocks for MTU1-MTU2 combination
@@ -23,11 +23,11 @@ description: |
2323
- Input capture function (noise filter setting available)
2424
- Counter-clearing operation
2525
- Simultaneous writing to multiple timer counters (TCNT)
26-
(excluding MTU8).
26+
(excluding MTU8)
2727
- Simultaneous clearing on compare match or input capture
28-
(excluding MTU8).
28+
(excluding MTU8)
2929
- Simultaneous input and output to registers in synchronization with
30-
counter operations (excluding MTU8).
30+
counter operations (excluding MTU8)
3131
- Up to 12-phase PWM output in combination with synchronous operation
3232
(excluding MTU8)
3333
- [MTU0 MTU3, MTU4, MTU6, MTU7, and MTU8]
@@ -40,26 +40,26 @@ description: |
4040
- [MTU3, MTU4, MTU6, and MTU7]
4141
- Through interlocked operation of MTU3/4 and MTU6/7, the positive and
4242
negative signals in six phases (12 phases in total) can be output in
43-
complementary PWM and reset-synchronized PWM operation.
43+
complementary PWM and reset-synchronized PWM operation
4444
- In complementary PWM mode, values can be transferred from buffer
4545
registers to temporary registers at crests and troughs of the timer-
4646
counter values or when the buffer registers (TGRD registers in MTU4
47-
and MTU7) are written to.
48-
- Double-buffering selectable in complementary PWM mode.
47+
and MTU7) are written to
48+
- Double-buffering selectable in complementary PWM mode
4949
- [MTU3 and MTU4]
5050
- Through interlocking with MTU0, a mode for driving AC synchronous
5151
motors (brushless DC motors) by using complementary PWM output and
5252
reset-synchronized PWM output is settable and allows the selection
53-
of two types of waveform output (chopping or level).
53+
of two types of waveform output (chopping or level)
5454
- [MTU5]
55-
- Capable of operation as a dead-time compensation counter.
55+
- Capable of operation as a dead-time compensation counter
5656
- [MTU0/MTU5, MTU1, MTU2, and MTU8]
5757
- 32-bit phase counting mode specifiable by combining MTU1 and MTU2 and
58-
through interlocked operation with MTU0/MTU5 and MTU8.
58+
through interlocked operation with MTU0/MTU5 and MTU8
5959
- Interrupt-skipping function
6060
- In complementary PWM mode, interrupts on crests and troughs of counter
6161
values and triggers to start conversion by the A/D converter can be
62-
skipped.
62+
skipped
6363
- Interrupt sources: 43 sources.
6464
- Buffer operation:
6565
- Automatic transfer of register data (transfer from the buffer
@@ -68,9 +68,9 @@ description: |
6868
- A/D converter start triggers can be generated
6969
- A/D converter start request delaying function enables A/D converter
7070
to be started with any desired timing and to be synchronized with
71-
PWM output.
71+
PWM output
7272
- Low power consumption function
73-
- The MTU3a can be placed in the module-stop state.
73+
- The MTU3a can be placed in the module-stop state
7474
7575
There are two phase counting modes. 16-bit phase counting mode in which
7676
MTU1 and MTU2 operate independently, and cascade connection 32-bit phase
@@ -109,6 +109,7 @@ properties:
109109
compatible:
110110
items:
111111
- enum:
112+
- renesas,r9a07g043-mtu3 # RZ/{G2UL,Five}
112113
- renesas,r9a07g044-mtu3 # RZ/G2{L,LC}
113114
- renesas,r9a07g054-mtu3 # RZ/V2L
114115
- const: renesas,rz-mtu3
@@ -169,46 +170,46 @@ properties:
169170
- const: tgib0
170171
- const: tgic0
171172
- const: tgid0
172-
- const: tgiv0
173+
- const: tciv0
173174
- const: tgie0
174175
- const: tgif0
175176
- const: tgia1
176177
- const: tgib1
177-
- const: tgiv1
178-
- const: tgiu1
178+
- const: tciv1
179+
- const: tciu1
179180
- const: tgia2
180181
- const: tgib2
181-
- const: tgiv2
182-
- const: tgiu2
182+
- const: tciv2
183+
- const: tciu2
183184
- const: tgia3
184185
- const: tgib3
185186
- const: tgic3
186187
- const: tgid3
187-
- const: tgiv3
188+
- const: tciv3
188189
- const: tgia4
189190
- const: tgib4
190191
- const: tgic4
191192
- const: tgid4
192-
- const: tgiv4
193+
- const: tciv4
193194
- const: tgiu5
194195
- const: tgiv5
195196
- const: tgiw5
196197
- const: tgia6
197198
- const: tgib6
198199
- const: tgic6
199200
- const: tgid6
200-
- const: tgiv6
201+
- const: tciv6
201202
- const: tgia7
202203
- const: tgib7
203204
- const: tgic7
204205
- const: tgid7
205-
- const: tgiv7
206+
- const: tciv7
206207
- const: tgia8
207208
- const: tgib8
208209
- const: tgic8
209210
- const: tgid8
210-
- const: tgiv8
211-
- const: tgiu8
211+
- const: tciv8
212+
- const: tciu8
212213

213214
clocks:
214215
maxItems: 1
@@ -285,16 +286,16 @@ examples:
285286
<GIC_SPI 211 IRQ_TYPE_EDGE_RISING>,
286287
<GIC_SPI 212 IRQ_TYPE_EDGE_RISING>,
287288
<GIC_SPI 213 IRQ_TYPE_EDGE_RISING>;
288-
interrupt-names = "tgia0", "tgib0", "tgic0", "tgid0", "tgiv0", "tgie0",
289+
interrupt-names = "tgia0", "tgib0", "tgic0", "tgid0", "tciv0", "tgie0",
289290
"tgif0",
290-
"tgia1", "tgib1", "tgiv1", "tgiu1",
291-
"tgia2", "tgib2", "tgiv2", "tgiu2",
292-
"tgia3", "tgib3", "tgic3", "tgid3", "tgiv3",
293-
"tgia4", "tgib4", "tgic4", "tgid4", "tgiv4",
291+
"tgia1", "tgib1", "tciv1", "tciu1",
292+
"tgia2", "tgib2", "tciv2", "tciu2",
293+
"tgia3", "tgib3", "tgic3", "tgid3", "tciv3",
294+
"tgia4", "tgib4", "tgic4", "tgid4", "tciv4",
294295
"tgiu5", "tgiv5", "tgiw5",
295-
"tgia6", "tgib6", "tgic6", "tgid6", "tgiv6",
296-
"tgia7", "tgib7", "tgic7", "tgid7", "tgiv7",
297-
"tgia8", "tgib8", "tgic8", "tgid8", "tgiv8", "tgiu8";
296+
"tgia6", "tgib6", "tgic6", "tgid6", "tciv6",
297+
"tgia7", "tgib7", "tgic7", "tgid7", "tciv7",
298+
"tgia8", "tgib8", "tgic8", "tgid8", "tciv8", "tciu8";
298299
clocks = <&cpg CPG_MOD R9A07G044_MTU_X_MCK_MTU3>;
299300
power-domains = <&cpg>;
300301
resets = <&cpg R9A07G044_MTU_X_PRESET_MTU3>;

drivers/clocksource/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,4 +732,15 @@ config GOLDFISH_TIMER
732732
help
733733
Support for the timer/counter of goldfish-rtc
734734

735+
config EP93XX_TIMER
736+
bool "Cirrus Logic ep93xx timer driver" if COMPILE_TEST
737+
depends on ARCH_EP93XX
738+
depends on GENERIC_CLOCKEVENTS
739+
depends on HAS_IOMEM
740+
select CLKSRC_MMIO
741+
select TIMER_OF
742+
help
743+
Enables support for the Cirrus Logic timer block
744+
EP93XX.
745+
735746
endmenu

drivers/clocksource/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,4 @@ obj-$(CONFIG_MSC313E_TIMER) += timer-msc313e.o
8989
obj-$(CONFIG_GOLDFISH_TIMER) += timer-goldfish.o
9090
obj-$(CONFIG_GXP_TIMER) += timer-gxp.o
9191
obj-$(CONFIG_CLKSRC_LOONGSON1_PWM) += timer-loongson1-pwm.o
92+
obj-$(CONFIG_EP93XX_TIMER) += timer-ep93xx.o

drivers/clocksource/timer-atmel-tcb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ static void __init tcb_setup_dual_chan(struct atmel_tc *tc, int mck_divisor_idx)
315315
writel(mck_divisor_idx /* likely divide-by-8 */
316316
| ATMEL_TC_WAVE
317317
| ATMEL_TC_WAVESEL_UP /* free-run */
318+
| ATMEL_TC_ASWTRG_SET /* TIOA0 rises at software trigger */
318319
| ATMEL_TC_ACPA_SET /* TIOA0 rises at 0 */
319320
| ATMEL_TC_ACPC_CLEAR, /* (duty cycle 50%) */
320321
tcaddr + ATMEL_TC_REG(0, CMR));

0 commit comments

Comments
 (0)