blob: 12b437801f0021837521663f0baf7cb74e29f2d6 [file] [log] [blame]
Magnus Damm2b7eda62010-02-05 11:14:58 +00001/*
2 * sh7372 processor support
3 *
4 * Copyright (C) 2010 Magnus Damm
5 * Copyright (C) 2008 Yoshihiro Shimoda
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20#include <linux/kernel.h>
21#include <linux/init.h>
22#include <linux/interrupt.h>
23#include <linux/irq.h>
24#include <linux/platform_device.h>
Magnus Damm68224712011-04-28 03:21:00 +000025#include <linux/uio_driver.h>
Magnus Damm2b7eda62010-02-05 11:14:58 +000026#include <linux/delay.h>
27#include <linux/input.h>
28#include <linux/io.h>
29#include <linux/serial_sci.h>
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +000030#include <linux/sh_dma.h>
Magnus Damm2b7eda62010-02-05 11:14:58 +000031#include <linux/sh_intc.h>
32#include <linux/sh_timer.h>
Rafael J. Wysocki111058c2011-08-14 13:35:39 +020033#include <linux/pm_domain.h>
Magnus Damm2b7eda62010-02-05 11:14:58 +000034#include <mach/hardware.h>
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +000035#include <mach/sh7372.h>
Magnus Damm5d7220ec2012-02-29 21:37:19 +090036#include <mach/common.h>
37#include <asm/mach/map.h>
Magnus Damm2b7eda62010-02-05 11:14:58 +000038#include <asm/mach-types.h>
39#include <asm/mach/arch.h>
40
Magnus Damm5d7220ec2012-02-29 21:37:19 +090041static struct map_desc sh7372_io_desc[] __initdata = {
42 /* create a 1:1 entity map for 0xe6xxxxxx
43 * used by CPGA, INTC and PFC.
44 */
45 {
46 .virtual = 0xe6000000,
47 .pfn = __phys_to_pfn(0xe6000000),
48 .length = 256 << 20,
49 .type = MT_DEVICE_NONSHARED
50 },
51};
52
53void __init sh7372_map_io(void)
54{
55 iotable_init(sh7372_io_desc, ARRAY_SIZE(sh7372_io_desc));
56}
57
Magnus Damm33c96072010-05-20 14:41:00 +000058/* SCIFA0 */
Magnus Damm2b7eda62010-02-05 11:14:58 +000059static struct plat_sci_port scif0_platform_data = {
60 .mapbase = 0xe6c40000,
61 .flags = UPF_BOOT_AUTOCONF,
Paul Mundtf43dc232011-01-13 15:06:28 +090062 .scscr = SCSCR_RE | SCSCR_TE,
63 .scbrr_algo_id = SCBRR_ALGO_4,
Guennadi Liakhovetskieb6e8605e2010-05-23 16:39:17 +000064 .type = PORT_SCIFA,
Magnus Damm33c96072010-05-20 14:41:00 +000065 .irqs = { evt2irq(0x0c00), evt2irq(0x0c00),
66 evt2irq(0x0c00), evt2irq(0x0c00) },
Magnus Damm2b7eda62010-02-05 11:14:58 +000067};
68
69static struct platform_device scif0_device = {
70 .name = "sh-sci",
71 .id = 0,
72 .dev = {
73 .platform_data = &scif0_platform_data,
74 },
75};
76
Magnus Damm33c96072010-05-20 14:41:00 +000077/* SCIFA1 */
Magnus Damm2b7eda62010-02-05 11:14:58 +000078static struct plat_sci_port scif1_platform_data = {
79 .mapbase = 0xe6c50000,
80 .flags = UPF_BOOT_AUTOCONF,
Paul Mundtf43dc232011-01-13 15:06:28 +090081 .scscr = SCSCR_RE | SCSCR_TE,
82 .scbrr_algo_id = SCBRR_ALGO_4,
Guennadi Liakhovetskieb6e8605e2010-05-23 16:39:17 +000083 .type = PORT_SCIFA,
Magnus Damm33c96072010-05-20 14:41:00 +000084 .irqs = { evt2irq(0x0c20), evt2irq(0x0c20),
85 evt2irq(0x0c20), evt2irq(0x0c20) },
Magnus Damm2b7eda62010-02-05 11:14:58 +000086};
87
88static struct platform_device scif1_device = {
89 .name = "sh-sci",
90 .id = 1,
91 .dev = {
92 .platform_data = &scif1_platform_data,
93 },
94};
95
Magnus Damm33c96072010-05-20 14:41:00 +000096/* SCIFA2 */
Magnus Damm2b7eda62010-02-05 11:14:58 +000097static struct plat_sci_port scif2_platform_data = {
98 .mapbase = 0xe6c60000,
99 .flags = UPF_BOOT_AUTOCONF,
Paul Mundtf43dc232011-01-13 15:06:28 +0900100 .scscr = SCSCR_RE | SCSCR_TE,
101 .scbrr_algo_id = SCBRR_ALGO_4,
Guennadi Liakhovetskieb6e8605e2010-05-23 16:39:17 +0000102 .type = PORT_SCIFA,
Magnus Damm33c96072010-05-20 14:41:00 +0000103 .irqs = { evt2irq(0x0c40), evt2irq(0x0c40),
104 evt2irq(0x0c40), evt2irq(0x0c40) },
Magnus Damm2b7eda62010-02-05 11:14:58 +0000105};
106
107static struct platform_device scif2_device = {
108 .name = "sh-sci",
109 .id = 2,
110 .dev = {
111 .platform_data = &scif2_platform_data,
112 },
113};
114
Magnus Damm33c96072010-05-20 14:41:00 +0000115/* SCIFA3 */
Magnus Damm2b7eda62010-02-05 11:14:58 +0000116static struct plat_sci_port scif3_platform_data = {
117 .mapbase = 0xe6c70000,
118 .flags = UPF_BOOT_AUTOCONF,
Paul Mundtf43dc232011-01-13 15:06:28 +0900119 .scscr = SCSCR_RE | SCSCR_TE,
120 .scbrr_algo_id = SCBRR_ALGO_4,
Guennadi Liakhovetskieb6e8605e2010-05-23 16:39:17 +0000121 .type = PORT_SCIFA,
Magnus Damm33c96072010-05-20 14:41:00 +0000122 .irqs = { evt2irq(0x0c60), evt2irq(0x0c60),
123 evt2irq(0x0c60), evt2irq(0x0c60) },
Magnus Damm2b7eda62010-02-05 11:14:58 +0000124};
125
126static struct platform_device scif3_device = {
127 .name = "sh-sci",
128 .id = 3,
129 .dev = {
130 .platform_data = &scif3_platform_data,
131 },
132};
133
Magnus Damm33c96072010-05-20 14:41:00 +0000134/* SCIFA4 */
Magnus Damm2b7eda62010-02-05 11:14:58 +0000135static struct plat_sci_port scif4_platform_data = {
136 .mapbase = 0xe6c80000,
137 .flags = UPF_BOOT_AUTOCONF,
Paul Mundtf43dc232011-01-13 15:06:28 +0900138 .scscr = SCSCR_RE | SCSCR_TE,
139 .scbrr_algo_id = SCBRR_ALGO_4,
Guennadi Liakhovetskieb6e8605e2010-05-23 16:39:17 +0000140 .type = PORT_SCIFA,
Magnus Damm33c96072010-05-20 14:41:00 +0000141 .irqs = { evt2irq(0x0d20), evt2irq(0x0d20),
142 evt2irq(0x0d20), evt2irq(0x0d20) },
Magnus Damm2b7eda62010-02-05 11:14:58 +0000143};
144
145static struct platform_device scif4_device = {
146 .name = "sh-sci",
147 .id = 4,
148 .dev = {
149 .platform_data = &scif4_platform_data,
150 },
151};
152
Magnus Damm33c96072010-05-20 14:41:00 +0000153/* SCIFA5 */
Magnus Damm2b7eda62010-02-05 11:14:58 +0000154static struct plat_sci_port scif5_platform_data = {
155 .mapbase = 0xe6cb0000,
156 .flags = UPF_BOOT_AUTOCONF,
Paul Mundtf43dc232011-01-13 15:06:28 +0900157 .scscr = SCSCR_RE | SCSCR_TE,
158 .scbrr_algo_id = SCBRR_ALGO_4,
Guennadi Liakhovetskieb6e8605e2010-05-23 16:39:17 +0000159 .type = PORT_SCIFA,
Magnus Damm33c96072010-05-20 14:41:00 +0000160 .irqs = { evt2irq(0x0d40), evt2irq(0x0d40),
161 evt2irq(0x0d40), evt2irq(0x0d40) },
Magnus Damm2b7eda62010-02-05 11:14:58 +0000162};
163
164static struct platform_device scif5_device = {
165 .name = "sh-sci",
166 .id = 5,
167 .dev = {
168 .platform_data = &scif5_platform_data,
169 },
170};
171
Magnus Damm33c96072010-05-20 14:41:00 +0000172/* SCIFB */
Magnus Damm2b7eda62010-02-05 11:14:58 +0000173static struct plat_sci_port scif6_platform_data = {
174 .mapbase = 0xe6c30000,
175 .flags = UPF_BOOT_AUTOCONF,
Paul Mundtf43dc232011-01-13 15:06:28 +0900176 .scscr = SCSCR_RE | SCSCR_TE,
177 .scbrr_algo_id = SCBRR_ALGO_4,
Guennadi Liakhovetskieb6e8605e2010-05-23 16:39:17 +0000178 .type = PORT_SCIFB,
Magnus Damm33c96072010-05-20 14:41:00 +0000179 .irqs = { evt2irq(0x0d60), evt2irq(0x0d60),
180 evt2irq(0x0d60), evt2irq(0x0d60) },
Magnus Damm2b7eda62010-02-05 11:14:58 +0000181};
182
183static struct platform_device scif6_device = {
184 .name = "sh-sci",
185 .id = 6,
186 .dev = {
187 .platform_data = &scif6_platform_data,
188 },
189};
190
Kuninori Morimotoc1909cc2010-03-11 10:42:47 +0000191/* CMT */
Magnus Damm0ed61fc2011-06-30 09:22:50 +0000192static struct sh_timer_config cmt2_platform_data = {
193 .name = "CMT2",
194 .channel_offset = 0x40,
195 .timer_bit = 5,
Magnus Damm2b7eda62010-02-05 11:14:58 +0000196 .clockevent_rating = 125,
197 .clocksource_rating = 125,
198};
199
Magnus Damm0ed61fc2011-06-30 09:22:50 +0000200static struct resource cmt2_resources[] = {
Magnus Damm2b7eda62010-02-05 11:14:58 +0000201 [0] = {
Magnus Damm0ed61fc2011-06-30 09:22:50 +0000202 .name = "CMT2",
203 .start = 0xe6130040,
204 .end = 0xe613004b,
Magnus Damm2b7eda62010-02-05 11:14:58 +0000205 .flags = IORESOURCE_MEM,
206 },
207 [1] = {
Magnus Damm0ed61fc2011-06-30 09:22:50 +0000208 .start = evt2irq(0x0b80), /* CMT2 */
Magnus Damm2b7eda62010-02-05 11:14:58 +0000209 .flags = IORESOURCE_IRQ,
210 },
211};
212
Magnus Damm0ed61fc2011-06-30 09:22:50 +0000213static struct platform_device cmt2_device = {
Magnus Damm2b7eda62010-02-05 11:14:58 +0000214 .name = "sh_cmt",
Magnus Damm0ed61fc2011-06-30 09:22:50 +0000215 .id = 2,
Magnus Damm2b7eda62010-02-05 11:14:58 +0000216 .dev = {
Magnus Damm0ed61fc2011-06-30 09:22:50 +0000217 .platform_data = &cmt2_platform_data,
Magnus Damm2b7eda62010-02-05 11:14:58 +0000218 },
Magnus Damm0ed61fc2011-06-30 09:22:50 +0000219 .resource = cmt2_resources,
220 .num_resources = ARRAY_SIZE(cmt2_resources),
Magnus Damm2b7eda62010-02-05 11:14:58 +0000221};
222
Magnus Dammc6c049e2010-10-14 06:57:25 +0000223/* TMU */
224static struct sh_timer_config tmu00_platform_data = {
225 .name = "TMU00",
226 .channel_offset = 0x4,
227 .timer_bit = 0,
228 .clockevent_rating = 200,
229};
230
231static struct resource tmu00_resources[] = {
232 [0] = {
233 .name = "TMU00",
234 .start = 0xfff60008,
235 .end = 0xfff60013,
236 .flags = IORESOURCE_MEM,
237 },
238 [1] = {
239 .start = intcs_evt2irq(0xe80), /* TMU_TUNI0 */
240 .flags = IORESOURCE_IRQ,
241 },
242};
243
244static struct platform_device tmu00_device = {
245 .name = "sh_tmu",
246 .id = 0,
247 .dev = {
248 .platform_data = &tmu00_platform_data,
249 },
250 .resource = tmu00_resources,
251 .num_resources = ARRAY_SIZE(tmu00_resources),
252};
253
254static struct sh_timer_config tmu01_platform_data = {
255 .name = "TMU01",
256 .channel_offset = 0x10,
257 .timer_bit = 1,
258 .clocksource_rating = 200,
259};
260
261static struct resource tmu01_resources[] = {
262 [0] = {
263 .name = "TMU01",
264 .start = 0xfff60014,
265 .end = 0xfff6001f,
266 .flags = IORESOURCE_MEM,
267 },
268 [1] = {
269 .start = intcs_evt2irq(0xea0), /* TMU_TUNI1 */
270 .flags = IORESOURCE_IRQ,
271 },
272};
273
274static struct platform_device tmu01_device = {
275 .name = "sh_tmu",
276 .id = 1,
277 .dev = {
278 .platform_data = &tmu01_platform_data,
279 },
280 .resource = tmu01_resources,
281 .num_resources = ARRAY_SIZE(tmu01_resources),
282};
283
Kuninori Morimotoc1909cc2010-03-11 10:42:47 +0000284/* I2C */
285static struct resource iic0_resources[] = {
286 [0] = {
287 .name = "IIC0",
288 .start = 0xFFF20000,
289 .end = 0xFFF20425 - 1,
290 .flags = IORESOURCE_MEM,
291 },
292 [1] = {
Magnus Damm33c96072010-05-20 14:41:00 +0000293 .start = intcs_evt2irq(0xe00), /* IIC0_ALI0 */
294 .end = intcs_evt2irq(0xe60), /* IIC0_DTEI0 */
Kuninori Morimotoc1909cc2010-03-11 10:42:47 +0000295 .flags = IORESOURCE_IRQ,
296 },
297};
298
299static struct platform_device iic0_device = {
300 .name = "i2c-sh_mobile",
301 .id = 0, /* "i2c0" clock */
302 .num_resources = ARRAY_SIZE(iic0_resources),
303 .resource = iic0_resources,
304};
305
306static struct resource iic1_resources[] = {
307 [0] = {
308 .name = "IIC1",
309 .start = 0xE6C20000,
310 .end = 0xE6C20425 - 1,
311 .flags = IORESOURCE_MEM,
312 },
313 [1] = {
Magnus Damm33c96072010-05-20 14:41:00 +0000314 .start = evt2irq(0x780), /* IIC1_ALI1 */
315 .end = evt2irq(0x7e0), /* IIC1_DTEI1 */
Kuninori Morimotoc1909cc2010-03-11 10:42:47 +0000316 .flags = IORESOURCE_IRQ,
317 },
318};
319
320static struct platform_device iic1_device = {
321 .name = "i2c-sh_mobile",
322 .id = 1, /* "i2c1" clock */
323 .num_resources = ARRAY_SIZE(iic1_resources),
324 .resource = iic1_resources,
325};
326
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000327/* DMA */
328/* Transmit sizes and respective CHCR register values */
329enum {
330 XMIT_SZ_8BIT = 0,
331 XMIT_SZ_16BIT = 1,
332 XMIT_SZ_32BIT = 2,
333 XMIT_SZ_64BIT = 7,
334 XMIT_SZ_128BIT = 3,
335 XMIT_SZ_256BIT = 4,
336 XMIT_SZ_512BIT = 5,
337};
338
339/* log2(size / 8) - used to calculate number of transfers */
340#define TS_SHIFT { \
341 [XMIT_SZ_8BIT] = 0, \
342 [XMIT_SZ_16BIT] = 1, \
343 [XMIT_SZ_32BIT] = 2, \
344 [XMIT_SZ_64BIT] = 3, \
345 [XMIT_SZ_128BIT] = 4, \
346 [XMIT_SZ_256BIT] = 5, \
347 [XMIT_SZ_512BIT] = 6, \
348}
349
350#define TS_INDEX2VAL(i) ((((i) & 3) << 3) | \
351 (((i) & 0xc) << (20 - 2)))
352
353static const struct sh_dmae_slave_config sh7372_dmae_slaves[] = {
354 {
Guennadi Liakhovetski8d3e17b2010-05-23 16:39:24 +0000355 .slave_id = SHDMA_SLAVE_SCIF0_TX,
356 .addr = 0xe6c40020,
357 .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
358 .mid_rid = 0x21,
359 }, {
360 .slave_id = SHDMA_SLAVE_SCIF0_RX,
361 .addr = 0xe6c40024,
362 .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
363 .mid_rid = 0x22,
364 }, {
365 .slave_id = SHDMA_SLAVE_SCIF1_TX,
366 .addr = 0xe6c50020,
367 .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
368 .mid_rid = 0x25,
369 }, {
370 .slave_id = SHDMA_SLAVE_SCIF1_RX,
371 .addr = 0xe6c50024,
372 .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
373 .mid_rid = 0x26,
374 }, {
375 .slave_id = SHDMA_SLAVE_SCIF2_TX,
376 .addr = 0xe6c60020,
377 .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
378 .mid_rid = 0x29,
379 }, {
380 .slave_id = SHDMA_SLAVE_SCIF2_RX,
381 .addr = 0xe6c60024,
382 .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
383 .mid_rid = 0x2a,
384 }, {
385 .slave_id = SHDMA_SLAVE_SCIF3_TX,
386 .addr = 0xe6c70020,
387 .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
388 .mid_rid = 0x2d,
389 }, {
390 .slave_id = SHDMA_SLAVE_SCIF3_RX,
391 .addr = 0xe6c70024,
392 .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
393 .mid_rid = 0x2e,
394 }, {
395 .slave_id = SHDMA_SLAVE_SCIF4_TX,
396 .addr = 0xe6c80020,
397 .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
398 .mid_rid = 0x39,
399 }, {
400 .slave_id = SHDMA_SLAVE_SCIF4_RX,
401 .addr = 0xe6c80024,
402 .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
403 .mid_rid = 0x3a,
404 }, {
405 .slave_id = SHDMA_SLAVE_SCIF5_TX,
406 .addr = 0xe6cb0020,
407 .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
408 .mid_rid = 0x35,
409 }, {
410 .slave_id = SHDMA_SLAVE_SCIF5_RX,
411 .addr = 0xe6cb0024,
412 .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
413 .mid_rid = 0x36,
414 }, {
415 .slave_id = SHDMA_SLAVE_SCIF6_TX,
416 .addr = 0xe6c30040,
417 .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
418 .mid_rid = 0x3d,
419 }, {
420 .slave_id = SHDMA_SLAVE_SCIF6_RX,
421 .addr = 0xe6c30060,
422 .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
423 .mid_rid = 0x3e,
424 }, {
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000425 .slave_id = SHDMA_SLAVE_SDHI0_TX,
426 .addr = 0xe6850030,
427 .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT),
428 .mid_rid = 0xc1,
429 }, {
430 .slave_id = SHDMA_SLAVE_SDHI0_RX,
431 .addr = 0xe6850030,
432 .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT),
433 .mid_rid = 0xc2,
434 }, {
435 .slave_id = SHDMA_SLAVE_SDHI1_TX,
436 .addr = 0xe6860030,
437 .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT),
438 .mid_rid = 0xc9,
439 }, {
440 .slave_id = SHDMA_SLAVE_SDHI1_RX,
441 .addr = 0xe6860030,
442 .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT),
443 .mid_rid = 0xca,
444 }, {
445 .slave_id = SHDMA_SLAVE_SDHI2_TX,
446 .addr = 0xe6870030,
447 .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT),
448 .mid_rid = 0xcd,
449 }, {
450 .slave_id = SHDMA_SLAVE_SDHI2_RX,
451 .addr = 0xe6870030,
452 .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT),
453 .mid_rid = 0xce,
Guennadi Liakhovetski6d11dc12010-11-24 10:05:15 +0000454 }, {
455 .slave_id = SHDMA_SLAVE_MMCIF_TX,
456 .addr = 0xe6bd0034,
457 .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
458 .mid_rid = 0xd1,
459 }, {
460 .slave_id = SHDMA_SLAVE_MMCIF_RX,
461 .addr = 0xe6bd0034,
462 .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
463 .mid_rid = 0xd2,
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000464 },
465};
466
Guennadi Liakhovetskie08b8812012-01-04 15:34:21 +0100467#define SH7372_CHCLR 0x220
468
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000469static const struct sh_dmae_channel sh7372_dmae_channels[] = {
470 {
471 .offset = 0,
472 .dmars = 0,
473 .dmars_bit = 0,
Guennadi Liakhovetskie08b8812012-01-04 15:34:21 +0100474 .chclr_offset = SH7372_CHCLR + 0,
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000475 }, {
476 .offset = 0x10,
477 .dmars = 0,
478 .dmars_bit = 8,
Guennadi Liakhovetskie08b8812012-01-04 15:34:21 +0100479 .chclr_offset = SH7372_CHCLR + 0x10,
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000480 }, {
481 .offset = 0x20,
482 .dmars = 4,
483 .dmars_bit = 0,
Guennadi Liakhovetskie08b8812012-01-04 15:34:21 +0100484 .chclr_offset = SH7372_CHCLR + 0x20,
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000485 }, {
486 .offset = 0x30,
487 .dmars = 4,
488 .dmars_bit = 8,
Guennadi Liakhovetskie08b8812012-01-04 15:34:21 +0100489 .chclr_offset = SH7372_CHCLR + 0x30,
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000490 }, {
491 .offset = 0x50,
492 .dmars = 8,
493 .dmars_bit = 0,
Guennadi Liakhovetskie08b8812012-01-04 15:34:21 +0100494 .chclr_offset = SH7372_CHCLR + 0x50,
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000495 }, {
496 .offset = 0x60,
497 .dmars = 8,
498 .dmars_bit = 8,
Guennadi Liakhovetskie08b8812012-01-04 15:34:21 +0100499 .chclr_offset = SH7372_CHCLR + 0x60,
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000500 }
501};
502
503static const unsigned int ts_shift[] = TS_SHIFT;
504
505static struct sh_dmae_pdata dma_platform_data = {
506 .slave = sh7372_dmae_slaves,
507 .slave_num = ARRAY_SIZE(sh7372_dmae_slaves),
508 .channel = sh7372_dmae_channels,
509 .channel_num = ARRAY_SIZE(sh7372_dmae_channels),
510 .ts_low_shift = 3,
511 .ts_low_mask = 0x18,
512 .ts_high_shift = (20 - 2), /* 2 bits for shifted low TS */
513 .ts_high_mask = 0x00300000,
514 .ts_shift = ts_shift,
515 .ts_shift_num = ARRAY_SIZE(ts_shift),
516 .dmaor_init = DMAOR_DME,
Guennadi Liakhovetskie08b8812012-01-04 15:34:21 +0100517 .chclr_present = 1,
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000518};
519
520/* Resource order important! */
521static struct resource sh7372_dmae0_resources[] = {
522 {
523 /* Channel registers and DMAOR */
524 .start = 0xfe008020,
Guennadi Liakhovetskie08b8812012-01-04 15:34:21 +0100525 .end = 0xfe00828f,
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000526 .flags = IORESOURCE_MEM,
527 },
528 {
529 /* DMARSx */
530 .start = 0xfe009000,
531 .end = 0xfe00900b,
532 .flags = IORESOURCE_MEM,
533 },
534 {
Shimoda, Yoshihiro20052462012-01-10 14:21:31 +0900535 .name = "error_irq",
Magnus Dammf989ae52010-08-31 09:27:53 +0000536 .start = evt2irq(0x20c0),
537 .end = evt2irq(0x20c0),
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000538 .flags = IORESOURCE_IRQ,
539 },
540 {
541 /* IRQ for channels 0-5 */
Magnus Dammf989ae52010-08-31 09:27:53 +0000542 .start = evt2irq(0x2000),
543 .end = evt2irq(0x20a0),
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000544 .flags = IORESOURCE_IRQ,
545 },
546};
547
548/* Resource order important! */
549static struct resource sh7372_dmae1_resources[] = {
550 {
551 /* Channel registers and DMAOR */
552 .start = 0xfe018020,
Guennadi Liakhovetskie08b8812012-01-04 15:34:21 +0100553 .end = 0xfe01828f,
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000554 .flags = IORESOURCE_MEM,
555 },
556 {
557 /* DMARSx */
558 .start = 0xfe019000,
559 .end = 0xfe01900b,
560 .flags = IORESOURCE_MEM,
561 },
562 {
Shimoda, Yoshihiro20052462012-01-10 14:21:31 +0900563 .name = "error_irq",
Magnus Dammf989ae52010-08-31 09:27:53 +0000564 .start = evt2irq(0x21c0),
565 .end = evt2irq(0x21c0),
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000566 .flags = IORESOURCE_IRQ,
567 },
568 {
569 /* IRQ for channels 0-5 */
Magnus Dammf989ae52010-08-31 09:27:53 +0000570 .start = evt2irq(0x2100),
571 .end = evt2irq(0x21a0),
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000572 .flags = IORESOURCE_IRQ,
573 },
574};
575
576/* Resource order important! */
577static struct resource sh7372_dmae2_resources[] = {
578 {
579 /* Channel registers and DMAOR */
580 .start = 0xfe028020,
Guennadi Liakhovetskie08b8812012-01-04 15:34:21 +0100581 .end = 0xfe02828f,
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000582 .flags = IORESOURCE_MEM,
583 },
584 {
585 /* DMARSx */
586 .start = 0xfe029000,
587 .end = 0xfe02900b,
588 .flags = IORESOURCE_MEM,
589 },
590 {
Shimoda, Yoshihiro20052462012-01-10 14:21:31 +0900591 .name = "error_irq",
Magnus Dammf989ae52010-08-31 09:27:53 +0000592 .start = evt2irq(0x22c0),
593 .end = evt2irq(0x22c0),
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000594 .flags = IORESOURCE_IRQ,
595 },
596 {
597 /* IRQ for channels 0-5 */
Magnus Dammf989ae52010-08-31 09:27:53 +0000598 .start = evt2irq(0x2200),
599 .end = evt2irq(0x22a0),
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000600 .flags = IORESOURCE_IRQ,
601 },
602};
603
604static struct platform_device dma0_device = {
605 .name = "sh-dma-engine",
606 .id = 0,
607 .resource = sh7372_dmae0_resources,
608 .num_resources = ARRAY_SIZE(sh7372_dmae0_resources),
609 .dev = {
610 .platform_data = &dma_platform_data,
611 },
612};
613
614static struct platform_device dma1_device = {
615 .name = "sh-dma-engine",
616 .id = 1,
617 .resource = sh7372_dmae1_resources,
618 .num_resources = ARRAY_SIZE(sh7372_dmae1_resources),
619 .dev = {
620 .platform_data = &dma_platform_data,
621 },
622};
623
624static struct platform_device dma2_device = {
625 .name = "sh-dma-engine",
626 .id = 2,
627 .resource = sh7372_dmae2_resources,
628 .num_resources = ARRAY_SIZE(sh7372_dmae2_resources),
629 .dev = {
630 .platform_data = &dma_platform_data,
631 },
632};
633
Kuninori Morimotoafe48042011-06-17 08:21:10 +0000634/*
635 * USB-DMAC
636 */
637
638unsigned int usbts_shift[] = {3, 4, 5};
639
640enum {
641 XMIT_SZ_8BYTE = 0,
642 XMIT_SZ_16BYTE = 1,
643 XMIT_SZ_32BYTE = 2,
644};
645
646#define USBTS_INDEX2VAL(i) (((i) & 3) << 6)
647
648static const struct sh_dmae_channel sh7372_usb_dmae_channels[] = {
649 {
650 .offset = 0,
651 }, {
652 .offset = 0x20,
653 },
654};
655
656/* USB DMAC0 */
657static const struct sh_dmae_slave_config sh7372_usb_dmae0_slaves[] = {
658 {
659 .slave_id = SHDMA_SLAVE_USB0_TX,
660 .chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE),
661 }, {
662 .slave_id = SHDMA_SLAVE_USB0_RX,
663 .chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE),
664 },
665};
666
667static struct sh_dmae_pdata usb_dma0_platform_data = {
668 .slave = sh7372_usb_dmae0_slaves,
669 .slave_num = ARRAY_SIZE(sh7372_usb_dmae0_slaves),
670 .channel = sh7372_usb_dmae_channels,
671 .channel_num = ARRAY_SIZE(sh7372_usb_dmae_channels),
672 .ts_low_shift = 6,
673 .ts_low_mask = 0xc0,
674 .ts_high_shift = 0,
675 .ts_high_mask = 0,
676 .ts_shift = usbts_shift,
677 .ts_shift_num = ARRAY_SIZE(usbts_shift),
678 .dmaor_init = DMAOR_DME,
679 .chcr_offset = 0x14,
680 .chcr_ie_bit = 1 << 5,
681 .dmaor_is_32bit = 1,
682 .needs_tend_set = 1,
683 .no_dmars = 1,
Guennadi Liakhovetskic8ddf032012-01-18 10:14:29 +0100684 .slave_only = 1,
Kuninori Morimotoafe48042011-06-17 08:21:10 +0000685};
686
687static struct resource sh7372_usb_dmae0_resources[] = {
688 {
689 /* Channel registers and DMAOR */
690 .start = 0xe68a0020,
691 .end = 0xe68a0064 - 1,
692 .flags = IORESOURCE_MEM,
693 },
694 {
695 /* VCR/SWR/DMICR */
696 .start = 0xe68a0000,
697 .end = 0xe68a0014 - 1,
698 .flags = IORESOURCE_MEM,
699 },
700 {
701 /* IRQ for channels */
702 .start = evt2irq(0x0a00),
703 .end = evt2irq(0x0a00),
704 .flags = IORESOURCE_IRQ,
705 },
706};
707
708static struct platform_device usb_dma0_device = {
709 .name = "sh-dma-engine",
710 .id = 3,
711 .resource = sh7372_usb_dmae0_resources,
712 .num_resources = ARRAY_SIZE(sh7372_usb_dmae0_resources),
713 .dev = {
714 .platform_data = &usb_dma0_platform_data,
715 },
716};
717
718/* USB DMAC1 */
719static const struct sh_dmae_slave_config sh7372_usb_dmae1_slaves[] = {
720 {
721 .slave_id = SHDMA_SLAVE_USB1_TX,
722 .chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE),
723 }, {
724 .slave_id = SHDMA_SLAVE_USB1_RX,
725 .chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE),
726 },
727};
728
729static struct sh_dmae_pdata usb_dma1_platform_data = {
730 .slave = sh7372_usb_dmae1_slaves,
731 .slave_num = ARRAY_SIZE(sh7372_usb_dmae1_slaves),
732 .channel = sh7372_usb_dmae_channels,
733 .channel_num = ARRAY_SIZE(sh7372_usb_dmae_channels),
734 .ts_low_shift = 6,
735 .ts_low_mask = 0xc0,
736 .ts_high_shift = 0,
737 .ts_high_mask = 0,
738 .ts_shift = usbts_shift,
739 .ts_shift_num = ARRAY_SIZE(usbts_shift),
740 .dmaor_init = DMAOR_DME,
741 .chcr_offset = 0x14,
742 .chcr_ie_bit = 1 << 5,
743 .dmaor_is_32bit = 1,
744 .needs_tend_set = 1,
745 .no_dmars = 1,
Guennadi Liakhovetskic8ddf032012-01-18 10:14:29 +0100746 .slave_only = 1,
Kuninori Morimotoafe48042011-06-17 08:21:10 +0000747};
748
749static struct resource sh7372_usb_dmae1_resources[] = {
750 {
751 /* Channel registers and DMAOR */
752 .start = 0xe68c0020,
753 .end = 0xe68c0064 - 1,
754 .flags = IORESOURCE_MEM,
755 },
756 {
757 /* VCR/SWR/DMICR */
758 .start = 0xe68c0000,
759 .end = 0xe68c0014 - 1,
760 .flags = IORESOURCE_MEM,
761 },
762 {
763 /* IRQ for channels */
764 .start = evt2irq(0x1d00),
765 .end = evt2irq(0x1d00),
766 .flags = IORESOURCE_IRQ,
767 },
768};
769
770static struct platform_device usb_dma1_device = {
771 .name = "sh-dma-engine",
772 .id = 4,
773 .resource = sh7372_usb_dmae1_resources,
774 .num_resources = ARRAY_SIZE(sh7372_usb_dmae1_resources),
775 .dev = {
776 .platform_data = &usb_dma1_platform_data,
777 },
778};
779
Magnus Damm68224712011-04-28 03:21:00 +0000780/* VPU */
781static struct uio_info vpu_platform_data = {
782 .name = "VPU5HG",
783 .version = "0",
784 .irq = intcs_evt2irq(0x980),
785};
786
787static struct resource vpu_resources[] = {
788 [0] = {
789 .name = "VPU",
790 .start = 0xfe900000,
791 .end = 0xfe900157,
792 .flags = IORESOURCE_MEM,
793 },
794};
795
796static struct platform_device vpu_device = {
797 .name = "uio_pdrv_genirq",
798 .id = 0,
799 .dev = {
800 .platform_data = &vpu_platform_data,
801 },
802 .resource = vpu_resources,
803 .num_resources = ARRAY_SIZE(vpu_resources),
804};
805
806/* VEU0 */
807static struct uio_info veu0_platform_data = {
808 .name = "VEU0",
809 .version = "0",
810 .irq = intcs_evt2irq(0x700),
811};
812
813static struct resource veu0_resources[] = {
814 [0] = {
815 .name = "VEU0",
816 .start = 0xfe920000,
817 .end = 0xfe9200cb,
818 .flags = IORESOURCE_MEM,
819 },
820};
821
822static struct platform_device veu0_device = {
823 .name = "uio_pdrv_genirq",
824 .id = 1,
825 .dev = {
826 .platform_data = &veu0_platform_data,
827 },
828 .resource = veu0_resources,
829 .num_resources = ARRAY_SIZE(veu0_resources),
830};
831
832/* VEU1 */
833static struct uio_info veu1_platform_data = {
834 .name = "VEU1",
835 .version = "0",
836 .irq = intcs_evt2irq(0x720),
837};
838
839static struct resource veu1_resources[] = {
840 [0] = {
841 .name = "VEU1",
842 .start = 0xfe924000,
843 .end = 0xfe9240cb,
844 .flags = IORESOURCE_MEM,
845 },
846};
847
848static struct platform_device veu1_device = {
849 .name = "uio_pdrv_genirq",
850 .id = 2,
851 .dev = {
852 .platform_data = &veu1_platform_data,
853 },
854 .resource = veu1_resources,
855 .num_resources = ARRAY_SIZE(veu1_resources),
856};
857
858/* VEU2 */
859static struct uio_info veu2_platform_data = {
860 .name = "VEU2",
861 .version = "0",
862 .irq = intcs_evt2irq(0x740),
863};
864
865static struct resource veu2_resources[] = {
866 [0] = {
867 .name = "VEU2",
868 .start = 0xfe928000,
869 .end = 0xfe928307,
870 .flags = IORESOURCE_MEM,
871 },
872};
873
874static struct platform_device veu2_device = {
875 .name = "uio_pdrv_genirq",
876 .id = 3,
877 .dev = {
878 .platform_data = &veu2_platform_data,
879 },
880 .resource = veu2_resources,
881 .num_resources = ARRAY_SIZE(veu2_resources),
882};
883
884/* VEU3 */
885static struct uio_info veu3_platform_data = {
886 .name = "VEU3",
887 .version = "0",
888 .irq = intcs_evt2irq(0x760),
889};
890
891static struct resource veu3_resources[] = {
892 [0] = {
893 .name = "VEU3",
894 .start = 0xfe92c000,
895 .end = 0xfe92c307,
896 .flags = IORESOURCE_MEM,
897 },
898};
899
900static struct platform_device veu3_device = {
901 .name = "uio_pdrv_genirq",
902 .id = 4,
903 .dev = {
904 .platform_data = &veu3_platform_data,
905 },
906 .resource = veu3_resources,
907 .num_resources = ARRAY_SIZE(veu3_resources),
908};
909
910/* JPU */
911static struct uio_info jpu_platform_data = {
912 .name = "JPU",
913 .version = "0",
914 .irq = intcs_evt2irq(0x560),
915};
916
917static struct resource jpu_resources[] = {
918 [0] = {
919 .name = "JPU",
920 .start = 0xfe980000,
921 .end = 0xfe9902d3,
922 .flags = IORESOURCE_MEM,
923 },
924};
925
926static struct platform_device jpu_device = {
927 .name = "uio_pdrv_genirq",
928 .id = 5,
929 .dev = {
930 .platform_data = &jpu_platform_data,
931 },
932 .resource = jpu_resources,
933 .num_resources = ARRAY_SIZE(jpu_resources),
934};
935
936/* SPU2DSP0 */
937static struct uio_info spu0_platform_data = {
938 .name = "SPU2DSP0",
939 .version = "0",
940 .irq = evt2irq(0x1800),
941};
942
943static struct resource spu0_resources[] = {
944 [0] = {
945 .name = "SPU2DSP0",
946 .start = 0xfe200000,
947 .end = 0xfe2fffff,
948 .flags = IORESOURCE_MEM,
949 },
950};
951
952static struct platform_device spu0_device = {
953 .name = "uio_pdrv_genirq",
954 .id = 6,
955 .dev = {
956 .platform_data = &spu0_platform_data,
957 },
958 .resource = spu0_resources,
959 .num_resources = ARRAY_SIZE(spu0_resources),
960};
961
962/* SPU2DSP1 */
963static struct uio_info spu1_platform_data = {
964 .name = "SPU2DSP1",
965 .version = "0",
966 .irq = evt2irq(0x1820),
967};
968
969static struct resource spu1_resources[] = {
970 [0] = {
971 .name = "SPU2DSP1",
972 .start = 0xfe300000,
973 .end = 0xfe3fffff,
974 .flags = IORESOURCE_MEM,
975 },
976};
977
978static struct platform_device spu1_device = {
979 .name = "uio_pdrv_genirq",
980 .id = 7,
981 .dev = {
982 .platform_data = &spu1_platform_data,
983 },
984 .resource = spu1_resources,
985 .num_resources = ARRAY_SIZE(spu1_resources),
986};
987
Magnus Damm2b7eda62010-02-05 11:14:58 +0000988static struct platform_device *sh7372_early_devices[] __initdata = {
989 &scif0_device,
990 &scif1_device,
991 &scif2_device,
992 &scif3_device,
993 &scif4_device,
994 &scif5_device,
995 &scif6_device,
Magnus Damm0ed61fc2011-06-30 09:22:50 +0000996 &cmt2_device,
Magnus Dammc6c049e2010-10-14 06:57:25 +0000997 &tmu00_device,
998 &tmu01_device,
Magnus Damm934e4072010-10-13 07:22:11 +0000999};
1000
1001static struct platform_device *sh7372_late_devices[] __initdata = {
Kuninori Morimotoc1909cc2010-03-11 10:42:47 +00001002 &iic0_device,
1003 &iic1_device,
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +00001004 &dma0_device,
1005 &dma1_device,
1006 &dma2_device,
Kuninori Morimotoafe48042011-06-17 08:21:10 +00001007 &usb_dma0_device,
1008 &usb_dma1_device,
Magnus Damm68224712011-04-28 03:21:00 +00001009 &vpu_device,
1010 &veu0_device,
1011 &veu1_device,
1012 &veu2_device,
1013 &veu3_device,
1014 &jpu_device,
1015 &spu0_device,
1016 &spu1_device,
Magnus Damm2b7eda62010-02-05 11:14:58 +00001017};
1018
1019void __init sh7372_add_standard_devices(void)
1020{
Magnus Damm96f79342011-07-01 22:14:34 +02001021 sh7372_init_pm_domain(&sh7372_a4lc);
Kuninori Morimotoc1ba5bb2011-07-10 10:12:08 +02001022 sh7372_init_pm_domain(&sh7372_a4mp);
Magnus Dammd24771d2011-07-10 10:38:22 +02001023 sh7372_init_pm_domain(&sh7372_d4);
Magnus Damm382414b2011-10-19 23:52:50 +02001024 sh7372_init_pm_domain(&sh7372_a4r);
Magnus Damm33afebf2011-07-01 22:14:45 +02001025 sh7372_init_pm_domain(&sh7372_a3rv);
Magnus Damm082517a2011-07-01 22:14:53 +02001026 sh7372_init_pm_domain(&sh7372_a3ri);
Magnus Dammf7dadb32011-12-23 01:23:07 +01001027 sh7372_init_pm_domain(&sh7372_a4s);
Magnus Dammd93f5cd2011-10-19 23:52:41 +02001028 sh7372_init_pm_domain(&sh7372_a3sp);
Magnus Dammf7dadb32011-12-23 01:23:07 +01001029 sh7372_init_pm_domain(&sh7372_a3sg);
Magnus Damm96f79342011-07-01 22:14:34 +02001030
Rafael J. Wysocki111058c2011-08-14 13:35:39 +02001031 sh7372_pm_add_subdomain(&sh7372_a4lc, &sh7372_a3rv);
Magnus Damm382414b2011-10-19 23:52:50 +02001032 sh7372_pm_add_subdomain(&sh7372_a4r, &sh7372_a4lc);
Rafael J. Wysocki111058c2011-08-14 13:35:39 +02001033
Magnus Dammf7dadb32011-12-23 01:23:07 +01001034 sh7372_pm_add_subdomain(&sh7372_a4s, &sh7372_a3sg);
1035 sh7372_pm_add_subdomain(&sh7372_a4s, &sh7372_a3sp);
1036
Magnus Damm2b7eda62010-02-05 11:14:58 +00001037 platform_add_devices(sh7372_early_devices,
1038 ARRAY_SIZE(sh7372_early_devices));
Magnus Damm934e4072010-10-13 07:22:11 +00001039
1040 platform_add_devices(sh7372_late_devices,
1041 ARRAY_SIZE(sh7372_late_devices));
Magnus Damm33afebf2011-07-01 22:14:45 +02001042
1043 sh7372_add_device_to_domain(&sh7372_a3rv, &vpu_device);
Kuninori Morimotoc1ba5bb2011-07-10 10:12:08 +02001044 sh7372_add_device_to_domain(&sh7372_a4mp, &spu0_device);
1045 sh7372_add_device_to_domain(&sh7372_a4mp, &spu1_device);
Magnus Dammd93f5cd2011-10-19 23:52:41 +02001046 sh7372_add_device_to_domain(&sh7372_a3sp, &scif0_device);
1047 sh7372_add_device_to_domain(&sh7372_a3sp, &scif1_device);
1048 sh7372_add_device_to_domain(&sh7372_a3sp, &scif2_device);
1049 sh7372_add_device_to_domain(&sh7372_a3sp, &scif3_device);
1050 sh7372_add_device_to_domain(&sh7372_a3sp, &scif4_device);
1051 sh7372_add_device_to_domain(&sh7372_a3sp, &scif5_device);
1052 sh7372_add_device_to_domain(&sh7372_a3sp, &scif6_device);
1053 sh7372_add_device_to_domain(&sh7372_a3sp, &iic1_device);
1054 sh7372_add_device_to_domain(&sh7372_a3sp, &dma0_device);
1055 sh7372_add_device_to_domain(&sh7372_a3sp, &dma1_device);
1056 sh7372_add_device_to_domain(&sh7372_a3sp, &dma2_device);
1057 sh7372_add_device_to_domain(&sh7372_a3sp, &usb_dma0_device);
1058 sh7372_add_device_to_domain(&sh7372_a3sp, &usb_dma1_device);
Magnus Damm382414b2011-10-19 23:52:50 +02001059 sh7372_add_device_to_domain(&sh7372_a4r, &iic0_device);
1060 sh7372_add_device_to_domain(&sh7372_a4r, &veu0_device);
1061 sh7372_add_device_to_domain(&sh7372_a4r, &veu1_device);
1062 sh7372_add_device_to_domain(&sh7372_a4r, &veu2_device);
1063 sh7372_add_device_to_domain(&sh7372_a4r, &veu3_device);
1064 sh7372_add_device_to_domain(&sh7372_a4r, &jpu_device);
Magnus Damm2b7eda62010-02-05 11:14:58 +00001065}
1066
Magnus Damm2b7eda62010-02-05 11:14:58 +00001067void __init sh7372_add_early_devices(void)
1068{
Magnus Damm2b7eda62010-02-05 11:14:58 +00001069 early_platform_add_devices(sh7372_early_devices,
1070 ARRAY_SIZE(sh7372_early_devices));
Magnus Damm5d7220ec2012-02-29 21:37:19 +09001071
1072 /* setup early console here as well */
1073 shmobile_setup_console();
Magnus Damm2b7eda62010-02-05 11:14:58 +00001074}