From patchwork Wed Feb 24 00:32:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 81566 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1O0WdjW016420 for ; Wed, 24 Feb 2010 00:32:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755000Ab0BXAce (ORCPT ); Tue, 23 Feb 2010 19:32:34 -0500 Received: from mail.renesas.com ([202.234.163.13]:61446 "EHLO mail03.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754472Ab0BXAcb (ORCPT ); Tue, 23 Feb 2010 19:32:31 -0500 X-AuditID: ac140386-0000000b00003037-1d-4b84739d1a2e Received: from guardian02.idc.renesas.com ([172.20.8.201]) by mail03.idc.renesas.com (sendmail) with ESMTP id o1O0WTJC008796; Wed, 24 Feb 2010 09:32:29 +0900 (JST) Received: (from root@localhost) by guardian02.idc.renesas.com with id o1O0WUg8021387; Wed, 24 Feb 2010 09:32:30 +0900 (JST) Received: from mta01.idc.renesas.com (localhost [127.0.0.1]) by mta01.idc.renesas.com with ESMTP id o1O0WSGK028546; Wed, 24 Feb 2010 09:32:28 +0900 (JST) Received: from PG10870.renesas.com ([172.30.8.159]) by ims05.idc.renesas.com (Sendmail) with ESMTPA id <0KYB00LLJLI4GX@ims05.idc.renesas.com>; Wed, 24 Feb 2010 09:32:28 +0900 (JST) Date: Wed, 24 Feb 2010 09:32:28 +0900 From: Kuninori Morimoto Subject: [PATCH] sh: mach-ecovec24: Add sh_sir support To: Paul Mundt Cc: Linux-SH 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.3 (i386-msvc-nt5.1.2600) MULE/5.0 (SAKAKI) Meadow/3.02-dev (RINDOU) (2009-06-17 Rev.4261) X-Brightmail-Tracker: AAAAAA== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 24 Feb 2010 00:32:40 +0000 (UTC) diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 6f2e8a7..8cdf11e 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c @@ -751,6 +751,26 @@ static struct platform_device fsi_device = { }, }; +/* IrDA */ +static struct resource irda_resources[] = { + [0] = { + .name = "IrDA", + .start = 0xA45D0000, + .end = 0xA45D0049, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = 20, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device irda_device = { + .name = "sh_sir", + .num_resources = ARRAY_SIZE(irda_resources), + .resource = irda_resources, +}; + static struct platform_device *ecovec_devices[] __initdata = { &heartbeat_device, &nor_flash_device, @@ -771,6 +791,7 @@ static struct platform_device *ecovec_devices[] __initdata = { &camera_devices[1], &camera_devices[2], &fsi_device, + &irda_device, }; #define EEPROM_ADDR 0x50 @@ -1131,6 +1152,12 @@ static int __init arch_setup(void) clk_set_rate(clk, clk_round_rate(clk, 166000000)); clk_put(clk); + /* enable IrDA */ + gpio_request(GPIO_FN_IRDA_OUT, NULL); + gpio_request(GPIO_FN_IRDA_IN, NULL); + gpio_request(GPIO_PTU5, NULL); + gpio_direction_output(GPIO_PTU5, 0); + /* enable I2C device */ i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices));