From patchwork Fri Nov 5 09:35:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 303962 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oA59a6PQ020286 for ; Fri, 5 Nov 2010 09:36:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752580Ab0KEJgE (ORCPT ); Fri, 5 Nov 2010 05:36:04 -0400 Received: from eu1sys200aog101.obsmtp.com ([207.126.144.111]:44200 "EHLO eu1sys200aog101.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752307Ab0KEJgD (ORCPT ); Fri, 5 Nov 2010 05:36:03 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 05 Nov 2010 09:36:07 +0000 (UTC) X-Greylist: delayed 69007 seconds by postgrey-1.27 at vger.kernel.org; Fri, 05 Nov 2010 05:36:02 EDT Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob101.postini.com ([207.126.147.11]) with SMTP ID DSNKTNPP+GaWP+6lvTKhCpmvFamTgf2CXrnM@postini.com; Fri, 05 Nov 2010 09:36:03 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id F26D3A7; Fri, 5 Nov 2010 09:35:49 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 870B4239D; Fri, 5 Nov 2010 09:35:49 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 689C524C075; Fri, 5 Nov 2010 10:35:44 +0100 (CET) Received: from localhost.localdomain (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.2.254.0; Fri, 5 Nov 2010 10:35:49 +0100 From: Linus Walleij To: , , Cc: , Ulf Hansson , Linus Walleij Subject: [PATCH] mmci: reset voltage after power off. Date: Fri, 5 Nov 2010 10:35:41 +0100 Message-ID: <1288949741-9712-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.6.3.3 MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 8f86d70..508ed2b 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -940,6 +940,13 @@ static void mmc_power_off(struct mmc_host *host) { host->ios.clock = 0; host->ios.vdd = 0; + + /* + * Reset ocr mask to be the highest possible voltage supported for + * this mmc host. This value will be used at next power up. + */ + host->ocr = 1 << (fls(host->ocr_avail) - 1); + if (!mmc_host_is_spi(host)) { host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN; host->ios.chip_select = MMC_CS_DONTCARE;