From patchwork Thu Nov 5 15:01:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 56055 Delivered-To: patches@linaro.org Received: by 10.112.61.134 with SMTP id p6csp455083lbr; Thu, 5 Nov 2015 07:01:53 -0800 (PST) X-Received: by 10.112.61.226 with SMTP id t2mr4162425lbr.11.1446735713231; Thu, 05 Nov 2015 07:01:53 -0800 (PST) Return-Path: Received: from mail-lb0-x229.google.com (mail-lb0-x229.google.com. [2a00:1450:4010:c04::229]) by mx.google.com with ESMTPS id j11si4559755lbb.50.2015.11.05.07.01.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Nov 2015 07:01:53 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c04::229 as permitted sender) client-ip=2a00:1450:4010:c04::229; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c04::229 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dkim=pass header.i=@linaro_org.20150623.gappssmtp.com Received: by lbbwb3 with SMTP id wb3so37294643lbb.1 for ; Thu, 05 Nov 2015 07:01:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=q/4GLinEelQ3cqk/0au8CfvzImn+31N8G3wL4scyEsQ=; b=GYSegyzfttHm3cauU9QBYC4ZvTL69m4jxRJvBVwXKnhtsR3pOXyLdFa1fpJuma1mTt vE98t2liLx/ept4QfeByrnCo64RAV1vP9wB85UcnnAMWMjwyJKWEmC64hLSQY00Pz7gr dLnmKnOucsTwRm90xuAvvVYm+5D+a8D5IMz8fhiBXjoLXN5/1aJOsRu8eaTJmRltHgDR rcaBcRh3CrcfEYfZAVpe/K0RfYLokVWRUoOomwwQIHCxYPUZRRtuP1r6NWFYIWrYbLBs bI1SWp2PPruH2UPubpR/Qs3Dcthl2YkeyEf1eht0wekwT08rSTPQCMvrmrFgDCw6ZDkq 8OZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=q/4GLinEelQ3cqk/0au8CfvzImn+31N8G3wL4scyEsQ=; b=J6I4oXdssmf9QbmYJ3NhhfyEcpa1DrD9E91j9DRt/QDlsWTWc7ggIDapKUVvgLkcPD 2/odw6en/1ey0DzqD/izyKhI9wEf+bNrMl5jje5Xkh1iTBPAUB3+9+OZjuJs980uUElm nhaHB4OywhBu0TLh00rYRZmV+297h+EdUdT9h5VBjtiypTBPGLQya1kOSQQNhXROYvZX tDHfU/GZ9RxFUvQRGdnRjt+RyxFgBzioUPoh/LGiemUhnKKdgiwDPy9doD2yyF1ky/wa kWux9c0BiMKDeOkLmIGMZMIoKALs1iS4fioTUGOMOewSF5TkKvaxuZwFmXK5AIJBZbuM gReg== X-Gm-Message-State: ALoCoQmCubws33KSiVjnhwFiBPEVfEe+RBBe+aqhB4uH5qqFJ8nL1p0Ma/Nt2wk00yWCWqCfI5H2 X-Received: by 10.112.199.100 with SMTP id jj4mr4150849lbc.122.1446735712990; Thu, 05 Nov 2015 07:01:52 -0800 (PST) Return-Path: Received: from uffe-Latitude-E6430s.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id nb1sm1013941lbb.9.2015.11.05.07.01.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Nov 2015 07:01:52 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Chaotian Jing , addy ke , Jaehoon Chung , linux-pm@vger.kernel.org, Android Kernel Team Subject: [PATCH 1/2] mmc: core: Make runtime resume default behavior for MMC/SD Date: Thu, 5 Nov 2015 16:01:32 +0100 Message-Id: <1446735693-11542-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 MMC_CAP_RUNTIME_RESUME was invented to decrease system PM resume time for systems that particularly needs this. As the feature has matured let's make it the default behavior for MMC/SD. Signed-off-by: Ulf Hansson --- drivers/mmc/core/mmc.c | 15 ++------------- drivers/mmc/core/sd.c | 15 ++------------- 2 files changed, 4 insertions(+), 26 deletions(-) -- 1.9.1 diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index c793fda..392fa8c 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1862,16 +1862,8 @@ static int mmc_shutdown(struct mmc_host *host) */ static int mmc_resume(struct mmc_host *host) { - int err = 0; - - if (!(host->caps & MMC_CAP_RUNTIME_RESUME)) { - err = _mmc_resume(host); - pm_runtime_set_active(&host->card->dev); - pm_runtime_mark_last_busy(&host->card->dev); - } pm_runtime_enable(&host->card->dev); - - return err; + return 0; } /* @@ -1899,12 +1891,9 @@ static int mmc_runtime_resume(struct mmc_host *host) { int err; - if (!(host->caps & (MMC_CAP_AGGRESSIVE_PM | MMC_CAP_RUNTIME_RESUME))) - return 0; - err = _mmc_resume(host); if (err) - pr_err("%s: error %d doing aggressive resume\n", + pr_err("%s: error %d doing runtime resume\n", mmc_hostname(host), err); return 0; diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 141eaa9..8f3b46a 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -1128,16 +1128,8 @@ out: */ static int mmc_sd_resume(struct mmc_host *host) { - int err = 0; - - if (!(host->caps & MMC_CAP_RUNTIME_RESUME)) { - err = _mmc_sd_resume(host); - pm_runtime_set_active(&host->card->dev); - pm_runtime_mark_last_busy(&host->card->dev); - } pm_runtime_enable(&host->card->dev); - - return err; + return 0; } /* @@ -1165,12 +1157,9 @@ static int mmc_sd_runtime_resume(struct mmc_host *host) { int err; - if (!(host->caps & (MMC_CAP_AGGRESSIVE_PM | MMC_CAP_RUNTIME_RESUME))) - return 0; - err = _mmc_sd_resume(host); if (err) - pr_err("%s: error %d doing aggressive resume\n", + pr_err("%s: error %d doing runtime resume\n", mmc_hostname(host), err); return 0;