From patchwork Fri Nov 6 15:59:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ludovic Desroches X-Patchwork-Id: 7569931 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 829E29F4F5 for ; Fri, 6 Nov 2015 16:02:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B9408206DC for ; Fri, 6 Nov 2015 16:01:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A26C4206D8 for ; Fri, 6 Nov 2015 16:01:58 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZujR2-0007I8-Mi; Fri, 06 Nov 2015 16:00:16 +0000 Received: from eusmtp01.atmel.com ([212.144.249.243]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZujQq-0006Jd-Rx for linux-arm-kernel@lists.infradead.org; Fri, 06 Nov 2015 16:00:05 +0000 Received: from ibiza.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.31) with Microsoft SMTP Server id 14.3.235.1; Fri, 6 Nov 2015 16:59:49 +0100 From: Ludovic Desroches To: , , Subject: [PATCH 1/2] mmc: sdhci: set bus voltage before enabling bus power Date: Fri, 6 Nov 2015 16:59:29 +0100 Message-ID: <1446825570-30029-2-git-send-email-ludovic.desroches@atmel.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1446825570-30029-1-git-send-email-ludovic.desroches@atmel.com> References: <1446825570-30029-1-git-send-email-ludovic.desroches@atmel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151106_080005_326485_A8BE17A4 X-CRM114-Status: UNSURE ( 9.00 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Ludovic Desroches , pierre.samat@atmel.com, plagnioj@jcrosoft.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When there is a vmmc regulator, only SD Bus Power is set to 1 in the Power Control Register. It means SD Bus Voltage Select field is set to 0 that is a reserved value. The SD Host Controller specification says: 'SD Bus Power: Before setting this bit, the SD Host Driver shall set SD Bus Voltage Select.' and 'If the Host Driver selects an unsupported voltage in the SD B?us Voltage Select field, the Host Controller may ignore writes to SD Bus Power and keep its value at zero." Having an external regulator means the SD Bus Voltage Select is useless but if the Host Controller strictly follows the specification then we need to set a valid value. Signed-off-by: Ludovic Desroches --- drivers/mmc/host/sdhci.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index ac97b46..0cfd7b2 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1278,13 +1278,6 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned char mode, spin_unlock_irq(&host->lock); mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd); spin_lock_irq(&host->lock); - - if (mode != MMC_POWER_OFF) - sdhci_writeb(host, SDHCI_POWER_ON, SDHCI_POWER_CONTROL); - else - sdhci_writeb(host, 0, SDHCI_POWER_CONTROL); - - return; } if (mode != MMC_POWER_OFF) {