From patchwork Tue Feb 4 15:58:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 24111 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F0C80202FA for ; Tue, 4 Feb 2014 15:59:28 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id i4sf38611220oah.3 for ; Tue, 04 Feb 2014 07:59:28 -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=cxUyos4kHZUE2eEuqWbBLINKO67FwskRTJ38cZ+qaeBLRwIcsX67Nrtsoz7xZLWz59 YFpy07cComO/t3rjcq3Kw22dpCMHY/pieeSdoa9yJqY104HVfT1OBecATwrLMHgrWmfp ts2kJYavJ7U4bFUv8IJrSBe5Sz0UqwDUjMzm7JkwYL5QeVlHXximaEYaCJF3rrnCEpMQ FXJsIXbFBSol0hJ8rPCyYK08p4WP9eIDRpQqhAYGmXKVm/H6LUbEisVPce60Ra5j4F5F oNsClO3IT/Bpwg9RhJSM8t6skpD3gie77Z7tEK/XnTR0WDFOYLv/KCiNep2Is/F2Fla6 OZjw== X-Gm-Message-State: ALoCoQkElTaCnFbp/rBl1xv7Xf4bARqrveZuv6/OPSGzpKdkrOwo5Ag2g13gmeNHNkKQCW/lXJeb X-Received: by 10.43.158.9 with SMTP id ls9mr15042758icc.18.1391529567974; Tue, 04 Feb 2014 07:59:27 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.42.14 with SMTP id b14ls2503495qga.47.gmail; Tue, 04 Feb 2014 07:59:27 -0800 (PST) X-Received: by 10.58.151.140 with SMTP id uq12mr15734veb.67.1391529567847; Tue, 04 Feb 2014 07:59:27 -0800 (PST) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id o6si1309634vcn.96.2014.02.04.07.59.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Feb 2014 07:59:27 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.174 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.174; Received: by mail-vc0-f174.google.com with SMTP id im17so5821966vcb.5 for ; Tue, 04 Feb 2014 07:59:27 -0800 (PST) X-Received: by 10.220.109.1 with SMTP id h1mr9734244vcp.20.1391529567753; Tue, 04 Feb 2014 07:59:27 -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 u4csp245348vcz; Tue, 4 Feb 2014 07:59:27 -0800 (PST) X-Received: by 10.112.126.135 with SMTP id my7mr1835597lbb.56.1391529566511; Tue, 04 Feb 2014 07:59:26 -0800 (PST) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) by mx.google.com with ESMTPS id pc5si12951294lbb.120.2014.02.04.07.59.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Feb 2014 07:59:26 -0800 (PST) Received-SPF: neutral (google.com: 209.85.215.42 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=209.85.215.42; Received: by mail-la0-f42.google.com with SMTP id hr13so6744779lab.1 for ; Tue, 04 Feb 2014 07:59:25 -0800 (PST) X-Received: by 10.112.173.6 with SMTP id bg6mr17542658lbc.17.1391529565884; Tue, 04 Feb 2014 07:59:25 -0800 (PST) Received: from localhost.localdomain (host-95-199-220-119.mobileonline.telia.com. [95.199.220.119]) by mx.google.com with ESMTPSA id dm8sm35906603lad.7.2014.02.04.07.59.23 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Feb 2014 07:59:25 -0800 (PST) From: Ulf Hansson To: Russell King , linux-arm-kernel@lists.infradead.org Cc: Alessandro Rubini , Linus Walleij , Wolfram Sang , Chris Ball , Mark Brown , linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-spi@vger.kernel.org, linux-mmc@vger.kernel.org, Ulf Hansson Subject: [PATCH 03/17] mmc: mmci: Mask IRQs for all variants during runtime suspend Date: Tue, 4 Feb 2014 16:58:44 +0100 Message-Id: <1391529538-21685-4-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1391529538-21685-1-git-send-email-ulf.hansson@linaro.org> References: <1391529538-21685-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.174 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)