From patchwork Wed Feb 8 12:34:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 140137 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 36430B71C0 for ; Wed, 8 Feb 2012 23:35:24 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6A786280B5; 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 EHn-Ihxu7LPz; Wed, 8 Feb 2012 13:35:21 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AEBCB280DE; Wed, 8 Feb 2012 13:35:14 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E4D3F280D4 for ; Wed, 8 Feb 2012 13:35:10 +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 u-Z-Y0mcr4GN for ; Wed, 8 Feb 2012 13:35:10 +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-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by theia.denx.de (Postfix) with ESMTPS id 44223280B2 for ; Wed, 8 Feb 2012 13:35:00 +0100 (CET) Received: by mail-yx0-f172.google.com with SMTP id m3so145170yen.3 for ; Wed, 08 Feb 2012 04:35:00 -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=hA0yREaxz5rgyHtt0PJl7gnpQ5y6OxVLpMpOr7ZH7dc=; b=D6WtWVFk5cOl8cKHC/P0BWsiEoyNZ6JTAhj9rkPyTSorWJplWPXxp/l6l5hbGFCxO0 4YFLaMfOhdjZEei5lRW3QYB0Hdth7SCFTWPyoyxTym6Wau67rDTknNuSy00nyqQ0xA1l 2Rc9Bd7GRmHPCQ+Wmp3+iMCMI1YaGkWcAJ9wQ= Received: by 10.236.124.66 with SMTP id w42mr37199600yhh.23.1328704500804; Wed, 08 Feb 2012 04:35:00 -0800 (PST) Received: from localhost.localdomain ([187.106.61.98]) by mx.google.com with ESMTPS id d5sm2774203anm.22.2012.02.08.04.34.57 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 08 Feb 2012 04:34:58 -0800 (PST) From: Fabio Estevam To: u-boot@lists.denx.de Date: Wed, 8 Feb 2012 10:34:43 -0200 Message-Id: <1328704485-1505-3-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 3/5] mx53evk: 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. Cc: Jason Liu Signed-off-by: Fabio Estevam Acked-by: Jason Liu --- board/freescale/mx53evk/mx53evk.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/board/freescale/mx53evk/mx53evk.c b/board/freescale/mx53evk/mx53evk.c index e976ae1..8a6e31d 100644 --- a/board/freescale/mx53evk/mx53evk.c +++ b/board/freescale/mx53evk/mx53evk.c @@ -214,7 +214,9 @@ int board_mmc_getcd(struct mmc *mmc) int ret; mxc_request_iomux(MX53_PIN_EIM_DA11, IOMUX_CONFIG_ALT1); + gpio_direction_input(75); mxc_request_iomux(MX53_PIN_EIM_DA13, IOMUX_CONFIG_ALT1); + gpio_direction_input(77); if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR) ret = !gpio_get_value(77); /* GPIO3_13 */