Skip to content

Commit e932900

Browse files
author
Michal Simek
committed
arm: zynq: Use standard timer binding
Use cdns,ttc because this driver is Cadence Rev06 Triple Timer Counter and everybody can use it without xilinx specific function name or probing. Also use standard dt description for timer and also prepare for moving to clocksource initialization. Signed-off-by: Michal Simek <[email protected]>
1 parent 3d5a965 commit e932900

File tree

4 files changed

+195
-122
lines changed

4 files changed

+195
-122
lines changed

arch/arm/boot/dts/zynq-7000.dtsi

Lines changed: 6 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -111,56 +111,23 @@
111111
};
112112

113113
ttc0: ttc0@f8001000 {
114-
#address-cells = <1>;
115-
#size-cells = <0>;
116-
compatible = "xlnx,ttc";
114+
interrupt-parent = <&intc>;
115+
interrupts = < 0 10 4 0 11 4 0 12 4 >;
116+
compatible = "cdns,ttc";
117117
reg = <0xF8001000 0x1000>;
118118
clocks = <&cpu_clk 3>;
119119
clock-names = "cpu_1x";
120120
clock-ranges;
121-
122-
ttc0_0: ttc0.0 {
123-
status = "disabled";
124-
reg = <0>;
125-
interrupts = <0 10 4>;
126-
};
127-
ttc0_1: ttc0.1 {
128-
status = "disabled";
129-
reg = <1>;
130-
interrupts = <0 11 4>;
131-
};
132-
ttc0_2: ttc0.2 {
133-
status = "disabled";
134-
reg = <2>;
135-
interrupts = <0 12 4>;
136-
};
137121
};
138122

139123
ttc1: ttc1@f8002000 {
140-
#interrupt-parent = <&intc>;
141-
#address-cells = <1>;
142-
#size-cells = <0>;
143-
compatible = "xlnx,ttc";
124+
interrupt-parent = <&intc>;
125+
interrupts = < 0 37 4 0 38 4 0 39 4 >;
126+
compatible = "cdns,ttc";
144127
reg = <0xF8002000 0x1000>;
145128
clocks = <&cpu_clk 3>;
146129
clock-names = "cpu_1x";
147130
clock-ranges;
148-
149-
ttc1_0: ttc1.0 {
150-
status = "disabled";
151-
reg = <0>;
152-
interrupts = <0 37 4>;
153-
};
154-
ttc1_1: ttc1.1 {
155-
status = "disabled";
156-
reg = <1>;
157-
interrupts = <0 38 4>;
158-
};
159-
ttc1_2: ttc1.2 {
160-
status = "disabled";
161-
reg = <2>;
162-
interrupts = <0 39 4>;
163-
};
164131
};
165132
};
166133
};

arch/arm/boot/dts/zynq-zc702.dts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,3 @@
3232
&ps_clk {
3333
clock-frequency = <33333330>;
3434
};
35-
36-
&ttc0_0 {
37-
status = "ok";
38-
compatible = "xlnx,ttc-counter-clocksource";
39-
};
40-
41-
&ttc0_1 {
42-
status = "ok";
43-
compatible = "xlnx,ttc-counter-clockevent";
44-
};

arch/arm/mach-zynq/common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <linux/platform_device.h>
2121
#include <linux/clk.h>
2222
#include <linux/clk/zynq.h>
23+
#include <linux/clocksource.h>
2324
#include <linux/of_address.h>
2425
#include <linux/of_irq.h>
2526
#include <linux/of_platform.h>

0 commit comments

Comments
 (0)