From patchwork Sun Nov 4 03:40:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mela Custodio X-Patchwork-Id: 196971 X-Patchwork-Delegate: afleming@freescale.com 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 457A02C00D8 for ; Sun, 4 Nov 2012 14:40:33 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 947AA4A167; Sun, 4 Nov 2012 04:40:31 +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 ThGxOkWa6lTB; Sun, 4 Nov 2012 04:40:31 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0E70E4A160; Sun, 4 Nov 2012 04:40:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 657A14A160 for ; Sun, 4 Nov 2012 04:40:26 +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 Q4k7smsSInJb for ; Sun, 4 Nov 2012 04:40:24 +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-da0-f44.google.com (mail-da0-f44.google.com [209.85.210.44]) by theia.denx.de (Postfix) with ESMTPS id 194C64A15F for ; Sun, 4 Nov 2012 04:40:22 +0100 (CET) Received: by mail-da0-f44.google.com with SMTP id h15so2183632dan.3 for ; Sat, 03 Nov 2012 20:40:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=qhTVFcp42D1ehr/nJrJSj6IBirvEyEIp9ZKKx9BFgf0=; b=gQkZtumPrtqC2jiT7QvnD/WYBGrKIsPrU7WKV3TLkyH6ifFj03EIuM9LeNWajHcRAG 5YsbJIbbdlT7XDJTMVbvbw3jJsVahm5wRF2xH5LNc7157FeAVhIGa0M2PULEPJanW/DO UoLg/Ru+nBXFRHxoIo4uVZxzdjxjjtnKAep3s7pM0HXI4MGrSKG1/G+UjqDaL2Xrd3AL FQXXz5hzDpRrD91oUUAkj0v0Ntllfpblh4CwY3VRVH7KSQC59KFgqFaf7pBsFgSviMuA PF50doLI176kdeSyBt/6GUURp7byxTfw8ClCxSlF6lg7J1o8VmTUv2X9m9s+5sFa+NPF frnQ== Received: by 10.68.237.6 with SMTP id uy6mr19110175pbc.147.1352000420871; Sat, 03 Nov 2012 20:40:20 -0700 (PDT) Received: from localhost (softbank126053131177.bbtec.net. [126.53.131.177]) by mx.google.com with ESMTPS id s1sm8326505paz.0.2012.11.03.20.40.18 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 03 Nov 2012 20:40:20 -0700 (PDT) Date: Sun, 4 Nov 2012 12:40:16 +0900 From: RgC To: U-Boot@lists.denx.de Message-ID: <20121104034016.GA58919@crg> MIME-Version: 1.0 In-Reply-To: <20121104001018.GA57283@crg> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Andy Fleming Subject: [U-Boot] [PATCH v2] mmc: add no simultaenous power and vdd 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 Bring in the code from Linux kernel. Added to Linux kernel by: commit e08c1694d9e2138204f2b79b73f0f159074ce2f5 Author: Andres Salomon Date: Fri Jul 4 10:00:03 2008 -0700 Some HW balks when writing both voltage setting and power up at the same time to SDHCI_POWER_CONTROL register. Signed-off-by: Rommel G Custodio CC: Andy Fleming v2: fix attribution and SOB --- drivers/mmc/sdhci.c | 3 +++ include/sdhci.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 7845f87..b9cbe34 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -340,6 +340,9 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned short power) return; } + if (host->quirks & SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER) + sdhci_writeb(host, pwr, SDHCI_POWER_CONTROL); + pwr |= SDHCI_POWER_ON; sdhci_writeb(host, pwr, SDHCI_POWER_CONTROL); diff --git a/include/sdhci.h b/include/sdhci.h index c44793d..cffbe53 100644 --- a/include/sdhci.h +++ b/include/sdhci.h @@ -225,6 +225,7 @@ #define SDHCI_QUIRK_BROKEN_VOLTAGE (1 << 4) #define SDHCI_QUIRK_NO_CD (1 << 5) #define SDHCI_QUIRK_WAIT_SEND_CMD (1 << 6) +#define SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER (1 << 7) /* to make gcc happy */ struct sdhci_host;