From patchwork Fri Nov 19 04:11:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yoshii.takashi@gmail.com X-Patchwork-Id: 338331 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAJ4BdaC005026 for ; Fri, 19 Nov 2010 04:11:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751494Ab0KSELi (ORCPT ); Thu, 18 Nov 2010 23:11:38 -0500 Received: from mail-gx0-f174.google.com ([209.85.161.174]:56274 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751406Ab0KSELi (ORCPT ); Thu, 18 Nov 2010 23:11:38 -0500 Received: by gxk23 with SMTP id 23so2422632gxk.19 for ; Thu, 18 Nov 2010 20:11:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=7CbENtQElyR3SHd+alpc55DHP/dDNyyulOBOOBHdVhU=; b=pZJyXhtQ4qJ1dnywoilkvBw9TRFlpmDputx8KUnfiGPXHm19lznFBqgY3M4Ndx5/Yl It9ke8VZLNEw8XJp5I+S+ONcVqdR3pips8h5zMPukryuaaHRHQlxg7ihJEvUWe9/m+9x 4urUD05oEMXvhpEHwhWX8jzEAWpR/4bdYJLKI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=DB8W4CiPpxK2LElEki0/dDiYQxzUge9z7pmALpYwUpecLSIwDZosSPC50WZ1IiDj95 S9qTKHYpvXSXMI0ycVIidx7VkyqjjPdP5sXtwJqqpjj8vWBrVhKLKRkv0lg1FoWl2rSA X7+i7CEXg94fKsE3WdyquMmPQTuRY6CgGayjw= Received: by 10.91.103.1 with SMTP id f1mr1863997agm.182.1290139897253; Thu, 18 Nov 2010 20:11:37 -0800 (PST) Received: from genny.localdomain (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id y21sm766060yhc.14.2010.11.18.20.11.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 18 Nov 2010 20:11:36 -0800 (PST) Date: Fri, 19 Nov 2010 13:11:12 +0900 From: yoshii.takashi@gmail.com To: linux-sh@vger.kernel.org Subject: [PATCH 2/2] ARM: mach-shmobile: ag5evm: use gpio. Message-Id: <20101119131112.45efa0dc.yoshii.takashi@gmail.com> In-Reply-To: <20101119130656.8b8a50b9.takashi.yoshii.zj@renesas.com> References: <20101119130656.8b8a50b9.takashi.yoshii.zj@renesas.com> X-Mailer: Sylpheed 3.0.3 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 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 (demeter1.kernel.org [140.211.167.41]); Fri, 19 Nov 2010 04:11:39 +0000 (UTC) diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 2910ba2..7d56e86 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -61,6 +61,7 @@ endchoice config MACH_AG5EVM bool "AG5EVM board" depends on ARCH_SH73A0 + select ARCH_REQUIRE_GPIOLIB comment "SH-Mobile System Configuration" diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index bade04a..e0bc081 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c @@ -121,16 +121,19 @@ void __init ag5evm_init_irq(void) static void __init ag5evm_init(void) { + sh73a0_pinmux_init(); + /* enable SCIFA2 */ - __raw_writeb(0x12, PORT154CR); /* TXD */ - __raw_writeb(0x22, PORT155CR); /* RXD */ - __raw_writeb(0x12, PORT156CR); /* RTS */ - __raw_writeb(0x22, PORT157CR); /* CTS */ + gpio_request(GPIO_FN_SCIFA2_TXD1, NULL); + gpio_request(GPIO_FN_SCIFA2_RXD1, NULL); + gpio_request(GPIO_FN_SCIFA2_RTS1_, NULL); + gpio_request(GPIO_FN_SCIFA2_CTS1_, NULL); /* enable SMSC911X */ - __raw_writeb(0x20, PORT144CR); /* PINTA2 */ - __raw_writeb(0x10, PORT145CR); /* RESET */ - __raw_writel(__raw_readl(PORTR159_128DR) & ~(1 << 17), PORTR159_128DR); + gpio_request(GPIO_PORT144, NULL); /* PINTA2 */ + gpio_direction_input(GPIO_PORT144); + gpio_request(GPIO_PORT145, NULL); /* RESET */ + gpio_direction_output(GPIO_PORT145, 1); #ifdef CONFIG_CACHE_L2X0 /* Shared attribute override enable, 64K*8way */