From patchwork Fri Apr 10 08:43:08 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 18063 X-Patchwork-Delegate: lethal@linux-sh.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3E93Vci009978 for ; Tue, 14 Apr 2009 09:03:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753538AbZDNJDS (ORCPT ); Tue, 14 Apr 2009 05:03:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752638AbZDNJDS (ORCPT ); Tue, 14 Apr 2009 05:03:18 -0400 Received: from mail.renesas.com ([202.234.163.13]:52328 "EHLO mail04.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753538AbZDNJDS (ORCPT ); Tue, 14 Apr 2009 05:03:18 -0400 X-AuditID: ac140387-00000008000005fd-34-49e451530d79 Received: from guardian01.idc.renesas.com ([172.20.8.200]) by mail04.idc.renesas.com (sendmail) with ESMTP id n3E93FYR028270; Tue, 14 Apr 2009 18:03:15 +0900 (JST) Received: (from root@localhost) by guardian01.idc.renesas.com with id n3E93Gh6027412; Tue, 14 Apr 2009 18:03:16 +0900 (JST) Received: from mta01.idc.renesas.com (localhost [127.0.0.1]) by mta01.idc.renesas.com with ESMTP id n3E93E7B017839; Tue, 14 Apr 2009 18:03:14 +0900 (JST) Received: from PG10870.renesas.com ([172.30.8.159]) by ims05.idc.renesas.com (Sendmail) with ESMTPA id <0KI300DLP2HF5O@ims05.idc.renesas.com>; Tue, 14 Apr 2009 18:03:15 +0900 (JST) Date: Fri, 10 Apr 2009 17:43:08 +0900 From: Kuninori Morimoto Subject: [PATCH 6/6] Add VEU support for SH7724 To: Paul Mundt Cc: SH-Linux Message-id: MIME-version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-type: text/plain; charset=US-ASCII User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.1 (i386-mingw-nt5.1.2600) MULE/5.0 (SAKAKI) Meadow/3.00-dev (KIKU) X-Brightmail-Tracker: AAAAAA== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Signed-off-by: Kuninori Morimoto --- arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 64 ++++++++++++++++++++++++++++++++ 1 files changed, 64 insertions(+), 0 deletions(-) diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c index 64b7f0d..1572a21 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c @@ -197,6 +197,64 @@ static struct platform_device vpu_device = { .num_resources = ARRAY_SIZE(vpu_resources), }; +/* VEU0 */ +static struct uio_info veu0_platform_data = { + .name = "VEU3F0", + .version = "0", + .irq = 83, +}; + +static struct resource veu0_resources[] = { + [0] = { + .name = "VEU3F0", + .start = 0xfe920000, + .end = 0xfe9200cb - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + /* place holder for contiguous memory */ + }, +}; + +static struct platform_device veu0_device = { + .name = "uio_pdrv_genirq", + .id = 1, + .dev = { + .platform_data = &veu0_platform_data, + }, + .resource = veu0_resources, + .num_resources = ARRAY_SIZE(veu0_resources), +}; + +/* VEU1 */ +static struct uio_info veu1_platform_data = { + .name = "VEU3F1", + .version = "0", + .irq = 54, +}; + +static struct resource veu1_resources[] = { + [0] = { + .name = "VEU3F1", + .start = 0xfe924000, + .end = 0xfe9240cb - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + /* place holder for contiguous memory */ + }, +}; + +static struct platform_device veu1_device = { + .name = "uio_pdrv_genirq", + .id = 2, + .dev = { + .platform_data = &veu1_platform_data, + }, + .resource = veu1_resources, + .num_resources = ARRAY_SIZE(veu1_resources), +}; + static struct platform_device *sh7724_devices[] __initdata = { &sci_device, &rtc_device, @@ -204,6 +262,8 @@ static struct platform_device *sh7724_devices[] __initdata = { &iic0_device, &iic1_device, &vpu_device, + &veu0_device, + &veu1_device, }; #define UPONCR0 0xa40501d4 @@ -219,8 +279,12 @@ static int __init sh7724_devices_setup(void) { clk_always_enable("rtc0"); /* RTC */ clk_always_enable("vpu0"); /* VPU */ + clk_always_enable("veu1"); /* VEU3F1 */ + clk_always_enable("veu0"); /* VEU3F0 */ platform_resource_setup_memory(&vpu_device, "vpu", 2 << 20); + platform_resource_setup_memory(&veu0_device, "veu0", 2 << 20); + platform_resource_setup_memory(&veu1_device, "veu1", 2 << 20); sh7724_usb_setup(); return platform_add_devices(sh7724_devices,