diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/setup-sh7366.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 58 |
1 files changed, 21 insertions, 37 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c index d4ee429032b1..f96b7eeb21eb 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c | |||
@@ -18,6 +18,23 @@ | |||
18 | #include <linux/usb/r8a66597.h> | 18 | #include <linux/usb/r8a66597.h> |
19 | #include <asm/clock.h> | 19 | #include <asm/clock.h> |
20 | 20 | ||
21 | static struct plat_sci_port scif0_platform_data = { | ||
22 | .mapbase = 0xffe00000, | ||
23 | .flags = UPF_BOOT_AUTOCONF, | ||
24 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, | ||
25 | .scbrr_algo_id = SCBRR_ALGO_2, | ||
26 | .type = PORT_SCIF, | ||
27 | .irqs = { 80, 80, 80, 80 }, | ||
28 | }; | ||
29 | |||
30 | static struct platform_device scif0_device = { | ||
31 | .name = "sh-sci", | ||
32 | .id = 0, | ||
33 | .dev = { | ||
34 | .platform_data = &scif0_platform_data, | ||
35 | }, | ||
36 | }; | ||
37 | |||
21 | static struct resource iic_resources[] = { | 38 | static struct resource iic_resources[] = { |
22 | [0] = { | 39 | [0] = { |
23 | .name = "IIC", | 40 | .name = "IIC", |
@@ -40,7 +57,7 @@ static struct platform_device iic_device = { | |||
40 | }; | 57 | }; |
41 | 58 | ||
42 | static struct r8a66597_platdata r8a66597_data = { | 59 | static struct r8a66597_platdata r8a66597_data = { |
43 | /* This set zero to all members */ | 60 | .on_chip = 1, |
44 | }; | 61 | }; |
45 | 62 | ||
46 | static struct resource usb_host_resources[] = { | 63 | static struct resource usb_host_resources[] = { |
@@ -153,17 +170,14 @@ static struct platform_device veu1_device = { | |||
153 | }; | 170 | }; |
154 | 171 | ||
155 | static struct sh_timer_config cmt_platform_data = { | 172 | static struct sh_timer_config cmt_platform_data = { |
156 | .name = "CMT", | ||
157 | .channel_offset = 0x60, | 173 | .channel_offset = 0x60, |
158 | .timer_bit = 5, | 174 | .timer_bit = 5, |
159 | .clk = "cmt0", | ||
160 | .clockevent_rating = 125, | 175 | .clockevent_rating = 125, |
161 | .clocksource_rating = 200, | 176 | .clocksource_rating = 200, |
162 | }; | 177 | }; |
163 | 178 | ||
164 | static struct resource cmt_resources[] = { | 179 | static struct resource cmt_resources[] = { |
165 | [0] = { | 180 | [0] = { |
166 | .name = "CMT", | ||
167 | .start = 0x044a0060, | 181 | .start = 0x044a0060, |
168 | .end = 0x044a006b, | 182 | .end = 0x044a006b, |
169 | .flags = IORESOURCE_MEM, | 183 | .flags = IORESOURCE_MEM, |
@@ -185,16 +199,13 @@ static struct platform_device cmt_device = { | |||
185 | }; | 199 | }; |
186 | 200 | ||
187 | static struct sh_timer_config tmu0_platform_data = { | 201 | static struct sh_timer_config tmu0_platform_data = { |
188 | .name = "TMU0", | ||
189 | .channel_offset = 0x04, | 202 | .channel_offset = 0x04, |
190 | .timer_bit = 0, | 203 | .timer_bit = 0, |
191 | .clk = "tmu0", | ||
192 | .clockevent_rating = 200, | 204 | .clockevent_rating = 200, |
193 | }; | 205 | }; |
194 | 206 | ||
195 | static struct resource tmu0_resources[] = { | 207 | static struct resource tmu0_resources[] = { |
196 | [0] = { | 208 | [0] = { |
197 | .name = "TMU0", | ||
198 | .start = 0xffd80008, | 209 | .start = 0xffd80008, |
199 | .end = 0xffd80013, | 210 | .end = 0xffd80013, |
200 | .flags = IORESOURCE_MEM, | 211 | .flags = IORESOURCE_MEM, |
@@ -216,16 +227,13 @@ static struct platform_device tmu0_device = { | |||
216 | }; | 227 | }; |
217 | 228 | ||
218 | static struct sh_timer_config tmu1_platform_data = { | 229 | static struct sh_timer_config tmu1_platform_data = { |
219 | .name = "TMU1", | ||
220 | .channel_offset = 0x10, | 230 | .channel_offset = 0x10, |
221 | .timer_bit = 1, | 231 | .timer_bit = 1, |
222 | .clk = "tmu0", | ||
223 | .clocksource_rating = 200, | 232 | .clocksource_rating = 200, |
224 | }; | 233 | }; |
225 | 234 | ||
226 | static struct resource tmu1_resources[] = { | 235 | static struct resource tmu1_resources[] = { |
227 | [0] = { | 236 | [0] = { |
228 | .name = "TMU1", | ||
229 | .start = 0xffd80014, | 237 | .start = 0xffd80014, |
230 | .end = 0xffd8001f, | 238 | .end = 0xffd8001f, |
231 | .flags = IORESOURCE_MEM, | 239 | .flags = IORESOURCE_MEM, |
@@ -247,15 +255,12 @@ static struct platform_device tmu1_device = { | |||
247 | }; | 255 | }; |
248 | 256 | ||
249 | static struct sh_timer_config tmu2_platform_data = { | 257 | static struct sh_timer_config tmu2_platform_data = { |
250 | .name = "TMU2", | ||
251 | .channel_offset = 0x1c, | 258 | .channel_offset = 0x1c, |
252 | .timer_bit = 2, | 259 | .timer_bit = 2, |
253 | .clk = "tmu0", | ||
254 | }; | 260 | }; |
255 | 261 | ||
256 | static struct resource tmu2_resources[] = { | 262 | static struct resource tmu2_resources[] = { |
257 | [0] = { | 263 | [0] = { |
258 | .name = "TMU2", | ||
259 | .start = 0xffd80020, | 264 | .start = 0xffd80020, |
260 | .end = 0xffd8002b, | 265 | .end = 0xffd8002b, |
261 | .flags = IORESOURCE_MEM, | 266 | .flags = IORESOURCE_MEM, |
@@ -276,35 +281,13 @@ static struct platform_device tmu2_device = { | |||
276 | .num_resources = ARRAY_SIZE(tmu2_resources), | 281 | .num_resources = ARRAY_SIZE(tmu2_resources), |
277 | }; | 282 | }; |
278 | 283 | ||
279 | static struct plat_sci_port sci_platform_data[] = { | ||
280 | { | ||
281 | .mapbase = 0xffe00000, | ||
282 | .flags = UPF_BOOT_AUTOCONF, | ||
283 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, | ||
284 | .scbrr_algo_id = SCBRR_ALGO_2, | ||
285 | .type = PORT_SCIF, | ||
286 | .irqs = { 80, 80, 80, 80 }, | ||
287 | .clk = "scif0", | ||
288 | }, { | ||
289 | .flags = 0, | ||
290 | } | ||
291 | }; | ||
292 | |||
293 | static struct platform_device sci_device = { | ||
294 | .name = "sh-sci", | ||
295 | .id = -1, | ||
296 | .dev = { | ||
297 | .platform_data = sci_platform_data, | ||
298 | }, | ||
299 | }; | ||
300 | |||
301 | static struct platform_device *sh7366_devices[] __initdata = { | 284 | static struct platform_device *sh7366_devices[] __initdata = { |
285 | &scif0_device, | ||
302 | &cmt_device, | 286 | &cmt_device, |
303 | &tmu0_device, | 287 | &tmu0_device, |
304 | &tmu1_device, | 288 | &tmu1_device, |
305 | &tmu2_device, | 289 | &tmu2_device, |
306 | &iic_device, | 290 | &iic_device, |
307 | &sci_device, | ||
308 | &usb_host_device, | 291 | &usb_host_device, |
309 | &vpu_device, | 292 | &vpu_device, |
310 | &veu0_device, | 293 | &veu0_device, |
@@ -320,9 +303,10 @@ static int __init sh7366_devices_setup(void) | |||
320 | return platform_add_devices(sh7366_devices, | 303 | return platform_add_devices(sh7366_devices, |
321 | ARRAY_SIZE(sh7366_devices)); | 304 | ARRAY_SIZE(sh7366_devices)); |
322 | } | 305 | } |
323 | __initcall(sh7366_devices_setup); | 306 | arch_initcall(sh7366_devices_setup); |
324 | 307 | ||
325 | static struct platform_device *sh7366_early_devices[] __initdata = { | 308 | static struct platform_device *sh7366_early_devices[] __initdata = { |
309 | &scif0_device, | ||
326 | &cmt_device, | 310 | &cmt_device, |
327 | &tmu0_device, | 311 | &tmu0_device, |
328 | &tmu1_device, | 312 | &tmu1_device, |