From patchwork Thu Feb 20 15:31:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 25063 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1C070203C6 for ; Thu, 20 Feb 2014 15:31:47 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id e16sf3749142qcx.0 for ; Thu, 20 Feb 2014 07:31:46 -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=bb+F+VOOkqa2m3MtvW3j8ErGfMHu2cJawU9CUwD+4T/9+Lg05UEXQRyTEwHUhER8aP DGp7BaEzOMG7UoevKiNxXEyVOpuVVpiDEwMbLOV7OyPa4lW/7mA6osGBhUyrmoHmccXr CegQc2nfqbDaLMcDmuBi2njD/MsSYOunbEEPxLCGPAUmNPqgj4/t777vVLDc5eVZttys XDGCfs8vDJ8YHf6s8YI7JjI/xN/k4Nz+lhqx/p3VZ9/tvKO+8M9kU7ecUMDeGyJVL3Mn CMtpQIzV58/fMSDP8heZZ6ZHXCLsXgadRmoYeVQOfSMHrAYnTh7tJY8sA9h5ludzHgnL JvJg== X-Gm-Message-State: ALoCoQkQX8k7AaPrFMBv1A/FZ0DxVLA724CJbefdJOE7XEEcGBN2kS5YAKgQR6hRM81zj8sqnYFg X-Received: by 10.236.221.168 with SMTP id r38mr900955yhp.54.1392910306847; Thu, 20 Feb 2014 07:31:46 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.18.148 with SMTP id 20ls571195qgf.89.gmail; Thu, 20 Feb 2014 07:31:46 -0800 (PST) X-Received: by 10.52.181.1 with SMTP id ds1mr1142688vdc.92.1392910306717; Thu, 20 Feb 2014 07:31:46 -0800 (PST) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id x7si1598361vel.0.2014.02.20.07.31.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 07:31:46 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id le5so1993837vcb.16 for ; Thu, 20 Feb 2014 07:31:46 -0800 (PST) X-Received: by 10.52.164.39 with SMTP id yn7mr1112557vdb.25.1392910306649; Thu, 20 Feb 2014 07:31:46 -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.174.196 with SMTP id u4csp67178vcz; Thu, 20 Feb 2014 07:31:46 -0800 (PST) X-Received: by 10.180.96.228 with SMTP id dv4mr3182492wib.24.1392910301097; Thu, 20 Feb 2014 07:31:41 -0800 (PST) Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by mx.google.com with ESMTPS id db6si3834351wib.25.2014.02.20.07.31.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 07:31:41 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.54 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=74.125.82.54; Received: by mail-wg0-f54.google.com with SMTP id l18so1611017wgh.9 for ; Thu, 20 Feb 2014 07:31:40 -0800 (PST) X-Received: by 10.194.57.104 with SMTP id h8mr2713034wjq.36.1392910300372; Thu, 20 Feb 2014 07:31:40 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id h9sm9719799wjz.16.2014.02.20.07.31.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 07:31:39 -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 , Mark Brown , Russell King , Linus Walleij , Wolfram Sang , Alessandro Rubini , Ulf Hansson Subject: [PATCH 6/8] mmc: mmci: Mask IRQs for all variants during runtime suspend Date: Thu, 20 Feb 2014 16:31:18 +0100 Message-Id: <1392910280-12891-7-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1392910280-12891-1-git-send-email-ulf.hansson@linaro.org> References: <1392910280-12891-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.220.171 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)