diff options
author | Arnd Bergmann <arnd@arndb.de> | 2014-09-05 11:40:32 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2014-09-05 11:40:32 -0400 |
commit | 09d12ad7936df431ecbf0faf2b81c56cc4bb6392 (patch) | |
tree | 730eefd698dd59556f823952531fb675f1e40455 | |
parent | e0ace5fc33e2046e83b0ebbe03b7489eabd6cc03 (diff) | |
parent | 9dddfcfacaadb5491b62233b893b510fa00da4e0 (diff) |
Merge tag 'renesas-dt-timers-for-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc
Merge "Renesas ARM Based SoC DT Timers Updates for v3.18" from Simon Horman:
* Enable timers using DT when booting boards without Legacy-C code
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* tag 'renesas-dt-timers-for-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
ARM: shmobile: genmai-reference: Enable MTU2 in device tree
ARM: shmobile: r7s72100: Add MTU2 device to DT
ARM: shmobile: marzen-reference: Enable TMU0 in device tree
ARM: shmobile: koelsch-reference: Enable CMT0 in device tree
ARM: shmobile: lager-reference: Enable CMT0 in device tree
ARM: shmobile: r8a7779: Add TMU devices to DT
ARM: shmobile: r8a7791: Add CMT devices to DT
ARM: shmobile: r8a7790: Add CMT devices to DT
Conflicts:
arch/arm/mach-shmobile/setup-r8a7779.c
21 files changed, 152 insertions, 84 deletions
diff --git a/arch/arm/boot/dts/r7s72100-genmai.dts b/arch/arm/boot/dts/r7s72100-genmai.dts index 20705467f4c9..a3ed23c0a8f5 100644 --- a/arch/arm/boot/dts/r7s72100-genmai.dts +++ b/arch/arm/boot/dts/r7s72100-genmai.dts | |||
@@ -43,6 +43,10 @@ | |||
43 | clock-frequency = <48000000>; | 43 | clock-frequency = <48000000>; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | &mtu2 { | ||
47 | status = "ok"; | ||
48 | }; | ||
49 | |||
46 | &i2c2 { | 50 | &i2c2 { |
47 | status = "okay"; | 51 | status = "okay"; |
48 | clock-frequency = <400000>; | 52 | clock-frequency = <400000>; |
diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi index bdee22541189..1d28d01c163c 100644 --- a/arch/arm/boot/dts/r7s72100.dtsi +++ b/arch/arm/boot/dts/r7s72100.dtsi | |||
@@ -229,6 +229,16 @@ | |||
229 | status = "disabled"; | 229 | status = "disabled"; |
230 | }; | 230 | }; |
231 | 231 | ||
232 | mtu2: timer@fcff0000 { | ||
233 | compatible = "renesas,mtu2"; | ||
234 | reg = <0xfcff0000 0x400>; | ||
235 | interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; | ||
236 | interrupt-names = "tgi0a"; | ||
237 | clocks = <&mstp3_clks R7S72100_CLK_MTU2>; | ||
238 | clock-names = "fck"; | ||
239 | status = "disabled"; | ||
240 | }; | ||
241 | |||
232 | scif0: serial@e8007000 { | 242 | scif0: serial@e8007000 { |
233 | compatible = "renesas,scif-r7s72100", "renesas,scif"; | 243 | compatible = "renesas,scif-r7s72100", "renesas,scif"; |
234 | reg = <0xe8007000 64>; | 244 | reg = <0xe8007000 64>; |
diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts index 5745555df943..c160404e4d40 100644 --- a/arch/arm/boot/dts/r8a7779-marzen.dts +++ b/arch/arm/boot/dts/r8a7779-marzen.dts | |||
@@ -78,6 +78,10 @@ | |||
78 | clock-frequency = <31250000>; | 78 | clock-frequency = <31250000>; |
79 | }; | 79 | }; |
80 | 80 | ||
81 | &tmu0 { | ||
82 | status = "okay"; | ||
83 | }; | ||
84 | |||
81 | &pfc { | 85 | &pfc { |
82 | lan0_pins: lan0 { | 86 | lan0_pins: lan0 { |
83 | intc { | 87 | intc { |
diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi index 58d0d952d60e..463e3fd569b6 100644 --- a/arch/arm/boot/dts/r8a7779.dtsi +++ b/arch/arm/boot/dts/r8a7779.dtsi | |||
@@ -266,6 +266,48 @@ | |||
266 | reg = <0xffc48000 0x38>; | 266 | reg = <0xffc48000 0x38>; |
267 | }; | 267 | }; |
268 | 268 | ||
269 | tmu0: timer@ffd80000 { | ||
270 | compatible = "renesas,tmu"; | ||
271 | reg = <0xffd80000 0x30>; | ||
272 | interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>, | ||
273 | <0 33 IRQ_TYPE_LEVEL_HIGH>, | ||
274 | <0 34 IRQ_TYPE_LEVEL_HIGH>; | ||
275 | clocks = <&mstp0_clks R8A7779_CLK_TMU0>; | ||
276 | clock-names = "fck"; | ||
277 | |||
278 | #renesas,channels = <3>; | ||
279 | |||
280 | status = "disabled"; | ||
281 | }; | ||
282 | |||
283 | tmu1: timer@ffd81000 { | ||
284 | compatible = "renesas,tmu"; | ||
285 | reg = <0xffd81000 0x30>; | ||
286 | interrupts = <0 36 IRQ_TYPE_LEVEL_HIGH>, | ||
287 | <0 37 IRQ_TYPE_LEVEL_HIGH>, | ||
288 | <0 38 IRQ_TYPE_LEVEL_HIGH>; | ||
289 | clocks = <&mstp0_clks R8A7779_CLK_TMU1>; | ||
290 | clock-names = "fck"; | ||
291 | |||
292 | #renesas,channels = <3>; | ||
293 | |||
294 | status = "disabled"; | ||
295 | }; | ||
296 | |||
297 | tmu2: timer@ffd82000 { | ||
298 | compatible = "renesas,tmu"; | ||
299 | reg = <0xffd82000 0x30>; | ||
300 | interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>, | ||
301 | <0 41 IRQ_TYPE_LEVEL_HIGH>, | ||
302 | <0 42 IRQ_TYPE_LEVEL_HIGH>; | ||
303 | clocks = <&mstp0_clks R8A7779_CLK_TMU2>; | ||
304 | clock-names = "fck"; | ||
305 | |||
306 | #renesas,channels = <3>; | ||
307 | |||
308 | status = "disabled"; | ||
309 | }; | ||
310 | |||
269 | sata: sata@fc600000 { | 311 | sata: sata@fc600000 { |
270 | compatible = "renesas,rcar-sata"; | 312 | compatible = "renesas,rcar-sata"; |
271 | reg = <0xfc600000 0x2000>; | 313 | reg = <0xfc600000 0x2000>; |
diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts index 856b4236b674..7853c2c15ce6 100644 --- a/arch/arm/boot/dts/r8a7790-lager.dts +++ b/arch/arm/boot/dts/r8a7790-lager.dts | |||
@@ -252,6 +252,10 @@ | |||
252 | }; | 252 | }; |
253 | }; | 253 | }; |
254 | 254 | ||
255 | &cmt0 { | ||
256 | status = "ok"; | ||
257 | }; | ||
258 | |||
255 | &mmcif1 { | 259 | &mmcif1 { |
256 | pinctrl-0 = <&mmc1_pins>; | 260 | pinctrl-0 = <&mmc1_pins>; |
257 | pinctrl-names = "default"; | 261 | pinctrl-names = "default"; |
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index d9ddecbb859c..7218bfff0bca 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi | |||
@@ -206,6 +206,38 @@ | |||
206 | <1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; | 206 | <1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; |
207 | }; | 207 | }; |
208 | 208 | ||
209 | cmt0: timer@ffca0000 { | ||
210 | compatible = "renesas,cmt-48-gen2"; | ||
211 | reg = <0 0xffca0000 0 0x1004>; | ||
212 | interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>, | ||
213 | <0 143 IRQ_TYPE_LEVEL_HIGH>; | ||
214 | clocks = <&mstp1_clks R8A7790_CLK_CMT0>; | ||
215 | clock-names = "fck"; | ||
216 | |||
217 | renesas,channels-mask = <0x60>; | ||
218 | |||
219 | status = "disabled"; | ||
220 | }; | ||
221 | |||
222 | cmt1: timer@e6130000 { | ||
223 | compatible = "renesas,cmt-48-gen2"; | ||
224 | reg = <0 0xe6130000 0 0x1004>; | ||
225 | interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>, | ||
226 | <0 121 IRQ_TYPE_LEVEL_HIGH>, | ||
227 | <0 122 IRQ_TYPE_LEVEL_HIGH>, | ||
228 | <0 123 IRQ_TYPE_LEVEL_HIGH>, | ||
229 | <0 124 IRQ_TYPE_LEVEL_HIGH>, | ||
230 | <0 125 IRQ_TYPE_LEVEL_HIGH>, | ||
231 | <0 126 IRQ_TYPE_LEVEL_HIGH>, | ||
232 | <0 127 IRQ_TYPE_LEVEL_HIGH>; | ||
233 | clocks = <&mstp3_clks R8A7790_CLK_CMT1>; | ||
234 | clock-names = "fck"; | ||
235 | |||
236 | renesas,channels-mask = <0xff>; | ||
237 | |||
238 | status = "disabled"; | ||
239 | }; | ||
240 | |||
209 | irqc0: interrupt-controller@e61c0000 { | 241 | irqc0: interrupt-controller@e61c0000 { |
210 | compatible = "renesas,irqc-r8a7790", "renesas,irqc"; | 242 | compatible = "renesas,irqc-r8a7790", "renesas,irqc"; |
211 | #interrupt-cells = <2>; | 243 | #interrupt-cells = <2>; |
diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index 23486c081a69..8f36d4f793a8 100644 --- a/arch/arm/boot/dts/r8a7791-koelsch.dts +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts | |||
@@ -307,6 +307,10 @@ | |||
307 | }; | 307 | }; |
308 | }; | 308 | }; |
309 | 309 | ||
310 | &cmt0 { | ||
311 | status = "ok"; | ||
312 | }; | ||
313 | |||
310 | &sata0 { | 314 | &sata0 { |
311 | status = "okay"; | 315 | status = "okay"; |
312 | }; | 316 | }; |
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index 0d82a4b3c650..bdb9ac1509f8 100644 --- a/arch/arm/boot/dts/r8a7791.dtsi +++ b/arch/arm/boot/dts/r8a7791.dtsi | |||
@@ -189,6 +189,38 @@ | |||
189 | <1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; | 189 | <1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; |
190 | }; | 190 | }; |
191 | 191 | ||
192 | cmt0: timer@ffca0000 { | ||
193 | compatible = "renesas,cmt-48-gen2"; | ||
194 | reg = <0 0xffca0000 0 0x1004>; | ||
195 | interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>, | ||
196 | <0 143 IRQ_TYPE_LEVEL_HIGH>; | ||
197 | clocks = <&mstp1_clks R8A7791_CLK_CMT0>; | ||
198 | clock-names = "fck"; | ||
199 | |||
200 | renesas,channels-mask = <0x60>; | ||
201 | |||
202 | status = "disabled"; | ||
203 | }; | ||
204 | |||
205 | cmt1: timer@e6130000 { | ||
206 | compatible = "renesas,cmt-48-gen2"; | ||
207 | reg = <0 0xe6130000 0 0x1004>; | ||
208 | interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>, | ||
209 | <0 121 IRQ_TYPE_LEVEL_HIGH>, | ||
210 | <0 122 IRQ_TYPE_LEVEL_HIGH>, | ||
211 | <0 123 IRQ_TYPE_LEVEL_HIGH>, | ||
212 | <0 124 IRQ_TYPE_LEVEL_HIGH>, | ||
213 | <0 125 IRQ_TYPE_LEVEL_HIGH>, | ||
214 | <0 126 IRQ_TYPE_LEVEL_HIGH>, | ||
215 | <0 127 IRQ_TYPE_LEVEL_HIGH>; | ||
216 | clocks = <&mstp3_clks R8A7791_CLK_CMT1>; | ||
217 | clock-names = "fck"; | ||
218 | |||
219 | renesas,channels-mask = <0xff>; | ||
220 | |||
221 | status = "disabled"; | ||
222 | }; | ||
223 | |||
192 | irqc0: interrupt-controller@e61c0000 { | 224 | irqc0: interrupt-controller@e61c0000 { |
193 | compatible = "renesas,irqc-r8a7791", "renesas,irqc"; | 225 | compatible = "renesas,irqc-r8a7791", "renesas,irqc"; |
194 | #interrupt-cells = <2>; | 226 | #interrupt-cells = <2>; |
diff --git a/arch/arm/mach-shmobile/board-genmai-reference.c b/arch/arm/mach-shmobile/board-genmai-reference.c index e5448f7b868a..bc52677986c3 100644 --- a/arch/arm/mach-shmobile/board-genmai-reference.c +++ b/arch/arm/mach-shmobile/board-genmai-reference.c | |||
@@ -19,29 +19,10 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/of_platform.h> | ||
23 | 22 | ||
24 | #include <asm/mach-types.h> | ||
25 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
26 | 24 | ||
27 | #include "clock.h" | ||
28 | #include "common.h" | 25 | #include "common.h" |
29 | #include "r7s72100.h" | ||
30 | |||
31 | /* | ||
32 | * This is a really crude hack to provide clkdev support to platform | ||
33 | * devices until they get moved to DT. | ||
34 | */ | ||
35 | static const struct clk_name clk_names[] = { | ||
36 | { "mtu2", "fck", "sh-mtu2" }, | ||
37 | }; | ||
38 | |||
39 | static void __init genmai_add_standard_devices(void) | ||
40 | { | ||
41 | shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), true); | ||
42 | r7s72100_add_dt_devices(); | ||
43 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
44 | } | ||
45 | 26 | ||
46 | static const char * const genmai_boards_compat_dt[] __initconst = { | 27 | static const char * const genmai_boards_compat_dt[] __initconst = { |
47 | "renesas,genmai", | 28 | "renesas,genmai", |
@@ -50,6 +31,5 @@ static const char * const genmai_boards_compat_dt[] __initconst = { | |||
50 | 31 | ||
51 | DT_MACHINE_START(GENMAI_DT, "genmai") | 32 | DT_MACHINE_START(GENMAI_DT, "genmai") |
52 | .init_early = shmobile_init_delay, | 33 | .init_early = shmobile_init_delay, |
53 | .init_machine = genmai_add_standard_devices, | ||
54 | .dt_compat = genmai_boards_compat_dt, | 34 | .dt_compat = genmai_boards_compat_dt, |
55 | MACHINE_END | 35 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c index 7bf2d8057535..ba545fc09649 100644 --- a/arch/arm/mach-shmobile/board-genmai.c +++ b/arch/arm/mach-shmobile/board-genmai.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/serial_sci.h> | 24 | #include <linux/serial_sci.h> |
25 | #include <linux/sh_eth.h> | 25 | #include <linux/sh_eth.h> |
26 | #include <linux/sh_timer.h> | ||
26 | #include <linux/spi/rspi.h> | 27 | #include <linux/spi/rspi.h> |
27 | #include <linux/spi/spi.h> | 28 | #include <linux/spi/spi.h> |
28 | 29 | ||
@@ -125,10 +126,21 @@ R7S72100_SCIF(7, 0xe800a800, gic_iid(249)); | |||
125 | &scif##index##_platform_data, \ | 126 | &scif##index##_platform_data, \ |
126 | sizeof(scif##index##_platform_data)) | 127 | sizeof(scif##index##_platform_data)) |
127 | 128 | ||
129 | static struct resource mtu2_resources[] __initdata = { | ||
130 | DEFINE_RES_MEM(0xfcff0000, 0x400), | ||
131 | DEFINE_RES_IRQ_NAMED(gic_iid(139), "tgi0a"), | ||
132 | }; | ||
133 | |||
134 | #define r7s72100_register_mtu2() \ | ||
135 | platform_device_register_resndata(&platform_bus, "sh-mtu2", \ | ||
136 | -1, mtu2_resources, \ | ||
137 | ARRAY_SIZE(mtu2_resources), \ | ||
138 | NULL, 0) | ||
139 | |||
128 | static void __init genmai_add_standard_devices(void) | 140 | static void __init genmai_add_standard_devices(void) |
129 | { | 141 | { |
130 | r7s72100_clock_init(); | 142 | r7s72100_clock_init(); |
131 | r7s72100_add_dt_devices(); | 143 | r7s72100_register_mtu2(); |
132 | 144 | ||
133 | platform_device_register_full(ðer_info); | 145 | platform_device_register_full(ðer_info); |
134 | 146 | ||
diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c index 3ff88c138896..9db5e6774fb7 100644 --- a/arch/arm/mach-shmobile/board-koelsch-reference.c +++ b/arch/arm/mach-shmobile/board-koelsch-reference.c | |||
@@ -88,7 +88,6 @@ static void __init koelsch_add_du_device(void) | |||
88 | * devices until they get moved to DT. | 88 | * devices until they get moved to DT. |
89 | */ | 89 | */ |
90 | static const struct clk_name clk_names[] __initconst = { | 90 | static const struct clk_name clk_names[] __initconst = { |
91 | { "cmt0", "fck", "sh-cmt-48-gen2.0" }, | ||
92 | { "du0", "du.0", "rcar-du-r8a7791" }, | 91 | { "du0", "du.0", "rcar-du-r8a7791" }, |
93 | { "du1", "du.1", "rcar-du-r8a7791" }, | 92 | { "du1", "du.1", "rcar-du-r8a7791" }, |
94 | { "lvds0", "lvds.0", "rcar-du-r8a7791" }, | 93 | { "lvds0", "lvds.0", "rcar-du-r8a7791" }, |
@@ -97,7 +96,6 @@ static const struct clk_name clk_names[] __initconst = { | |||
97 | static void __init koelsch_add_standard_devices(void) | 96 | static void __init koelsch_add_standard_devices(void) |
98 | { | 97 | { |
99 | shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); | 98 | shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); |
100 | r8a7791_add_dt_devices(); | ||
101 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 99 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
102 | 100 | ||
103 | koelsch_add_du_device(); | 101 | koelsch_add_du_device(); |
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c index 41c808e56005..2a05c02bec39 100644 --- a/arch/arm/mach-shmobile/board-lager-reference.c +++ b/arch/arm/mach-shmobile/board-lager-reference.c | |||
@@ -92,7 +92,6 @@ static void __init lager_add_du_device(void) | |||
92 | * devices until they get moved to DT. | 92 | * devices until they get moved to DT. |
93 | */ | 93 | */ |
94 | static const struct clk_name clk_names[] __initconst = { | 94 | static const struct clk_name clk_names[] __initconst = { |
95 | { "cmt0", "fck", "sh-cmt-48-gen2.0" }, | ||
96 | { "du0", "du.0", "rcar-du-r8a7790" }, | 95 | { "du0", "du.0", "rcar-du-r8a7790" }, |
97 | { "du1", "du.1", "rcar-du-r8a7790" }, | 96 | { "du1", "du.1", "rcar-du-r8a7790" }, |
98 | { "du2", "du.2", "rcar-du-r8a7790" }, | 97 | { "du2", "du.2", "rcar-du-r8a7790" }, |
@@ -103,7 +102,6 @@ static const struct clk_name clk_names[] __initconst = { | |||
103 | static void __init lager_add_standard_devices(void) | 102 | static void __init lager_add_standard_devices(void) |
104 | { | 103 | { |
105 | shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); | 104 | shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); |
106 | r8a7790_add_dt_devices(); | ||
107 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 105 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
108 | 106 | ||
109 | lager_add_du_device(); | 107 | lager_add_du_device(); |
diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c index c3dfa6c89a9e..38d9cdd26587 100644 --- a/arch/arm/mach-shmobile/board-marzen-reference.c +++ b/arch/arm/mach-shmobile/board-marzen-reference.c | |||
@@ -37,18 +37,8 @@ static void __init marzen_init_timer(void) | |||
37 | clocksource_of_init(); | 37 | clocksource_of_init(); |
38 | } | 38 | } |
39 | 39 | ||
40 | /* | ||
41 | * This is a really crude hack to provide clkdev support to platform | ||
42 | * devices until they get moved to DT. | ||
43 | */ | ||
44 | static const struct clk_name clk_names[] __initconst = { | ||
45 | { "tmu0", "fck", "sh-tmu.0" }, | ||
46 | }; | ||
47 | |||
48 | static void __init marzen_init(void) | 40 | static void __init marzen_init(void) |
49 | { | 41 | { |
50 | shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); | ||
51 | r8a7779_add_standard_devices_dt(); | ||
52 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 42 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
53 | r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */ | 43 | r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */ |
54 | } | 44 | } |
diff --git a/arch/arm/mach-shmobile/r7s72100.h b/arch/arm/mach-shmobile/r7s72100.h index efb723c88dd0..321ae4e10128 100644 --- a/arch/arm/mach-shmobile/r7s72100.h +++ b/arch/arm/mach-shmobile/r7s72100.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef __ASM_R7S72100_H__ | 1 | #ifndef __ASM_R7S72100_H__ |
2 | #define __ASM_R7S72100_H__ | 2 | #define __ASM_R7S72100_H__ |
3 | 3 | ||
4 | void r7s72100_add_dt_devices(void); | ||
5 | void r7s72100_clock_init(void); | 4 | void r7s72100_clock_init(void); |
6 | 5 | ||
7 | #endif /* __ASM_R7S72100_H__ */ | 6 | #endif /* __ASM_R7S72100_H__ */ |
diff --git a/arch/arm/mach-shmobile/r8a7779.h b/arch/arm/mach-shmobile/r8a7779.h index 5415c719dc19..19f97046dd70 100644 --- a/arch/arm/mach-shmobile/r8a7779.h +++ b/arch/arm/mach-shmobile/r8a7779.h | |||
@@ -17,7 +17,6 @@ extern void r8a7779_map_io(void); | |||
17 | extern void r8a7779_earlytimer_init(void); | 17 | extern void r8a7779_earlytimer_init(void); |
18 | extern void r8a7779_add_early_devices(void); | 18 | extern void r8a7779_add_early_devices(void); |
19 | extern void r8a7779_add_standard_devices(void); | 19 | extern void r8a7779_add_standard_devices(void); |
20 | extern void r8a7779_add_standard_devices_dt(void); | ||
21 | extern void r8a7779_init_late(void); | 20 | extern void r8a7779_init_late(void); |
22 | extern u32 r8a7779_read_mode_pins(void); | 21 | extern u32 r8a7779_read_mode_pins(void); |
23 | extern void r8a7779_clock_init(void); | 22 | extern void r8a7779_clock_init(void); |
diff --git a/arch/arm/mach-shmobile/r8a7790.h b/arch/arm/mach-shmobile/r8a7790.h index 459827f1369b..388f0514d931 100644 --- a/arch/arm/mach-shmobile/r8a7790.h +++ b/arch/arm/mach-shmobile/r8a7790.h | |||
@@ -27,7 +27,6 @@ enum { | |||
27 | }; | 27 | }; |
28 | 28 | ||
29 | void r8a7790_add_standard_devices(void); | 29 | void r8a7790_add_standard_devices(void); |
30 | void r8a7790_add_dt_devices(void); | ||
31 | void r8a7790_clock_init(void); | 30 | void r8a7790_clock_init(void); |
32 | void r8a7790_pinmux_init(void); | 31 | void r8a7790_pinmux_init(void); |
33 | void r8a7790_pm_init(void); | 32 | void r8a7790_pm_init(void); |
diff --git a/arch/arm/mach-shmobile/r8a7791.h b/arch/arm/mach-shmobile/r8a7791.h index 86eae7bceb6f..c1bf7abefa5a 100644 --- a/arch/arm/mach-shmobile/r8a7791.h +++ b/arch/arm/mach-shmobile/r8a7791.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define __ASM_R8A7791_H__ | 2 | #define __ASM_R8A7791_H__ |
3 | 3 | ||
4 | void r8a7791_add_standard_devices(void); | 4 | void r8a7791_add_standard_devices(void); |
5 | void r8a7791_add_dt_devices(void); | ||
6 | void r8a7791_clock_init(void); | 5 | void r8a7791_clock_init(void); |
7 | void r8a7791_pinmux_init(void); | 6 | void r8a7791_pinmux_init(void); |
8 | void r8a7791_pm_init(void); | 7 | void r8a7791_pm_init(void); |
diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c index 8cdc25d146a9..46a93f73ee4a 100644 --- a/arch/arm/mach-shmobile/setup-r7s72100.c +++ b/arch/arm/mach-shmobile/setup-r7s72100.c | |||
@@ -18,32 +18,11 @@ | |||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/irq.h> | ||
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
23 | #include <linux/of_platform.h> | ||
24 | #include <linux/sh_timer.h> | ||
25 | 22 | ||
26 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
27 | 24 | ||
28 | #include "common.h" | 25 | #include "common.h" |
29 | #include "irqs.h" | ||
30 | #include "r7s72100.h" | ||
31 | |||
32 | static struct resource mtu2_resources[] __initdata = { | ||
33 | DEFINE_RES_MEM(0xfcff0000, 0x400), | ||
34 | DEFINE_RES_IRQ_NAMED(gic_iid(139), "tgi0a"), | ||
35 | }; | ||
36 | |||
37 | #define r7s72100_register_mtu2() \ | ||
38 | platform_device_register_resndata(NULL, "sh-mtu2", \ | ||
39 | -1, mtu2_resources, \ | ||
40 | ARRAY_SIZE(mtu2_resources), \ | ||
41 | NULL, 0) | ||
42 | |||
43 | void __init r7s72100_add_dt_devices(void) | ||
44 | { | ||
45 | r7s72100_register_mtu2(); | ||
46 | } | ||
47 | 26 | ||
48 | #ifdef CONFIG_USE_OF | 27 | #ifdef CONFIG_USE_OF |
49 | static const char *r7s72100_boards_compat_dt[] __initdata = { | 28 | static const char *r7s72100_boards_compat_dt[] __initdata = { |
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 6829cd19ea72..136078ab9407 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -641,7 +641,7 @@ static void __init r8a7779_register_hpb_dmae(void) | |||
641 | sizeof(dma_platform_data)); | 641 | sizeof(dma_platform_data)); |
642 | } | 642 | } |
643 | 643 | ||
644 | static struct platform_device *r8a7779_devices_dt[] __initdata = { | 644 | static struct platform_device *r8a7779_early_devices[] __initdata = { |
645 | &tmu0_device, | 645 | &tmu0_device, |
646 | }; | 646 | }; |
647 | 647 | ||
@@ -669,8 +669,8 @@ void __init r8a7779_add_standard_devices(void) | |||
669 | 669 | ||
670 | r8a7779_init_pm_domains(); | 670 | r8a7779_init_pm_domains(); |
671 | 671 | ||
672 | platform_add_devices(r8a7779_devices_dt, | 672 | platform_add_devices(r8a7779_early_devices, |
673 | ARRAY_SIZE(r8a7779_devices_dt)); | 673 | ARRAY_SIZE(r8a7779_early_devices)); |
674 | platform_add_devices(r8a7779_standard_devices, | 674 | platform_add_devices(r8a7779_standard_devices, |
675 | ARRAY_SIZE(r8a7779_standard_devices)); | 675 | ARRAY_SIZE(r8a7779_standard_devices)); |
676 | r8a7779_register_hpb_dmae(); | 676 | r8a7779_register_hpb_dmae(); |
@@ -678,8 +678,8 @@ void __init r8a7779_add_standard_devices(void) | |||
678 | 678 | ||
679 | void __init r8a7779_add_early_devices(void) | 679 | void __init r8a7779_add_early_devices(void) |
680 | { | 680 | { |
681 | early_platform_add_devices(r8a7779_devices_dt, | 681 | early_platform_add_devices(r8a7779_early_devices, |
682 | ARRAY_SIZE(r8a7779_devices_dt)); | 682 | ARRAY_SIZE(r8a7779_early_devices)); |
683 | 683 | ||
684 | /* Early serial console setup is not included here due to | 684 | /* Early serial console setup is not included here due to |
685 | * memory map collisions. The SCIF serial ports in r8a7779 | 685 | * memory map collisions. The SCIF serial ports in r8a7779 |
@@ -739,12 +739,6 @@ void __init r8a7779_init_irq_dt(void) | |||
739 | __raw_writel(0x003fee3f, INT2SMSKCR4); | 739 | __raw_writel(0x003fee3f, INT2SMSKCR4); |
740 | } | 740 | } |
741 | 741 | ||
742 | void __init r8a7779_add_standard_devices_dt(void) | ||
743 | { | ||
744 | platform_add_devices(r8a7779_devices_dt, | ||
745 | ARRAY_SIZE(r8a7779_devices_dt)); | ||
746 | } | ||
747 | |||
748 | #define MODEMR 0xffcc0020 | 742 | #define MODEMR 0xffcc0020 |
749 | 743 | ||
750 | u32 __init r8a7779_read_mode_pins(void) | 744 | u32 __init r8a7779_read_mode_pins(void) |
@@ -772,7 +766,6 @@ DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)") | |||
772 | .map_io = r8a7779_map_io, | 766 | .map_io = r8a7779_map_io, |
773 | .init_early = shmobile_init_delay, | 767 | .init_early = shmobile_init_delay, |
774 | .init_irq = r8a7779_init_irq_dt, | 768 | .init_irq = r8a7779_init_irq_dt, |
775 | .init_machine = r8a7779_add_standard_devices_dt, | ||
776 | .init_late = shmobile_init_late, | 769 | .init_late = shmobile_init_late, |
777 | .dt_compat = r8a7779_compat_dt, | 770 | .dt_compat = r8a7779_compat_dt, |
778 | MACHINE_END | 771 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index 0c12b01bb9e3..877fdeb985d0 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c | |||
@@ -282,11 +282,6 @@ static struct resource cmt0_resources[] = { | |||
282 | &cmt##idx##_platform_data, \ | 282 | &cmt##idx##_platform_data, \ |
283 | sizeof(struct sh_timer_config)) | 283 | sizeof(struct sh_timer_config)) |
284 | 284 | ||
285 | void __init r8a7790_add_dt_devices(void) | ||
286 | { | ||
287 | r8a7790_register_cmt(0); | ||
288 | } | ||
289 | |||
290 | void __init r8a7790_add_standard_devices(void) | 285 | void __init r8a7790_add_standard_devices(void) |
291 | { | 286 | { |
292 | r8a7790_register_scif(0); | 287 | r8a7790_register_scif(0); |
@@ -299,7 +294,7 @@ void __init r8a7790_add_standard_devices(void) | |||
299 | r8a7790_register_scif(7); | 294 | r8a7790_register_scif(7); |
300 | r8a7790_register_scif(8); | 295 | r8a7790_register_scif(8); |
301 | r8a7790_register_scif(9); | 296 | r8a7790_register_scif(9); |
302 | r8a7790_add_dt_devices(); | 297 | r8a7790_register_cmt(0); |
303 | r8a7790_register_irqc(0); | 298 | r8a7790_register_irqc(0); |
304 | r8a7790_register_thermal(); | 299 | r8a7790_register_thermal(); |
305 | r8a7790_register_i2c(0); | 300 | r8a7790_register_i2c(0); |
diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c index d47d8b16a43f..35d78639244f 100644 --- a/arch/arm/mach-shmobile/setup-r8a7791.c +++ b/arch/arm/mach-shmobile/setup-r8a7791.c | |||
@@ -182,11 +182,6 @@ static const struct resource thermal_resources[] __initconst = { | |||
182 | thermal_resources, \ | 182 | thermal_resources, \ |
183 | ARRAY_SIZE(thermal_resources)) | 183 | ARRAY_SIZE(thermal_resources)) |
184 | 184 | ||
185 | void __init r8a7791_add_dt_devices(void) | ||
186 | { | ||
187 | r8a7791_register_cmt(0); | ||
188 | } | ||
189 | |||
190 | void __init r8a7791_add_standard_devices(void) | 185 | void __init r8a7791_add_standard_devices(void) |
191 | { | 186 | { |
192 | r8a7791_register_scif(0); | 187 | r8a7791_register_scif(0); |
@@ -204,7 +199,7 @@ void __init r8a7791_add_standard_devices(void) | |||
204 | r8a7791_register_scif(12); | 199 | r8a7791_register_scif(12); |
205 | r8a7791_register_scif(13); | 200 | r8a7791_register_scif(13); |
206 | r8a7791_register_scif(14); | 201 | r8a7791_register_scif(14); |
207 | r8a7791_add_dt_devices(); | 202 | r8a7791_register_cmt(0); |
208 | r8a7791_register_irqc(0); | 203 | r8a7791_register_irqc(0); |
209 | r8a7791_register_thermal(); | 204 | r8a7791_register_thermal(); |
210 | } | 205 | } |