From patchwork Sun Nov 4 00:10:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mela Custodio X-Patchwork-Id: 196963 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 F0D7A2C00D0 for ; Sun, 4 Nov 2012 11:10:38 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AEB0D4A15E; Sun, 4 Nov 2012 01:10:32 +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 2FFpnupLlAYy; Sun, 4 Nov 2012 01:10:32 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2F2254A158; Sun, 4 Nov 2012 01:10:30 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 655694A158 for ; Sun, 4 Nov 2012 01:10:28 +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 8d8xQlz6+-4O for ; Sun, 4 Nov 2012 01:10:26 +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-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) by theia.denx.de (Postfix) with ESMTPS id 22E984A157 for ; Sun, 4 Nov 2012 01:10:24 +0100 (CET) Received: by mail-pb0-f44.google.com with SMTP id ro8so3165757pbb.3 for ; Sat, 03 Nov 2012 17:10:22 -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:user-agent; bh=I9p7pzQKwXHb7kP1vcNF/EZ3M+J/qVfqxP9GF/ULIL0=; b=KvYJ9o7pl94WOlN1beeHdf3blvC9OfoXTwFolGmeImukMM6pjFjUG0lTJ0FNZPMDkI xh2fAidQr/Thb2RimDy62Zx7MDsVAjh2WdH72z/YgVAUQh3cKNMi2qs86gZJSYIqnhAq rQiPbMTWMgELgiHKrqS+AbfYTrkQ3Kvw2M5GGO4iWLh/J6MkUZBd2/WJxLNghRPW/CUp HI8TQVFYchBWkOR1gs83YNSViKrrfoX7RUE1d91qrhPcWtp0+bFKZpKUvd8HH2iQbwDR jrU8TGbRmQpM9vKMJYa6jH2L2rFPu2O49cM5GUsm2EnCQmtVFZzRege/e8YSxLeWSBXD 4ZHw== Received: by 10.66.78.4 with SMTP id x4mr17138612paw.60.1351987822384; Sat, 03 Nov 2012 17:10:22 -0700 (PDT) Received: from localhost (ai126250011096.11.tss.access-internet.ne.jp. [126.250.11.96]) by mx.google.com with ESMTPS id v2sm6360295paz.27.2012.11.03.17.10.20 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 03 Nov 2012 17:10:21 -0700 (PDT) Date: Sun, 4 Nov 2012 09:10:18 +0900 From: RgC To: U-Boot@lists.denx.de Message-ID: <20121104001018.GA57283@crg> MIME-Version: 1.0 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Andy Fleming Subject: [U-Boot] [PATCH] 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. Signed-off-by: RgC CC: Andy Fleming modified: drivers/mmc/sdhci.c modified: include/sdhci.h --- 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;