diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/setup-sh7343.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7343.c | 112 |
1 files changed, 73 insertions, 39 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c index ac4d5672ec1a..45eb1bfd42c9 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c | |||
@@ -15,6 +15,71 @@ | |||
15 | #include <linux/sh_timer.h> | 15 | #include <linux/sh_timer.h> |
16 | #include <asm/clock.h> | 16 | #include <asm/clock.h> |
17 | 17 | ||
18 | /* Serial */ | ||
19 | static struct plat_sci_port scif0_platform_data = { | ||
20 | .mapbase = 0xffe00000, | ||
21 | .flags = UPF_BOOT_AUTOCONF, | ||
22 | .type = PORT_SCIF, | ||
23 | .irqs = { 80, 80, 80, 80 }, | ||
24 | .clk = "scif0", | ||
25 | }; | ||
26 | |||
27 | static struct platform_device scif0_device = { | ||
28 | .name = "sh-sci", | ||
29 | .id = 0, | ||
30 | .dev = { | ||
31 | .platform_data = &scif0_platform_data, | ||
32 | }, | ||
33 | }; | ||
34 | |||
35 | static struct plat_sci_port scif1_platform_data = { | ||
36 | .mapbase = 0xffe10000, | ||
37 | .flags = UPF_BOOT_AUTOCONF, | ||
38 | .type = PORT_SCIF, | ||
39 | .irqs = { 81, 81, 81, 81 }, | ||
40 | .clk = "scif1", | ||
41 | }; | ||
42 | |||
43 | static struct platform_device scif1_device = { | ||
44 | .name = "sh-sci", | ||
45 | .id = 1, | ||
46 | .dev = { | ||
47 | .platform_data = &scif1_platform_data, | ||
48 | }, | ||
49 | }; | ||
50 | |||
51 | static struct plat_sci_port scif2_platform_data = { | ||
52 | .mapbase = 0xffe20000, | ||
53 | .flags = UPF_BOOT_AUTOCONF, | ||
54 | .type = PORT_SCIF, | ||
55 | .irqs = { 82, 82, 82, 82 }, | ||
56 | .clk = "scif2", | ||
57 | }; | ||
58 | |||
59 | static struct platform_device scif2_device = { | ||
60 | .name = "sh-sci", | ||
61 | .id = 2, | ||
62 | .dev = { | ||
63 | .platform_data = &scif2_platform_data, | ||
64 | }, | ||
65 | }; | ||
66 | |||
67 | static struct plat_sci_port scif3_platform_data = { | ||
68 | .mapbase = 0xffe30000, | ||
69 | .flags = UPF_BOOT_AUTOCONF, | ||
70 | .type = PORT_SCIF, | ||
71 | .irqs = { 83, 83, 83, 83 }, | ||
72 | .clk = "scif3", | ||
73 | }; | ||
74 | |||
75 | static struct platform_device scif3_device = { | ||
76 | .name = "sh-sci", | ||
77 | .id = 3, | ||
78 | .dev = { | ||
79 | .platform_data = &scif3_platform_data, | ||
80 | }, | ||
81 | }; | ||
82 | |||
18 | static struct resource iic0_resources[] = { | 83 | static struct resource iic0_resources[] = { |
19 | [0] = { | 84 | [0] = { |
20 | .name = "IIC0", | 85 | .name = "IIC0", |
@@ -265,52 +330,17 @@ static struct platform_device tmu2_device = { | |||
265 | .num_resources = ARRAY_SIZE(tmu2_resources), | 330 | .num_resources = ARRAY_SIZE(tmu2_resources), |
266 | }; | 331 | }; |
267 | 332 | ||
268 | static struct plat_sci_port sci_platform_data[] = { | ||
269 | { | ||
270 | .mapbase = 0xffe00000, | ||
271 | .flags = UPF_BOOT_AUTOCONF, | ||
272 | .type = PORT_SCIF, | ||
273 | .irqs = { 80, 80, 80, 80 }, | ||
274 | .clk = "scif0", | ||
275 | }, { | ||
276 | .mapbase = 0xffe10000, | ||
277 | .flags = UPF_BOOT_AUTOCONF, | ||
278 | .type = PORT_SCIF, | ||
279 | .irqs = { 81, 81, 81, 81 }, | ||
280 | .clk = "scif1", | ||
281 | }, { | ||
282 | .mapbase = 0xffe20000, | ||
283 | .flags = UPF_BOOT_AUTOCONF, | ||
284 | .type = PORT_SCIF, | ||
285 | .irqs = { 82, 82, 82, 82 }, | ||
286 | .clk = "scif2", | ||
287 | }, { | ||
288 | .mapbase = 0xffe30000, | ||
289 | .flags = UPF_BOOT_AUTOCONF, | ||
290 | .type = PORT_SCIF, | ||
291 | .irqs = { 83, 83, 83, 83 }, | ||
292 | .clk = "scif3", | ||
293 | }, { | ||
294 | .flags = 0, | ||
295 | } | ||
296 | }; | ||
297 | |||
298 | static struct platform_device sci_device = { | ||
299 | .name = "sh-sci", | ||
300 | .id = -1, | ||
301 | .dev = { | ||
302 | .platform_data = sci_platform_data, | ||
303 | }, | ||
304 | }; | ||
305 | |||
306 | static struct platform_device *sh7343_devices[] __initdata = { | 333 | static struct platform_device *sh7343_devices[] __initdata = { |
334 | &scif0_device, | ||
335 | &scif1_device, | ||
336 | &scif2_device, | ||
337 | &scif3_device, | ||
307 | &cmt_device, | 338 | &cmt_device, |
308 | &tmu0_device, | 339 | &tmu0_device, |
309 | &tmu1_device, | 340 | &tmu1_device, |
310 | &tmu2_device, | 341 | &tmu2_device, |
311 | &iic0_device, | 342 | &iic0_device, |
312 | &iic1_device, | 343 | &iic1_device, |
313 | &sci_device, | ||
314 | &vpu_device, | 344 | &vpu_device, |
315 | &veu_device, | 345 | &veu_device, |
316 | &jpu_device, | 346 | &jpu_device, |
@@ -328,6 +358,10 @@ static int __init sh7343_devices_setup(void) | |||
328 | arch_initcall(sh7343_devices_setup); | 358 | arch_initcall(sh7343_devices_setup); |
329 | 359 | ||
330 | static struct platform_device *sh7343_early_devices[] __initdata = { | 360 | static struct platform_device *sh7343_early_devices[] __initdata = { |
361 | &scif0_device, | ||
362 | &scif1_device, | ||
363 | &scif2_device, | ||
364 | &scif3_device, | ||
331 | &cmt_device, | 365 | &cmt_device, |
332 | &tmu0_device, | 366 | &tmu0_device, |
333 | &tmu1_device, | 367 | &tmu1_device, |