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: 7569921 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B71EDC05C6 for ; Fri, 6 Nov 2015 16:00:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E78C4205DC for ; Fri, 6 Nov 2015 16:00:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 13492205CA for ; Fri, 6 Nov 2015 16:00:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932340AbbKFP77 (ORCPT ); Fri, 6 Nov 2015 10:59:59 -0500 Received: from eusmtp01.atmel.com ([212.144.249.243]:18192 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932314AbbKFP77 (ORCPT ); Fri, 6 Nov 2015 10:59:59 -0500 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: , , CC: , , , , , , Ludovic Desroches 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 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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) {