From patchwork Sat Mar 1 10:56:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 25572 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3CE24206A6 for ; Sat, 1 Mar 2014 10:56:34 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i11sf19076976oag.4 for ; Sat, 01 Mar 2014 02:56:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=qye4Q2MNVzyCwKWVfvdlt7B5QfmU4KPvw/097sbewXE=; b=BNEPpw75RZmY5ofMiyyYhSj5QdDHedwaSODBGtDSRVcdPFJvu02s3x3MvdiYcK8WWC MRyNbwrn/aa8DyldhmmGpXDdvRvakpzyrigjguhsao8a6eY6Q74PoAzkWD2rYTDi9xpz fFRNFRYLF2+zoq1PM0+ZTNSvpKGmEWvo3iwI6B32ALAqRs3zlY5yCCGuda0pzYu73ihc mU1p+5QTvH+NN8qNBPQWXeT5upgEIGadGub9dCJgZ2MAAVk60AirMP3xhf/Xme2YYUz+ 5pBQ1HjdktGK6rj+Ofo/BJjUvnUM0mA23cMDhm3SWsZOydNOjpxXm1xpyGm3+BVmqRTP GSMA== X-Gm-Message-State: ALoCoQnze0kI3m+qum4RlorMctuD6rmFieczoaaGUzorUgkn0UeNixOFvmCRZpiWr511E5ZUy1c6 X-Received: by 10.42.110.198 with SMTP id r6mr6756812icp.33.1393671393572; Sat, 01 Mar 2014 02:56:33 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.47.9 with SMTP id l9ls1341570qga.13.gmail; Sat, 01 Mar 2014 02:56:33 -0800 (PST) X-Received: by 10.220.147.16 with SMTP id j16mr7040627vcv.28.1393671393458; Sat, 01 Mar 2014 02:56:33 -0800 (PST) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id nc1si1326237vec.24.2014.03.01.02.56.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 01 Mar 2014 02:56:33 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id pa12so1904953veb.1 for ; Sat, 01 Mar 2014 02:56:33 -0800 (PST) X-Received: by 10.58.66.137 with SMTP id f9mr6940315vet.11.1393671393133; Sat, 01 Mar 2014 02:56:33 -0800 (PST) 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.220.130.193 with SMTP id u1csp114212vcs; Sat, 1 Mar 2014 02:56:32 -0800 (PST) X-Received: by 10.152.3.201 with SMTP id e9mr15311412lae.14.1393671392014; Sat, 01 Mar 2014 02:56:32 -0800 (PST) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com [209.85.217.171]) by mx.google.com with ESMTPS id ka4si7914159lbc.85.2014.03.01.02.56.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 01 Mar 2014 02:56:32 -0800 (PST) Received-SPF: neutral (google.com: 209.85.217.171 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=209.85.217.171; Received: by mail-lb0-f171.google.com with SMTP id w7so3416344lbi.16 for ; Sat, 01 Mar 2014 02:56:31 -0800 (PST) X-Received: by 10.153.7.137 with SMTP id dc9mr15427944lad.25.1393671391406; Sat, 01 Mar 2014 02:56:31 -0800 (PST) Received: from linaro-ulf.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id qf1sm4532484lbc.8.2014.03.01.02.56.29 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 01 Mar 2014 02:56:30 -0800 (PST) From: Ulf Hansson To: "Rafael J. Wysocki" , Len Brown , Pavel Machek , linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Kevin Hilman , Alan Stern , Greg Kroah-Hartman , Mark Brown , Russell King , Linus Walleij , Wolfram Sang , Alessandro Rubini , Josh Cartwright , Ulf Hansson Subject: [PATCH 6/8] mmc: mmci: Mask IRQs for all variants during runtime suspend Date: Sat, 1 Mar 2014 11:56:09 +0100 Message-Id: <1393671371-2398-7-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1393671371-2398-1-git-send-email-ulf.hansson@linaro.org> References: <1393671371-2398-1-git-send-email-ulf.hansson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.170 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: , In runtime suspended state, we are not expecting IRQs and thus we can safely mask them, not only for pwrreg_nopower variants but for all. Obviously we then also need to make sure we restore the IRQ mask while becoming runtime resumed. Cc: Russell King Signed-off-by: Ulf Hansson --- drivers/mmc/host/mmci.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index b931226..178868a 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -1758,35 +1758,34 @@ static void mmci_save(struct mmci_host *host) { unsigned long flags; - if (host->variant->pwrreg_nopower) { - spin_lock_irqsave(&host->lock, flags); + spin_lock_irqsave(&host->lock, flags); - writel(0, host->base + MMCIMASK0); + writel(0, host->base + MMCIMASK0); + if (host->variant->pwrreg_nopower) { writel(0, host->base + MMCIDATACTRL); writel(0, host->base + MMCIPOWER); writel(0, host->base + MMCICLOCK); - mmci_reg_delay(host); - - spin_unlock_irqrestore(&host->lock, flags); } + mmci_reg_delay(host); + spin_unlock_irqrestore(&host->lock, flags); } static void mmci_restore(struct mmci_host *host) { unsigned long flags; - if (host->variant->pwrreg_nopower) { - spin_lock_irqsave(&host->lock, flags); + spin_lock_irqsave(&host->lock, flags); + if (host->variant->pwrreg_nopower) { writel(host->clk_reg, host->base + MMCICLOCK); writel(host->datactrl_reg, host->base + MMCIDATACTRL); writel(host->pwr_reg, host->base + MMCIPOWER); - writel(MCI_IRQENABLE, host->base + MMCIMASK0); - mmci_reg_delay(host); - - spin_unlock_irqrestore(&host->lock, flags); } + writel(MCI_IRQENABLE, host->base + MMCIMASK0); + mmci_reg_delay(host); + + spin_unlock_irqrestore(&host->lock, flags); } static int mmci_runtime_suspend(struct device *dev)