From patchwork Tue Feb 23 08:19:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 81567 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 o1O0WdjX016420 for ; Wed, 24 Feb 2010 00:32:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755035Ab0BXAcr (ORCPT ); Tue, 23 Feb 2010 19:32:47 -0500 Received: from mail.renesas.com ([202.234.163.13]:34220 "EHLO mail02.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755027Ab0BXAcq (ORCPT ); Tue, 23 Feb 2010 19:32:46 -0500 X-AuditID: ac140385-0000000a000002de-25-4b8473ac2fa7 Received: from guardian03.idc.renesas.com ([172.20.8.202]) by mail02.idc.renesas.com (sendmail) with ESMTP id o1O0Wiqu021499; Wed, 24 Feb 2010 09:32:44 +0900 (JST) Received: (from root@localhost) by guardian03.idc.renesas.com with id o1O0WiuC029326; Wed, 24 Feb 2010 09:32:44 +0900 (JST) Received: from mta01.idc.renesas.com (localhost [127.0.0.1]) by mta01.idc.renesas.com with ESMTP id o1O0Wh6U028944; Wed, 24 Feb 2010 09:32:44 +0900 (JST) Received: from PG10870.renesas.com ([172.30.8.159]) by ims05.idc.renesas.com (Sendmail) with ESMTPA id <0KYB00LOZLIJGX@ims05.idc.renesas.com>; Wed, 24 Feb 2010 09:32:44 +0900 (JST) Date: Tue, 23 Feb 2010 17:19:14 +0900 From: Kuninori Morimoto Subject: [PATCH] sh: ms7724: 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:47 +0000 (UTC) diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 1f6cf86..6419f27 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c @@ -489,6 +489,26 @@ static struct platform_device sdhi1_cn8_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 *ms7724se_devices[] __initdata = { &heartbeat_device, &smc91x_eth_device, @@ -503,6 +523,7 @@ static struct platform_device *ms7724se_devices[] __initdata = { &fsi_device, &sdhi0_cn7_device, &sdhi1_cn8_device, + &irda_device, }; /* I2C device */ @@ -599,6 +620,7 @@ static int __init devices_setup(void) ~((1 << 1) | /* LAN */ (1 << 6) | /* VIDEO DAC */ (1 << 7) | /* AK4643 */ + (1 << 8) | /* IrDA */ (1 << 12) | /* USB0 */ (1 << 14)), /* RMII */ FPGA_OUT); @@ -788,6 +810,10 @@ static int __init devices_setup(void) gpio_request(GPIO_FN_SDHI1CMD, NULL); gpio_request(GPIO_FN_SDHI1CLK, NULL); + /* enable IrDA */ + gpio_request(GPIO_FN_IRDA_OUT, NULL); + gpio_request(GPIO_FN_IRDA_IN, NULL); + /* * enable SH-Eth *