sh: sh7724: Add VPU support.
authorKuninori Morimoto <morimoto.kuninori@renesas.com>
Wed, 15 Apr 2009 02:43:03 +0000 (11:43 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 16 Apr 2009 05:50:55 +0000 (14:50 +0900)
This adds uio_pdrv_genirq support for the VPU.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/cpu/sh4a/setup-sh7724.c

index f17eda6..499a6fc 100644 (file)
@@ -143,16 +143,49 @@ static struct platform_device iic1_device = {
        .resource       = iic1_resources,
 };
 
+/* VPU */
+static struct uio_info vpu_platform_data = {
+       .name = "VPU5F",
+       .version = "0",
+       .irq = 60,
+};
+
+static struct resource vpu_resources[] = {
+       [0] = {
+               .name   = "VPU",
+               .start  = 0xfe900000,
+               .end    = 0xfe902807,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               /* place holder for contiguous memory */
+       },
+};
+
+static struct platform_device vpu_device = {
+       .name           = "uio_pdrv_genirq",
+       .id             = 0,
+       .dev = {
+               .platform_data  = &vpu_platform_data,
+       },
+       .resource       = vpu_resources,
+       .num_resources  = ARRAY_SIZE(vpu_resources),
+};
+
 static struct platform_device *sh7724_devices[] __initdata = {
        &sci_device,
        &rtc_device,
        &iic0_device,
        &iic1_device,
+       &vpu_device,
 };
 
 static int __init sh7724_devices_setup(void)
 {
        clk_always_enable("rtc0");   /* RTC */
+       clk_always_enable("vpu0");   /* VPU */
+
+       platform_resource_setup_memory(&vpu_device, "vpu", 2 << 20);
 
        return platform_add_devices(sh7724_devices,
                                    ARRAY_SIZE(sh7724_devices));