Skip to content

Commit 1af447b

Browse files
committed
Merge branch 'clockevents/3.17' of git://git.linaro.org/people/daniel.lezcano/linux into timers/core
Pull clockevents from Danel Lezcano: * New timer driver for the Cirrus Logic CLPS711X SoC * New driver for the Mediatek SoC which includes: * A new function for of, acked by Rob Herring * Move the PXA driver to drivers/clocksource, add DT support * Optimization of the exynos_mct driver * DT support for the renesas timers family. * Some Kconfig and driver fixlets
2 parents 5442e9f + 3252a64 commit 1af447b

27 files changed

+1116
-513
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
* Cirrus Logic CLPS711X Timer Counter
2+
3+
Required properties:
4+
- compatible: Shall contain "cirrus,clps711x-timer".
5+
- reg : Address and length of the register set.
6+
- interrupts: The interrupt number of the timer.
7+
- clocks : phandle of timer reference clock.
8+
9+
Note: Each timer should have an alias correctly numbered in "aliases" node.
10+
11+
Example:
12+
aliases {
13+
timer0 = &timer1;
14+
timer1 = &timer2;
15+
};
16+
17+
timer1: timer@80000300 {
18+
compatible = "cirrus,ep7312-timer", "cirrus,clps711x-timer";
19+
reg = <0x80000300 0x4>;
20+
interrupts = <8>;
21+
clocks = <&clks 5>;
22+
};
23+
24+
timer2: timer@80000340 {
25+
compatible = "cirrus,ep7312-timer", "cirrus,clps711x-timer";
26+
reg = <0x80000340 0x4>;
27+
interrupts = <9>;
28+
clocks = <&clks 6>;
29+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Mediatek MT6577, MT6572 and MT6589 Timers
2+
---------------------------------------
3+
4+
Required properties:
5+
- compatible: Should be "mediatek,mt6577-timer"
6+
- reg: Should contain location and length for timers register.
7+
- clocks: Clocks driving the timer hardware. This list should include two
8+
clocks. The order is system clock and as second clock the RTC clock.
9+
10+
Examples:
11+
12+
timer@10008000 {
13+
compatible = "mediatek,mt6577-timer";
14+
reg = <0x10008000 0x80>;
15+
interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_LOW>;
16+
clocks = <&system_clk>, <&rtc_clk>;
17+
};
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
* Renesas R-Car Compare Match Timer (CMT)
2+
3+
The CMT is a multi-channel 16/32/48-bit timer/counter with configurable clock
4+
inputs and programmable compare match.
5+
6+
Channels share hardware resources but their counter and compare match value
7+
are independent. A particular CMT instance can implement only a subset of the
8+
channels supported by the CMT model. Channel indices represent the hardware
9+
position of the channel in the CMT and don't match the channel numbers in the
10+
datasheets.
11+
12+
Required Properties:
13+
14+
- compatible: must contain one of the following.
15+
- "renesas,cmt-32" for the 32-bit CMT
16+
(CMT0 on sh7372, sh73a0 and r8a7740)
17+
- "renesas,cmt-32-fast" for the 32-bit CMT with fast clock support
18+
(CMT[234] on sh7372, sh73a0 and r8a7740)
19+
- "renesas,cmt-48" for the 48-bit CMT
20+
(CMT1 on sh7372, sh73a0 and r8a7740)
21+
- "renesas,cmt-48-gen2" for the second generation 48-bit CMT
22+
(CMT[01] on r8a73a4, r8a7790 and r8a7791)
23+
24+
- reg: base address and length of the registers block for the timer module.
25+
- interrupts: interrupt-specifier for the timer, one per channel.
26+
- clocks: a list of phandle + clock-specifier pairs, one for each entry
27+
in clock-names.
28+
- clock-names: must contain "fck" for the functional clock.
29+
30+
- renesas,channels-mask: bitmask of the available channels.
31+
32+
33+
Example: R8A7790 (R-Car H2) CMT0 node
34+
35+
CMT0 on R8A7790 implements hardware channels 5 and 6 only and names
36+
them channels 0 and 1 in the documentation.
37+
38+
cmt0: timer@ffca0000 {
39+
compatible = "renesas,cmt-48-gen2";
40+
reg = <0 0xffca0000 0 0x1004>;
41+
interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>,
42+
<0 142 IRQ_TYPE_LEVEL_HIGH>;
43+
clocks = <&mstp1_clks R8A7790_CLK_CMT0>;
44+
clock-names = "fck";
45+
46+
renesas,channels-mask = <0x60>;
47+
};
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
* Renesas R-Car Multi-Function Timer Pulse Unit 2 (MTU2)
2+
3+
The MTU2 is a multi-purpose, multi-channel timer/counter with configurable
4+
clock inputs and programmable compare match.
5+
6+
Channels share hardware resources but their counter and compare match value
7+
are independent. The MTU2 hardware supports five channels indexed from 0 to 4.
8+
9+
Required Properties:
10+
11+
- compatible: must contain "renesas,mtu2"
12+
13+
- reg: base address and length of the registers block for the timer module.
14+
15+
- interrupts: interrupt specifiers for the timer, one for each entry in
16+
interrupt-names.
17+
- interrupt-names: must contain one entry named "tgi?a" for each enabled
18+
channel, where "?" is the channel index expressed as one digit from "0" to
19+
"4".
20+
21+
- clocks: a list of phandle + clock-specifier pairs, one for each entry
22+
in clock-names.
23+
- clock-names: must contain "fck" for the functional clock.
24+
25+
26+
Example: R7S72100 (RZ/A1H) MTU2 node
27+
28+
mtu2: timer@fcff0000 {
29+
compatible = "renesas,mtu2";
30+
reg = <0xfcff0000 0x400>;
31+
interrupts = <0 139 IRQ_TYPE_LEVEL_HIGH>,
32+
<0 146 IRQ_TYPE_LEVEL_HIGH>,
33+
<0 150 IRQ_TYPE_LEVEL_HIGH>,
34+
<0 154 IRQ_TYPE_LEVEL_HIGH>,
35+
<0 159 IRQ_TYPE_LEVEL_HIGH>;
36+
interrupt-names = "tgi0a", "tgi1a", "tgi2a", "tgi3a", "tgi4a";
37+
clocks = <&mstp3_clks R7S72100_CLK_MTU2>;
38+
clock-names = "fck";
39+
};
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
* Renesas R-Car Timer Unit (TMU)
2+
3+
The TMU is a 32-bit timer/counter with configurable clock inputs and
4+
programmable compare match.
5+
6+
Channels share hardware resources but their counter and compare match value
7+
are independent. The TMU hardware supports up to three channels.
8+
9+
Required Properties:
10+
11+
- compatible: must contain "renesas,tmu"
12+
13+
- reg: base address and length of the registers block for the timer module.
14+
15+
- interrupts: interrupt-specifier for the timer, one per channel.
16+
17+
- clocks: a list of phandle + clock-specifier pairs, one for each entry
18+
in clock-names.
19+
- clock-names: must contain "fck" for the functional clock.
20+
21+
Optional Properties:
22+
23+
- #renesas,channels: number of channels implemented by the timer, must be 2
24+
or 3 (if not specified the value defaults to 3).
25+
26+
27+
Example: R8A7779 (R-Car H1) TMU0 node
28+
29+
tmu0: timer@ffd80000 {
30+
compatible = "renesas,tmu";
31+
reg = <0xffd80000 0x30>;
32+
interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>,
33+
<0 33 IRQ_TYPE_LEVEL_HIGH>,
34+
<0 34 IRQ_TYPE_LEVEL_HIGH>;
35+
clocks = <&mstp0_clks R8A7779_CLK_TMU0>;
36+
clock-names = "fck";
37+
38+
#renesas,channels = <3>;
39+
};

Documentation/devicetree/bindings/vendor-prefixes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ lsi LSI Corp. (LSI Logic)
7777
lltc Linear Technology Corporation
7878
marvell Marvell Technology Group Ltd.
7979
maxim Maxim Integrated Products
80+
mediatek MediaTek Inc.
8081
micrel Micrel Inc.
8182
microchip Microchip Technology Inc.
8283
mosaixtech Mosaix Technologies, Inc.

arch/arm/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,7 @@ config ARCH_PXA
634634
select AUTO_ZRELADDR
635635
select CLKDEV_LOOKUP
636636
select CLKSRC_MMIO
637+
select CLKSRC_OF
637638
select GENERIC_CLOCKEVENTS
638639
select GPIO_PXA
639640
select HAVE_IDE

arch/arm/mach-pxa/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Common support (must be linked before board specific support)
66
obj-y += clock.o devices.o generic.o irq.o \
7-
time.o reset.o
7+
reset.o
88
obj-$(CONFIG_PM) += pm.o sleep.o standby.o
99

1010
# Generic drivers that other drivers may depend upon

arch/arm/mach-pxa/generic.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@
2525
#include <asm/mach/map.h>
2626
#include <asm/mach-types.h>
2727

28+
#include <mach/irqs.h>
2829
#include <mach/reset.h>
2930
#include <mach/smemc.h>
3031
#include <mach/pxa3xx-regs.h>
3132

3233
#include "generic.h"
34+
#include <clocksource/pxa.h>
3335

3436
void clear_reset_status(unsigned int mask)
3537
{
@@ -56,6 +58,15 @@ unsigned long get_clock_tick_rate(void)
5658
}
5759
EXPORT_SYMBOL(get_clock_tick_rate);
5860

61+
/*
62+
* For non device-tree builds, keep legacy timer init
63+
*/
64+
void pxa_timer_init(void)
65+
{
66+
pxa_timer_nodt_init(IRQ_OST0, io_p2v(0x40a00000),
67+
get_clock_tick_rate());
68+
}
69+
5970
/*
6071
* Get the clock frequency as reflected by CCCR and the turbo flag.
6172
* We assume these values have been applied via a fcs.

arch/arm/mach-pxa/time.c

Lines changed: 0 additions & 162 deletions
This file was deleted.

0 commit comments

Comments
 (0)