From patchwork Fri Sep 24 15:12:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: charu@ti.com X-Patchwork-Id: 204782 X-Patchwork-Delegate: khilman@deeprootsystems.com 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 o8OFCElc018750 for ; Fri, 24 Sep 2010 15:12:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756367Ab0IXPMO (ORCPT ); Fri, 24 Sep 2010 11:12:14 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:33550 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754496Ab0IXPMN convert rfc822-to-8bit (ORCPT ); Fri, 24 Sep 2010 11:12:13 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o8OFC7hM006617 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 24 Sep 2010 10:12:10 -0500 Received: from dbde70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id o8OFC6SQ012999; Fri, 24 Sep 2010 20:42:06 +0530 (IST) Received: from dbde02.ent.ti.com ([172.24.170.145]) by dbde70.ent.ti.com ([172.24.170.148]) with mapi; Fri, 24 Sep 2010 20:42:05 +0530 From: "Varadarajan, Charulatha" To: Kevin Hilman CC: "tony@atomide.com" , "linux-omap@vger.kernel.org" , "paul@pwsan.com" , "Cousson, Benoit" , "Nayak, Rajendra" , "Basak, Partha" Date: Fri, 24 Sep 2010 20:42:04 +0530 Subject: RE: [PATCH v6 00/13] OMAP: GPIO: Implement GPIO in hwmod way Thread-Topic: [PATCH v6 00/13] OMAP: GPIO: Implement GPIO in hwmod way Thread-Index: ActZ66lzF9soKZ9gQHqD6GizoavBBQCCq+4g Message-ID: References: <1284819353-8512-1-git-send-email-charu@ti.com> <87r5goq7ro.fsf@deeprootsystems.com> <87zkvbj7yc.fsf@deeprootsystems.com> <87k4mefz70.fsf@deeprootsystems.com> <87bp7qfx6g.fsf@deeprootsystems.com> In-Reply-To: <87bp7qfx6g.fsf@deeprootsystems.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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, 24 Sep 2010 15:12:15 +0000 (UTC) diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 43ed2ab..b137e0a 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -373,6 +373,7 @@ static struct omap_hwmod omap3xxx_gpio1_hwmod = { .class = &omap3xxx_gpio_hwmod_class, .dev_attr = &gpio_dev_attr, .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), + .flags = HWMOD_INIT_NO_RESET, }; [2] From b191662eca02450bbeaf29370916bca8811bb752 Mon Sep 17 00:00:00 2001 From: Varadarajan, Charulatha Date: Fri, 24 Sep 2010 20:00:06 +0530 Subject: [PATCH] Fix: OMAP3EVM: Ethernet controller smsc911x reset Do reset of Ethernet controller smsc911x using OMAP gpio7 while initializing the Ethernet controller. Signed-off-by: Charulatha V --- arch/arm/mach-omap2/board-omap3evm.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index f76d9c0..3ee87d0 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c @@ -55,6 +55,7 @@ #define OMAP3EVM_ETHR_SIZE 1024 #define OMAP3EVM_ETHR_ID_REV 0x50 #define OMAP3EVM_ETHR_GPIO_IRQ 176 +#define OMAP3EVM_ETHR_GPIO_RST 7 #define OMAP3EVM_SMSC911X_CS 5 static u8 omap3_evm_version; @@ -134,6 +135,14 @@ static inline void __init omap3evm_init_smsc911x(void) else rate = clk_get_rate(l3ck); + gpio_direction_output(OMAP3EVM_ETHR_GPIO_RST, 1); + + /* reset pulse to ethernet controller*/ + gpio_set_value(OMAP3EVM_ETHR_GPIO_RST, 0); + usleep_range(150, 220); + gpio_set_value(OMAP3EVM_ETHR_GPIO_RST, 1); + usleep_range(1, 2); + if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMSC911x irq") < 0) { printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n", OMAP3EVM_ETHR_GPIO_IRQ); @@ -141,6 +150,13 @@ static inline void __init omap3evm_init_smsc911x(void) } gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ); + + /* Configure ethernet controller reset gpio */ + if (gpio_request(OMAP3EVM_ETHR_GPIO_RST, "SMSC911x gpio") < 0) { + pr_err(KERN_ERR "Failed to request GPIO8 for smsc911x gpio\n"); + return; + } + platform_device_register(&omap3evm_smsc911x_device); }