aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards
diff options
context:
space:
mode:
authorKuninori Morimoto <morimoto.kuninori@renesas.com>2009-08-26 07:04:36 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-08-26 22:36:10 -0400
commit2153ad3294e3e1e89d27a78d65932352b80a4f78 (patch)
treef298e20f1f59ba524bf3a3597f2c14e8581b99a9 /arch/sh/boards
parentfa3ba51bcf2351da9869924c8765d7d485226c31 (diff)
sh: Add CEU support for EcoVec24
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c109
1 files changed, 109 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index a575b38016a4..55ff7357e799 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -18,6 +18,7 @@
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/usb/r8a66597.h> 19#include <linux/usb/r8a66597.h>
20#include <video/sh_mobile_lcdc.h> 20#include <video/sh_mobile_lcdc.h>
21#include <media/sh_mobile_ceu.h>
21#include <asm/heartbeat.h> 22#include <asm/heartbeat.h>
22#include <asm/sh_eth.h> 23#include <asm/sh_eth.h>
23#include <cpu/sh7724.h> 24#include <cpu/sh7724.h>
@@ -256,6 +257,74 @@ static struct platform_device lcdc_device = {
256 }, 257 },
257}; 258};
258 259
260/* CEU0 */
261static struct sh_mobile_ceu_info sh_mobile_ceu0_info = {
262 .flags = SH_CEU_FLAG_USE_8BIT_BUS,
263};
264
265static struct resource ceu0_resources[] = {
266 [0] = {
267 .name = "CEU0",
268 .start = 0xfe910000,
269 .end = 0xfe91009f,
270 .flags = IORESOURCE_MEM,
271 },
272 [1] = {
273 .start = 52,
274 .flags = IORESOURCE_IRQ,
275 },
276 [2] = {
277 /* place holder for contiguous memory */
278 },
279};
280
281static struct platform_device ceu0_device = {
282 .name = "sh_mobile_ceu",
283 .id = 0, /* "ceu0" clock */
284 .num_resources = ARRAY_SIZE(ceu0_resources),
285 .resource = ceu0_resources,
286 .dev = {
287 .platform_data = &sh_mobile_ceu0_info,
288 },
289 .archdata = {
290 .hwblk_id = HWBLK_CEU0,
291 },
292};
293
294/* CEU1 */
295static struct sh_mobile_ceu_info sh_mobile_ceu1_info = {
296 .flags = SH_CEU_FLAG_USE_8BIT_BUS,
297};
298
299static struct resource ceu1_resources[] = {
300 [0] = {
301 .name = "CEU1",
302 .start = 0xfe914000,
303 .end = 0xfe91409f,
304 .flags = IORESOURCE_MEM,
305 },
306 [1] = {
307 .start = 63,
308 .flags = IORESOURCE_IRQ,
309 },
310 [2] = {
311 /* place holder for contiguous memory */
312 },
313};
314
315static struct platform_device ceu1_device = {
316 .name = "sh_mobile_ceu",
317 .id = 1, /* "ceu1" clock */
318 .num_resources = ARRAY_SIZE(ceu1_resources),
319 .resource = ceu1_resources,
320 .dev = {
321 .platform_data = &sh_mobile_ceu1_info,
322 },
323 .archdata = {
324 .hwblk_id = HWBLK_CEU1,
325 },
326};
327
259static struct platform_device *ecovec_devices[] __initdata = { 328static struct platform_device *ecovec_devices[] __initdata = {
260 &heartbeat_device, 329 &heartbeat_device,
261 &nor_flash_device, 330 &nor_flash_device,
@@ -263,6 +332,8 @@ static struct platform_device *ecovec_devices[] __initdata = {
263 &usb0_host_device, 332 &usb0_host_device,
264 &usb1_host_device, /* USB1 host support */ 333 &usb1_host_device, /* USB1 host support */
265 &lcdc_device, 334 &lcdc_device,
335 &ceu0_device,
336 &ceu1_device,
266}; 337};
267 338
268#define PORT_HIZA 0xA4050158 339#define PORT_HIZA 0xA4050158
@@ -371,6 +442,44 @@ static int __init devices_setup(void)
371 /* not supported */ 442 /* not supported */
372 } 443 }
373 444
445 /* enable CEU0 */
446 gpio_request(GPIO_FN_VIO0_D15, NULL);
447 gpio_request(GPIO_FN_VIO0_D14, NULL);
448 gpio_request(GPIO_FN_VIO0_D13, NULL);
449 gpio_request(GPIO_FN_VIO0_D12, NULL);
450 gpio_request(GPIO_FN_VIO0_D11, NULL);
451 gpio_request(GPIO_FN_VIO0_D10, NULL);
452 gpio_request(GPIO_FN_VIO0_D9, NULL);
453 gpio_request(GPIO_FN_VIO0_D8, NULL);
454 gpio_request(GPIO_FN_VIO0_D7, NULL);
455 gpio_request(GPIO_FN_VIO0_D6, NULL);
456 gpio_request(GPIO_FN_VIO0_D5, NULL);
457 gpio_request(GPIO_FN_VIO0_D4, NULL);
458 gpio_request(GPIO_FN_VIO0_D3, NULL);
459 gpio_request(GPIO_FN_VIO0_D2, NULL);
460 gpio_request(GPIO_FN_VIO0_D1, NULL);
461 gpio_request(GPIO_FN_VIO0_D0, NULL);
462 gpio_request(GPIO_FN_VIO0_VD, NULL);
463 gpio_request(GPIO_FN_VIO0_CLK, NULL);
464 gpio_request(GPIO_FN_VIO0_FLD, NULL);
465 gpio_request(GPIO_FN_VIO0_HD, NULL);
466 platform_resource_setup_memory(&ceu0_device, "ceu0", 4 << 20);
467
468 /* enable CEU1 */
469 gpio_request(GPIO_FN_VIO1_D7, NULL);
470 gpio_request(GPIO_FN_VIO1_D6, NULL);
471 gpio_request(GPIO_FN_VIO1_D5, NULL);
472 gpio_request(GPIO_FN_VIO1_D4, NULL);
473 gpio_request(GPIO_FN_VIO1_D3, NULL);
474 gpio_request(GPIO_FN_VIO1_D2, NULL);
475 gpio_request(GPIO_FN_VIO1_D1, NULL);
476 gpio_request(GPIO_FN_VIO1_D0, NULL);
477 gpio_request(GPIO_FN_VIO1_FLD, NULL);
478 gpio_request(GPIO_FN_VIO1_HD, NULL);
479 gpio_request(GPIO_FN_VIO1_VD, NULL);
480 gpio_request(GPIO_FN_VIO1_CLK, NULL);
481 platform_resource_setup_memory(&ceu1_device, "ceu1", 4 << 20);
482
374 return platform_add_devices(ecovec_devices, 483 return platform_add_devices(ecovec_devices,
375 ARRAY_SIZE(ecovec_devices)); 484 ARRAY_SIZE(ecovec_devices));
376} 485}