From patchwork Mon Jun 10 15:03:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 17744 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f70.google.com (mail-vb0-f70.google.com [209.85.212.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 076982397B for ; Mon, 10 Jun 2013 15:04:30 +0000 (UTC) Received: by mail-vb0-f70.google.com with SMTP id q12sf2371136vbe.1 for ; Mon, 10 Jun 2013 08:04:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-beenthere:x-forwarded-to:x-forwarded-for:delivered-to:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :mime-version:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=rCytqjrLsOiaM/SbS4z/oE5wDNzeHGwWf6yfZH4g7TA=; b=eq6As6aS2cuhtWtRHKsW1Gcpu8dzAy4DNSun7zxA8lwtWlkaYPEEMilZAL+aVGeMPd myELi6XofXK0yyCr0NcKT0jRV94d/y8LXt1d9ECPJ3BIf2hiw7qQpK6hetrJ6gPpM9Un rp4elkekffWqtWh+SkHO1qUbSeOZAznSPTE04/8gtEms3Ro4nsL8s1jV4Oqow2Y6Bmyz 61l4GLK/LMKL1k4bjysIYQyAIi8xKwN8x/9cccd+L4SOeacnzoEHYHcODR8jhDD5f0lu V/HROxI6EO53mitTYYJI8eAhdDCGaUAZDZ0MOEvF0IgZnfkKdIOR4V71Qk3P5V3ahHHa Cd6g== X-Received: by 10.224.174.145 with SMTP id t17mr8608799qaz.4.1370876669678; Mon, 10 Jun 2013 08:04:29 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.29.3 with SMTP id f3ls2780323qeh.83.gmail; Mon, 10 Jun 2013 08:04:29 -0700 (PDT) X-Received: by 10.58.50.198 with SMTP id e6mr5866661veo.30.1370876669397; Mon, 10 Jun 2013 08:04:29 -0700 (PDT) Received: from mail-ve0-x22a.google.com (mail-ve0-x22a.google.com [2607:f8b0:400c:c01::22a]) by mx.google.com with ESMTPS id i5si5042744vcn.86.2013.06.10.08.04.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Jun 2013 08:04:29 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22a is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::22a; Received: by mail-ve0-f170.google.com with SMTP id 14so4892251vea.1 for ; Mon, 10 Jun 2013 08:04:29 -0700 (PDT) X-Received: by 10.52.36.115 with SMTP id p19mr4970309vdj.8.1370876669256; Mon, 10 Jun 2013 08:04:29 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.10.206 with SMTP id pb14csp71501vcb; Mon, 10 Jun 2013 08:04:28 -0700 (PDT) X-Received: by 10.14.201.7 with SMTP id a7mr11622764eeo.95.1370876668206; Mon, 10 Jun 2013 08:04:28 -0700 (PDT) Received: from eu1sys200aog102.obsmtp.com (eu1sys200aog102.obsmtp.com [207.126.144.113]) by mx.google.com with SMTP id q6si8532758eew.174.2013.06.10.08.04.25 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 10 Jun 2013 08:04:28 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.113 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) client-ip=207.126.144.113; Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob102.postini.com ([207.126.147.11]) with SMTP ID DSNKUbXq+EZHiFIMEUyEzaxMwat/9sYkXo9a@postini.com; Mon, 10 Jun 2013 15:04:28 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id DA56B44; Mon, 10 Jun 2013 15:03:21 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 6557254; Mon, 10 Jun 2013 15:04:22 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 00A2EA8065; Mon, 10 Jun 2013 17:04:16 +0200 (CEST) Received: from steludxu1397.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.279.5; Mon, 10 Jun 2013 17:04:21 +0200 From: Ulf Hansson To: , Chris Ball Cc: Ulf Hansson Subject: [PATCH 11/12] mmc: core: Invent MMC_CAP2_FULL_PWR_CYCLE Date: Mon, 10 Jun 2013 17:03:46 +0200 Message-ID: <1370876627-13439-12-git-send-email-ulf.hansson@stericsson.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1370876627-13439-1-git-send-email-ulf.hansson@stericsson.com> References: <1370876627-13439-1-git-send-email-ulf.hansson@stericsson.com> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkAyfrFiplBeXQHSbuB1DxTRxhREcqU+ml+djPgfuG6nh1Oh3FAekCffWDf42n5nBpBQC1E X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22a is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Ulf Hansson MMC_CAP2_FULL_PWR_CYCLE shall be set by host drivers which are able to do a complete power cycle of the card. In the eMMC case that includes both vcc and vccq. This CAP is providing the protocol layer with important information, needed to take optimized decisions during card initialization and in the suspend/resume sequence. MMC_CAP2_POWEROFF_NOTIFY is replaced by MMC_CAP2_FULL_PWR_CYCLE, since it makes sense to use a wider scope for it. Signed-off-by: Ulf Hansson --- drivers/mmc/core/mmc.c | 2 +- include/linux/mmc/host.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index a96dcaa..38315f8 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1484,7 +1484,7 @@ static int _mmc_suspend(struct mmc_host *host, bool is_suspend) goto out; if (mmc_can_poweroff_notify(host->card) && - ((host->caps2 & MMC_CAP2_POWEROFF_NOTIFY) || !is_suspend)) + ((host->caps2 & MMC_CAP2_FULL_PWR_CYCLE) || !is_suspend)) err = mmc_poweroff_notify(host->card, notify_type); else if (mmc_can_sleep(host->card)) err = mmc_sleep(host); diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 2e34ee5..c6dedc7 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -264,7 +264,7 @@ struct mmc_host { #define MMC_CAP2_BOOTPART_NOACC (1 << 0) /* Boot partition no access */ #define MMC_CAP2_CACHE_CTRL (1 << 1) /* Allow cache control */ -#define MMC_CAP2_POWEROFF_NOTIFY (1 << 2) /* Notify poweroff supported */ +#define MMC_CAP2_FULL_PWR_CYCLE (1 << 2) /* Can do full power cycle */ #define MMC_CAP2_NO_MULTI_READ (1 << 3) /* Multiblock reads don't work */ #define MMC_CAP2_NO_SLEEP_CMD (1 << 4) /* Don't allow sleep command */ #define MMC_CAP2_HS200_1_8V_SDR (1 << 5) /* can support */