From patchwork Wed Feb 8 12:34:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 140139 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 4D097B71B2 for ; Wed, 8 Feb 2012 23:35:50 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 764DC280E3; Wed, 8 Feb 2012 13:35:40 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nO0yNHvwTivC; Wed, 8 Feb 2012 13:35:39 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 54F29280ED; Wed, 8 Feb 2012 13:35:27 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7262B280C3 for ; Wed, 8 Feb 2012 13:35:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NQwv2mry2JHJ for ; Wed, 8 Feb 2012 13:35:19 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-yw0-f44.google.com (mail-yw0-f44.google.com [209.85.213.44]) by theia.denx.de (Postfix) with ESMTPS id 44C39280CE for ; Wed, 8 Feb 2012 13:35:06 +0100 (CET) Received: by yhkk25 with SMTP id k25so143757yhk.3 for ; Wed, 08 Feb 2012 04:35:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=mpe4vg7skvZv5Va4m6JdaBOmcuHFWukFzan68vXenRw=; b=YWFK3yAWBzXdeAsiL99AGhVaZ1/oGJJx08FUKaoLs54UAzeEUN6U1JqwDD/kxu6GZA besR7RNYUdzxsp7nMs9lKaq1UX5zHfQDKJWNm7R6YAZSg9NlLKk/7w+ezg97HTTMLUFk C26dBBbfMgjQxI6VMKvnvC2CGCo0BAp+VrgJw= Received: by 10.236.170.168 with SMTP id p28mr37004144yhl.72.1328704505458; Wed, 08 Feb 2012 04:35:05 -0800 (PST) Received: from localhost.localdomain ([187.106.61.98]) by mx.google.com with ESMTPS id d5sm2774203anm.22.2012.02.08.04.35.03 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 08 Feb 2012 04:35:04 -0800 (PST) From: Fabio Estevam To: u-boot@lists.denx.de Date: Wed, 8 Feb 2012 10:34:45 -0200 Message-Id: <1328704485-1505-5-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1328704485-1505-1-git-send-email-festevam@gmail.com> References: <1328704485-1505-1-git-send-email-festevam@gmail.com> Cc: Fabio Estevam Subject: [U-Boot] [PATCH 5/5] mx51evk: Use gpio_direction_input prior to gpio_get_value X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Use gpio_direction_input prior to gpio_get_value. Signed-off-by: Fabio Estevam --- board/freescale/mx51evk/mx51evk.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c index 8d1f6a3..b505a71 100644 --- a/board/freescale/mx51evk/mx51evk.c +++ b/board/freescale/mx51evk/mx51evk.c @@ -327,7 +327,9 @@ int board_mmc_getcd(struct mmc *mmc) int ret; mxc_request_iomux(MX51_PIN_GPIO1_0, IOMUX_CONFIG_ALT1); + gpio_direction_input(0); mxc_request_iomux(MX51_PIN_GPIO1_6, IOMUX_CONFIG_ALT0); + gpio_direction_input(6); if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR) ret = !gpio_get_value(0);