From patchwork Mon Nov 21 14:09:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 126795 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 1A6A8B71D3 for ; Tue, 22 Nov 2011 01:04:54 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 35B40284AA; Mon, 21 Nov 2011 15:04:44 +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 hHppCUUQUjh0; Mon, 21 Nov 2011 15:04:43 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A957A28476; Mon, 21 Nov 2011 15:04:36 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 101AB2842D for ; Mon, 21 Nov 2011 15:04:33 +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 dlKxMZXUnjjP for ; Mon, 21 Nov 2011 15:04:31 +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 VA3EHSOBE010.bigfish.com (mail-va3.bigfish.com [216.32.180.10]) by theia.denx.de (Postfix) with ESMTPS id DDCB02842E for ; Mon, 21 Nov 2011 15:04:30 +0100 (CET) Received: from mail61-va3-R.bigfish.com (10.7.14.249) by VA3EHSOBE010.bigfish.com (10.7.40.12) with Microsoft SMTP Server id 14.1.225.22; Mon, 21 Nov 2011 14:03:50 +0000 Received: from mail61-va3 (localhost [127.0.0.1]) by mail61-va3-R.bigfish.com (Postfix) with ESMTP id E544F1C0128; Mon, 21 Nov 2011 14:00:06 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h64h) X-Spam-TCS-SCL: 3:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-FB-SS: 0, Received: from mail61-va3 (localhost.localdomain [127.0.0.1]) by mail61-va3 (MessageSwitch) id 1321884006763635_27784; Mon, 21 Nov 2011 14:00:06 +0000 (UTC) Received: from VA3EHSMHS017.bigfish.com (unknown [10.7.14.244]) by mail61-va3.bigfish.com (Postfix) with ESMTP id 92DCC8004C; Mon, 21 Nov 2011 14:00:06 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS017.bigfish.com (10.7.99.27) with Microsoft SMTP Server (TLS) id 14.1.225.22; Mon, 21 Nov 2011 14:03:43 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server id 14.1.339.2; Mon, 21 Nov 2011 08:04:20 -0600 Received: from localhost.localdomain ([10.29.240.141]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id pALE4GH5009955; Mon, 21 Nov 2011 08:04:19 -0600 (CST) From: Fabio Estevam To: Date: Mon, 21 Nov 2011 12:09:45 -0200 Message-ID: <1321884585-12501-2-git-send-email-fabio.estevam@freescale.com> X-Mailer: git-send-email 1.6.0.4 In-Reply-To: <1321884585-12501-1-git-send-email-fabio.estevam@freescale.com> References: <1321884585-12501-1-git-send-email-fabio.estevam@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: Fabio Estevam Subject: [U-Boot] [PATCH 2/2] vision2: Configure the pins as GPIOs prior to using 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Configure the pin as GPIO prior to using gpio_get_value Signed-off-by: Fabio Estevam --- board/ttcontrol/vision2/vision2.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/board/ttcontrol/vision2/vision2.c b/board/ttcontrol/vision2/vision2.c index f556d30..e0fa39d 100644 --- a/board/ttcontrol/vision2/vision2.c +++ b/board/ttcontrol/vision2/vision2.c @@ -529,8 +529,11 @@ int get_mmc_getcd(u8 *cd, struct mmc *mmc) { struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; - if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR) + if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR) { + mxc_request_iomux(MX51_PIN_GPIO1_0, IOMUX_CONFIG_ALT1); *cd = gpio_get_value(0); + } + else *cd = 0;