From patchwork Wed Apr 19 21:17:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 97684 Delivered-To: patches@linaro.org Received: by 10.182.246.10 with SMTP id xs10csp447964obc; Wed, 19 Apr 2017 14:17:25 -0700 (PDT) X-Received: by 10.28.191.145 with SMTP id o17mr50133wmi.20.1492636645434; Wed, 19 Apr 2017 14:17:25 -0700 (PDT) Return-Path: Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com. [2a00:1450:400c:c09::22b]) by mx.google.com with ESMTPS id t75si5587964wrc.41.2017.04.19.14.17.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Apr 2017 14:17:25 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:400c:c09::22b as permitted sender) client-ip=2a00:1450:400c:c09::22b; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:400c:c09::22b as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-wm0-x22b.google.com with SMTP id w64so89942955wma.0 for ; Wed, 19 Apr 2017 14:17:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6hxCabfxbCBaswrq5NyVtg+BI2F0J0gVrrYL7w1LQeQ=; b=fwZ54P6DyqDi0xE0BwwAGjO74k5JwUIdjBGfNls1QICqzrWBrNj+WVqWxlcB1UURKx O3xgAxDXc3WeSCYY/+ftFbLz254H2L9svxpGaigmRta0/lfEfSJrfkFte19yzoW3IHb0 xDINBiy9MSD0Qf56hCfy789/7D8vLkth84KDY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6hxCabfxbCBaswrq5NyVtg+BI2F0J0gVrrYL7w1LQeQ=; b=Hd9L/70b96Ykey/MROoSQeAi2j1dVUhUS0MT1edKb7vEkWrC4BPf3T5+bjoeUfrIYa quKKGb6CDukMexNzYzODiGDur/ewmT6d1Uxkqd1tbMK2Aed81kDMMkmw/W8fp6fdh9lN m4Rw99kHR0fjpjaRLZs6oBbrXo9FNzL8OkiDCBH3M/f19vzLtCQxB7KvtKDwNPvTh3fB sK9hu3NUMJmK7NdLiGwb0MbXF4Yc5cx6TcsmWfUY+bJDhMIRh0s+3/EESdn/bf9H+JMk 6bHZ7P9NsR1KZxStukmz3yxTGYl5fIDeTIzW45AbwtS/AWtX1awiL7N60Th1/NaJZ9Jx UNWQ== X-Gm-Message-State: AN3rC/4M7b7CvwtPVuVaSvqWWzoLam6TqkQr4K7ivvT84Wx1cGWF2x+4 k88hYN0Re+HZhoNxSqs= X-Received: by 10.28.69.68 with SMTP id s65mr22683wma.13.1492636645073; Wed, 19 Apr 2017 14:17:25 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-155-4-221-67.na.cust.bahnhof.se. [155.4.221.67]) by smtp.gmail.com with ESMTPSA id g53sm4837747wrg.22.2017.04.19.14.17.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Apr 2017 14:17:24 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Jaehoon Chung , Adrian Hunter , Brian Norris , Shawn Lin , Doug Anderson Subject: [PATCH v2 5/5] Revert "mmc: dw_mmc: Don't allow Runtime PM for SDIO cards" Date: Wed, 19 Apr 2017 23:17:11 +0200 Message-Id: <1492636631-28254-6-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1492636631-28254-1-git-send-email-ulf.hansson@linaro.org> References: <1492636631-28254-1-git-send-email-ulf.hansson@linaro.org> This reverts commit a6db2c86033bc41329770e90c20d4f1fec3824e4. As dw_mmc now is capable of preventing runtime PM suspend while SDIO IRQs are enabled, let's drop the less fine-grained approach of preventing runtime PM suspend for all SDIO cards. In this way we wont keep the host runtime PM resumed, unless really needed and thus avoiding to waste power. Signed-off-by: Ulf Hansson --- drivers/mmc/host/dw_mmc.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) -- 2.7.4 diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index c14a36b..c95dc9b 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -1622,16 +1621,10 @@ static void dw_mci_init_card(struct mmc_host *mmc, struct mmc_card *card) if (card->type == MMC_TYPE_SDIO || card->type == MMC_TYPE_SD_COMBO) { - if (!test_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags)) { - pm_runtime_get_noresume(mmc->parent); - set_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags); - } + set_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags); clk_en_a = clk_en_a_old & ~clken_low_pwr; } else { - if (test_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags)) { - pm_runtime_put_noidle(mmc->parent); - clear_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags); - } + clear_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags); clk_en_a = clk_en_a_old | clken_low_pwr; }