diff options
author | Magnus Damm <damm@opensource.se> | 2011-04-27 23:16:32 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-05-23 23:17:35 -0400 |
commit | de3283511f5bf305a8c36b8413d9834e4e7e26c5 (patch) | |
tree | 923c530fa69cc740ee6e6ef8dfd27cd28c9d310c /arch/arm/mach-shmobile | |
parent | 1d0738ea48829cb234fcaba830eef3461985ff44 (diff) |
ARM: mach-shmobile: sh7367 UIO platform data V3
Export the following sh7367 multimedia hardware blocks
using UIO: VPU, VEU[0-3], VEU2H, JPU and SPU1
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh7367.c | 223 |
1 files changed, 223 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/setup-sh7367.c b/arch/arm/mach-shmobile/setup-sh7367.c index ce28141662da..2c10190dbb55 100644 --- a/arch/arm/mach-shmobile/setup-sh7367.c +++ b/arch/arm/mach-shmobile/setup-sh7367.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/uio_driver.h> | ||
25 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
26 | #include <linux/input.h> | 27 | #include <linux/input.h> |
27 | #include <linux/io.h> | 28 | #include <linux/io.h> |
@@ -195,6 +196,214 @@ static struct platform_device cmt10_device = { | |||
195 | .num_resources = ARRAY_SIZE(cmt10_resources), | 196 | .num_resources = ARRAY_SIZE(cmt10_resources), |
196 | }; | 197 | }; |
197 | 198 | ||
199 | /* VPU */ | ||
200 | static struct uio_info vpu_platform_data = { | ||
201 | .name = "VPU5", | ||
202 | .version = "0", | ||
203 | .irq = intcs_evt2irq(0x980), | ||
204 | }; | ||
205 | |||
206 | static struct resource vpu_resources[] = { | ||
207 | [0] = { | ||
208 | .name = "VPU", | ||
209 | .start = 0xfe900000, | ||
210 | .end = 0xfe902807, | ||
211 | .flags = IORESOURCE_MEM, | ||
212 | }, | ||
213 | }; | ||
214 | |||
215 | static struct platform_device vpu_device = { | ||
216 | .name = "uio_pdrv_genirq", | ||
217 | .id = 0, | ||
218 | .dev = { | ||
219 | .platform_data = &vpu_platform_data, | ||
220 | }, | ||
221 | .resource = vpu_resources, | ||
222 | .num_resources = ARRAY_SIZE(vpu_resources), | ||
223 | }; | ||
224 | |||
225 | /* VEU0 */ | ||
226 | static struct uio_info veu0_platform_data = { | ||
227 | .name = "VEU0", | ||
228 | .version = "0", | ||
229 | .irq = intcs_evt2irq(0x700), | ||
230 | }; | ||
231 | |||
232 | static struct resource veu0_resources[] = { | ||
233 | [0] = { | ||
234 | .name = "VEU0", | ||
235 | .start = 0xfe920000, | ||
236 | .end = 0xfe9200b7, | ||
237 | .flags = IORESOURCE_MEM, | ||
238 | }, | ||
239 | }; | ||
240 | |||
241 | static struct platform_device veu0_device = { | ||
242 | .name = "uio_pdrv_genirq", | ||
243 | .id = 1, | ||
244 | .dev = { | ||
245 | .platform_data = &veu0_platform_data, | ||
246 | }, | ||
247 | .resource = veu0_resources, | ||
248 | .num_resources = ARRAY_SIZE(veu0_resources), | ||
249 | }; | ||
250 | |||
251 | /* VEU1 */ | ||
252 | static struct uio_info veu1_platform_data = { | ||
253 | .name = "VEU1", | ||
254 | .version = "0", | ||
255 | .irq = intcs_evt2irq(0x720), | ||
256 | }; | ||
257 | |||
258 | static struct resource veu1_resources[] = { | ||
259 | [0] = { | ||
260 | .name = "VEU1", | ||
261 | .start = 0xfe924000, | ||
262 | .end = 0xfe9240b7, | ||
263 | .flags = IORESOURCE_MEM, | ||
264 | }, | ||
265 | }; | ||
266 | |||
267 | static struct platform_device veu1_device = { | ||
268 | .name = "uio_pdrv_genirq", | ||
269 | .id = 2, | ||
270 | .dev = { | ||
271 | .platform_data = &veu1_platform_data, | ||
272 | }, | ||
273 | .resource = veu1_resources, | ||
274 | .num_resources = ARRAY_SIZE(veu1_resources), | ||
275 | }; | ||
276 | |||
277 | /* VEU2 */ | ||
278 | static struct uio_info veu2_platform_data = { | ||
279 | .name = "VEU2", | ||
280 | .version = "0", | ||
281 | .irq = intcs_evt2irq(0x740), | ||
282 | }; | ||
283 | |||
284 | static struct resource veu2_resources[] = { | ||
285 | [0] = { | ||
286 | .name = "VEU2", | ||
287 | .start = 0xfe928000, | ||
288 | .end = 0xfe9280b7, | ||
289 | .flags = IORESOURCE_MEM, | ||
290 | }, | ||
291 | }; | ||
292 | |||
293 | static struct platform_device veu2_device = { | ||
294 | .name = "uio_pdrv_genirq", | ||
295 | .id = 3, | ||
296 | .dev = { | ||
297 | .platform_data = &veu2_platform_data, | ||
298 | }, | ||
299 | .resource = veu2_resources, | ||
300 | .num_resources = ARRAY_SIZE(veu2_resources), | ||
301 | }; | ||
302 | |||
303 | /* VEU3 */ | ||
304 | static struct uio_info veu3_platform_data = { | ||
305 | .name = "VEU3", | ||
306 | .version = "0", | ||
307 | .irq = intcs_evt2irq(0x760), | ||
308 | }; | ||
309 | |||
310 | static struct resource veu3_resources[] = { | ||
311 | [0] = { | ||
312 | .name = "VEU3", | ||
313 | .start = 0xfe92c000, | ||
314 | .end = 0xfe92c0b7, | ||
315 | .flags = IORESOURCE_MEM, | ||
316 | }, | ||
317 | }; | ||
318 | |||
319 | static struct platform_device veu3_device = { | ||
320 | .name = "uio_pdrv_genirq", | ||
321 | .id = 4, | ||
322 | .dev = { | ||
323 | .platform_data = &veu3_platform_data, | ||
324 | }, | ||
325 | .resource = veu3_resources, | ||
326 | .num_resources = ARRAY_SIZE(veu3_resources), | ||
327 | }; | ||
328 | |||
329 | /* VEU2H */ | ||
330 | static struct uio_info veu2h_platform_data = { | ||
331 | .name = "VEU2H", | ||
332 | .version = "0", | ||
333 | .irq = intcs_evt2irq(0x520), | ||
334 | }; | ||
335 | |||
336 | static struct resource veu2h_resources[] = { | ||
337 | [0] = { | ||
338 | .name = "VEU2H", | ||
339 | .start = 0xfe93c000, | ||
340 | .end = 0xfe93c27b, | ||
341 | .flags = IORESOURCE_MEM, | ||
342 | }, | ||
343 | }; | ||
344 | |||
345 | static struct platform_device veu2h_device = { | ||
346 | .name = "uio_pdrv_genirq", | ||
347 | .id = 5, | ||
348 | .dev = { | ||
349 | .platform_data = &veu2h_platform_data, | ||
350 | }, | ||
351 | .resource = veu2h_resources, | ||
352 | .num_resources = ARRAY_SIZE(veu2h_resources), | ||
353 | }; | ||
354 | |||
355 | /* JPU */ | ||
356 | static struct uio_info jpu_platform_data = { | ||
357 | .name = "JPU", | ||
358 | .version = "0", | ||
359 | .irq = intcs_evt2irq(0x560), | ||
360 | }; | ||
361 | |||
362 | static struct resource jpu_resources[] = { | ||
363 | [0] = { | ||
364 | .name = "JPU", | ||
365 | .start = 0xfe980000, | ||
366 | .end = 0xfe9902d3, | ||
367 | .flags = IORESOURCE_MEM, | ||
368 | }, | ||
369 | }; | ||
370 | |||
371 | static struct platform_device jpu_device = { | ||
372 | .name = "uio_pdrv_genirq", | ||
373 | .id = 6, | ||
374 | .dev = { | ||
375 | .platform_data = &jpu_platform_data, | ||
376 | }, | ||
377 | .resource = jpu_resources, | ||
378 | .num_resources = ARRAY_SIZE(jpu_resources), | ||
379 | }; | ||
380 | |||
381 | /* SPU1 */ | ||
382 | static struct uio_info spu1_platform_data = { | ||
383 | .name = "SPU1", | ||
384 | .version = "0", | ||
385 | .irq = evt2irq(0xfc0), | ||
386 | }; | ||
387 | |||
388 | static struct resource spu1_resources[] = { | ||
389 | [0] = { | ||
390 | .name = "SPU1", | ||
391 | .start = 0xfe300000, | ||
392 | .end = 0xfe3fffff, | ||
393 | .flags = IORESOURCE_MEM, | ||
394 | }, | ||
395 | }; | ||
396 | |||
397 | static struct platform_device spu1_device = { | ||
398 | .name = "uio_pdrv_genirq", | ||
399 | .id = 7, | ||
400 | .dev = { | ||
401 | .platform_data = &spu1_platform_data, | ||
402 | }, | ||
403 | .resource = spu1_resources, | ||
404 | .num_resources = ARRAY_SIZE(spu1_resources), | ||
405 | }; | ||
406 | |||
198 | static struct platform_device *sh7367_early_devices[] __initdata = { | 407 | static struct platform_device *sh7367_early_devices[] __initdata = { |
199 | &scif0_device, | 408 | &scif0_device, |
200 | &scif1_device, | 409 | &scif1_device, |
@@ -206,10 +415,24 @@ static struct platform_device *sh7367_early_devices[] __initdata = { | |||
206 | &cmt10_device, | 415 | &cmt10_device, |
207 | }; | 416 | }; |
208 | 417 | ||
418 | static struct platform_device *sh7367_devices[] __initdata = { | ||
419 | &vpu_device, | ||
420 | &veu0_device, | ||
421 | &veu1_device, | ||
422 | &veu2_device, | ||
423 | &veu3_device, | ||
424 | &veu2h_device, | ||
425 | &jpu_device, | ||
426 | &spu1_device, | ||
427 | }; | ||
428 | |||
209 | void __init sh7367_add_standard_devices(void) | 429 | void __init sh7367_add_standard_devices(void) |
210 | { | 430 | { |
211 | platform_add_devices(sh7367_early_devices, | 431 | platform_add_devices(sh7367_early_devices, |
212 | ARRAY_SIZE(sh7367_early_devices)); | 432 | ARRAY_SIZE(sh7367_early_devices)); |
433 | |||
434 | platform_add_devices(sh7367_devices, | ||
435 | ARRAY_SIZE(sh7367_devices)); | ||
213 | } | 436 | } |
214 | 437 | ||
215 | #define SYMSTPCR2 0xe6158048 | 438 | #define SYMSTPCR2 0xe6158048 |