From patchwork Sat May 28 13:54:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 97795 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (173-166-109-252-newengland.hfc.comcastbusiness.net [173.166.109.252]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B20B2B6F8F for ; Sat, 28 May 2011 23:55:20 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QQJyd-0007d0-PU; Sat, 28 May 2011 13:54:51 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QQJyc-000360-5I; Sat, 28 May 2011 13:54:50 +0000 Received: from mail-yx0-f177.google.com ([209.85.213.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QQJyY-00035g-9l for linux-arm-kernel@lists.infradead.org; Sat, 28 May 2011 13:54:47 +0000 Received: by yxh35 with SMTP id 35so1230494yxh.36 for ; Sat, 28 May 2011 06:54:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=PAcLLdevBzHNlIa0LPIMcC68nqTMRVmnwF6BUCKGT5Q=; b=F4sLtUGZ+ktMdfzL4seVgFUp4H+ncw/QGWjHmo5zJMXwmY5Gl0B/NmSfkfH3luTZK/ sj6z6syi9PVnuK7fPzbxy0YDAkZ+k5fWb7eIzr1PHXph6+NrOVQbchhsIyd+YkPLJx3P OHOiJLNMFDtsNC7/3rBalBpYNmw/MoAJYj8Uo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=eyq1cy7bTNvgAb0Lc4aW9mkrYc8wVhXUrhSvOuRGfgFhorSVCjm5URYZgf+em2awYf tBCaEWBOaU57piR5GhrufMO3RNFch4+fgcSJA6hUHGnC1k7zkqMVCMT9CdI+EeLKRKbv 5CkEgTB+7cwFjZnd9jNpiomfayaNW4Dlq1uiA= Received: by 10.236.170.138 with SMTP id p10mr4227240yhl.175.1306590883852; Sat, 28 May 2011 06:54:43 -0700 (PDT) Received: from localhost.localdomain ([201.82.76.9]) by mx.google.com with ESMTPS id e48sm1183652yhk.56.2011.05.28.06.54.41 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 28 May 2011 06:54:43 -0700 (PDT) From: Fabio Estevam To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 1/2] ARM: mx5/mx51_babbage: Move GPIO initialization for USB PHY Reset line to common place Date: Sat, 28 May 2011 10:54:35 -0300 Message-Id: <1306590876-20680-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.6.0.4 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110528_095446_507946_FA8B7589 X-CRM114-Status: GOOD ( 15.21 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is freemail (festevam[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.213.177 listed in list.dnswl.org] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 RFC_ABUSE_POST Both abuse and postmaster missing on sender domain 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL Cc: Fabio Estevam , kernel@pengutronix.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org The USB PHY Reset GPIO can be configured in the same place as the other GPIOs. While at it rename the pin as BABBAGE_USB_PHY_RESET to make clearer its purpose. Signed-off-by: Fabio Estevam --- Changes since v2: - No changes No changes since v1. Only added a third patch to the series arch/arm/mach-mx5/board-mx51_babbage.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index c7b3fab..7b919bc 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c @@ -36,7 +36,7 @@ #define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7) #define BABBAGE_USBH1_STP IMX_GPIO_NR(1, 27) -#define BABBAGE_PHY_RESET IMX_GPIO_NR(2, 5) +#define BABBAGE_USB_PHY_RESET IMX_GPIO_NR(2, 5) #define BABBAGE_FEC_PHY_RESET IMX_GPIO_NR(2, 14) #define BABBAGE_POWER_KEY IMX_GPIO_NR(2, 21) #define BABBAGE_ECSPI1_CS0 IMX_GPIO_NR(4, 24) @@ -110,6 +110,9 @@ static iomux_v3_cfg_t mx51babbage_pads[] = { /* USB HUB reset line*/ MX51_PAD_GPIO1_7__GPIO1_7, + /* USB PHY reset line */ + MX51_PAD_EIM_D21__GPIO2_5, + /* FEC */ MX51_PAD_EIM_EB2__FEC_MDIO, MX51_PAD_EIM_EB3__FEC_RDATA1, @@ -172,7 +175,6 @@ static struct imxi2c_platform_data babbage_hsi2c_data = { static int gpio_usbh1_active(void) { iomux_v3_cfg_t usbh1stp_gpio = MX51_PAD_USBH1_STP__GPIO1_27; - iomux_v3_cfg_t phyreset_gpio = MX51_PAD_EIM_D21__GPIO2_5; int ret; /* Set USBH1_STP to GPIO and toggle it */ @@ -189,14 +191,13 @@ static int gpio_usbh1_active(void) gpio_free(BABBAGE_USBH1_STP); /* De-assert USB PHY RESETB */ - mxc_iomux_v3_setup_pad(phyreset_gpio); - ret = gpio_request(BABBAGE_PHY_RESET, "phy_reset"); + ret = gpio_request(BABBAGE_USB_PHY_RESET, "phy_reset"); if (ret) { pr_debug("failed to get MX51_PAD_EIM_D21__GPIO_2_5: %d\n", ret); return ret; } - gpio_direction_output(BABBAGE_PHY_RESET, 1); + gpio_direction_output(BABBAGE_USB_PHY_RESET, 1); return 0; }