diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/setup-sh7785.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7785.c | 159 |
1 files changed, 108 insertions, 51 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c index 7f6c718b6c36..ef26ebda6e8b 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c | |||
@@ -16,6 +16,102 @@ | |||
16 | #include <linux/sh_timer.h> | 16 | #include <linux/sh_timer.h> |
17 | #include <asm/mmzone.h> | 17 | #include <asm/mmzone.h> |
18 | 18 | ||
19 | static struct plat_sci_port scif0_platform_data = { | ||
20 | .mapbase = 0xffea0000, | ||
21 | .flags = UPF_BOOT_AUTOCONF, | ||
22 | .type = PORT_SCIF, | ||
23 | .irqs = { 40, 40, 40, 40 }, | ||
24 | .clk = "scif_fck", | ||
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 = 0xffeb0000, | ||
37 | .flags = UPF_BOOT_AUTOCONF, | ||
38 | .type = PORT_SCIF, | ||
39 | .irqs = { 44, 44, 44, 44 }, | ||
40 | .clk = "scif_fck", | ||
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 = 0xffec0000, | ||
53 | .flags = UPF_BOOT_AUTOCONF, | ||
54 | .type = PORT_SCIF, | ||
55 | .irqs = { 60, 60, 60, 60 }, | ||
56 | .clk = "scif_fck", | ||
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 = 0xffed0000, | ||
69 | .flags = UPF_BOOT_AUTOCONF, | ||
70 | .type = PORT_SCIF, | ||
71 | .irqs = { 61, 61, 61, 61 }, | ||
72 | .clk = "scif_fck", | ||
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 | |||
83 | static struct plat_sci_port scif4_platform_data = { | ||
84 | .mapbase = 0xffee0000, | ||
85 | .flags = UPF_BOOT_AUTOCONF, | ||
86 | .type = PORT_SCIF, | ||
87 | .irqs = { 62, 62, 62, 62 }, | ||
88 | .clk = "scif_fck", | ||
89 | }; | ||
90 | |||
91 | static struct platform_device scif4_device = { | ||
92 | .name = "sh-sci", | ||
93 | .id = 4, | ||
94 | .dev = { | ||
95 | .platform_data = &scif4_platform_data, | ||
96 | }, | ||
97 | }; | ||
98 | |||
99 | static struct plat_sci_port scif5_platform_data = { | ||
100 | .mapbase = 0xffef0000, | ||
101 | .flags = UPF_BOOT_AUTOCONF, | ||
102 | .type = PORT_SCIF, | ||
103 | .irqs = { 63, 63, 63, 63 }, | ||
104 | .clk = "scif_fck", | ||
105 | }; | ||
106 | |||
107 | static struct platform_device scif5_device = { | ||
108 | .name = "sh-sci", | ||
109 | .id = 5, | ||
110 | .dev = { | ||
111 | .platform_data = &scif5_platform_data, | ||
112 | }, | ||
113 | }; | ||
114 | |||
19 | static struct sh_timer_config tmu0_platform_data = { | 115 | static struct sh_timer_config tmu0_platform_data = { |
20 | .name = "TMU0", | 116 | .name = "TMU0", |
21 | .channel_offset = 0x04, | 117 | .channel_offset = 0x04, |
@@ -198,64 +294,19 @@ static struct platform_device tmu5_device = { | |||
198 | .num_resources = ARRAY_SIZE(tmu5_resources), | 294 | .num_resources = ARRAY_SIZE(tmu5_resources), |
199 | }; | 295 | }; |
200 | 296 | ||
201 | static struct plat_sci_port sci_platform_data[] = { | ||
202 | { | ||
203 | .mapbase = 0xffea0000, | ||
204 | .flags = UPF_BOOT_AUTOCONF, | ||
205 | .type = PORT_SCIF, | ||
206 | .irqs = { 40, 40, 40, 40 }, | ||
207 | .clk = "scif_fck", | ||
208 | }, { | ||
209 | .mapbase = 0xffeb0000, | ||
210 | .flags = UPF_BOOT_AUTOCONF, | ||
211 | .type = PORT_SCIF, | ||
212 | .irqs = { 44, 44, 44, 44 }, | ||
213 | .clk = "scif_fck", | ||
214 | }, { | ||
215 | .mapbase = 0xffec0000, | ||
216 | .flags = UPF_BOOT_AUTOCONF, | ||
217 | .type = PORT_SCIF, | ||
218 | .irqs = { 60, 60, 60, 60 }, | ||
219 | .clk = "scif_fck", | ||
220 | }, { | ||
221 | .mapbase = 0xffed0000, | ||
222 | .flags = UPF_BOOT_AUTOCONF, | ||
223 | .type = PORT_SCIF, | ||
224 | .irqs = { 61, 61, 61, 61 }, | ||
225 | .clk = "scif_fck", | ||
226 | }, { | ||
227 | .mapbase = 0xffee0000, | ||
228 | .flags = UPF_BOOT_AUTOCONF, | ||
229 | .type = PORT_SCIF, | ||
230 | .irqs = { 62, 62, 62, 62 }, | ||
231 | .clk = "scif_fck", | ||
232 | }, { | ||
233 | .mapbase = 0xffef0000, | ||
234 | .flags = UPF_BOOT_AUTOCONF, | ||
235 | .type = PORT_SCIF, | ||
236 | .irqs = { 63, 63, 63, 63 }, | ||
237 | .clk = "scif_fck", | ||
238 | }, { | ||
239 | .flags = 0, | ||
240 | } | ||
241 | }; | ||
242 | |||
243 | static struct platform_device sci_device = { | ||
244 | .name = "sh-sci", | ||
245 | .id = -1, | ||
246 | .dev = { | ||
247 | .platform_data = sci_platform_data, | ||
248 | }, | ||
249 | }; | ||
250 | |||
251 | static struct platform_device *sh7785_devices[] __initdata = { | 297 | static struct platform_device *sh7785_devices[] __initdata = { |
298 | &scif0_device, | ||
299 | &scif1_device, | ||
300 | &scif2_device, | ||
301 | &scif3_device, | ||
302 | &scif4_device, | ||
303 | &scif5_device, | ||
252 | &tmu0_device, | 304 | &tmu0_device, |
253 | &tmu1_device, | 305 | &tmu1_device, |
254 | &tmu2_device, | 306 | &tmu2_device, |
255 | &tmu3_device, | 307 | &tmu3_device, |
256 | &tmu4_device, | 308 | &tmu4_device, |
257 | &tmu5_device, | 309 | &tmu5_device, |
258 | &sci_device, | ||
259 | }; | 310 | }; |
260 | 311 | ||
261 | static int __init sh7785_devices_setup(void) | 312 | static int __init sh7785_devices_setup(void) |
@@ -266,6 +317,12 @@ static int __init sh7785_devices_setup(void) | |||
266 | arch_initcall(sh7785_devices_setup); | 317 | arch_initcall(sh7785_devices_setup); |
267 | 318 | ||
268 | static struct platform_device *sh7785_early_devices[] __initdata = { | 319 | static struct platform_device *sh7785_early_devices[] __initdata = { |
320 | &scif0_device, | ||
321 | &scif1_device, | ||
322 | &scif2_device, | ||
323 | &scif3_device, | ||
324 | &scif4_device, | ||
325 | &scif5_device, | ||
269 | &tmu0_device, | 326 | &tmu0_device, |
270 | &tmu1_device, | 327 | &tmu1_device, |
271 | &tmu2_device, | 328 | &tmu2_device, |