From patchwork Mon Aug 25 12:26:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 35908 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 26F8F203C0 for ; Mon, 25 Aug 2014 12:26:48 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id w10sf107523823pde.7 for ; Mon, 25 Aug 2014 05:26:42 -0700 (PDT) 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=i/Hm9mqUs8atvao/AdxMuQPTeUTBACnVv/vjonprknM=; b=iB2uxm1eJIvgpDdWmutzFzwaIM3Eq8szpVCuWE40Klgp2Ea5djW+HJNUx/dvxeCZV7 5YsBoahZkhVJsEN8qeECw0mRfN1b83l86NTvrKVQA6OmqyDVeYIblMd8LCRiraRUPnOg m498xZ1G3jNVrQXON8wI3gqm65AyuUmBaswb9pnk1H9/lIyOmPFZzM3p3mV/oEK/3ggi F3mmhE4bX3qGGJyC4yUfyUg8kyzsA9p6migZyNgoiXjvFmfTJacqmsGfT36rBFjPqIJK O4eejticd9+003PrMLnFr31UIOfJQ7RFmgRGJPKB/HLm/vbz2l8KutSlwmEum1h5usAm 2aRQ== X-Gm-Message-State: ALoCoQmpPChgwpSv8tjTbYvePD5s3/BJlq4/vrx/iDlnu5lMf7NBlGw2Z+68cKJslpgSvYVvYWs9 X-Received: by 10.66.90.193 with SMTP id by1mr14008405pab.30.1408969602045; Mon, 25 Aug 2014 05:26:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.23.69 with SMTP id 63ls1916244qgo.59.gmail; Mon, 25 Aug 2014 05:26:41 -0700 (PDT) X-Received: by 10.220.49.10 with SMTP id t10mr6066276vcf.34.1408969601951; Mon, 25 Aug 2014 05:26:41 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id k5si2998439vcg.7.2014.08.25.05.26.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Aug 2014 05:26:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id im17so15015925vcb.17 for ; Mon, 25 Aug 2014 05:26:41 -0700 (PDT) X-Received: by 10.220.187.134 with SMTP id cw6mr657086vcb.71.1408969601878; Mon, 25 Aug 2014 05:26:41 -0700 (PDT) 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.221.45.67 with SMTP id uj3csp113270vcb; Mon, 25 Aug 2014 05:26:41 -0700 (PDT) X-Received: by 10.180.37.34 with SMTP id v2mr14757992wij.49.1408969600711; Mon, 25 Aug 2014 05:26:40 -0700 (PDT) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id bl3si40403412wjb.140.2014.08.25.05.26.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Aug 2014 05:26:40 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 74.125.82.178 as permitted sender) client-ip=74.125.82.178; Received: by mail-we0-f178.google.com with SMTP id w61so13281749wes.37 for ; Mon, 25 Aug 2014 05:26:40 -0700 (PDT) X-Received: by 10.194.179.73 with SMTP id de9mr8753799wjc.87.1408969600221; Mon, 25 Aug 2014 05:26:40 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id u5sm145337wia.17.2014.08.25.05.26.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Aug 2014 05:26:39 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ian Molton , Chris Ball Cc: Geert Uytterhoeven , Linux-sh list , linux-kernel@vger.kernel.org, Ulf Hansson Subject: [PATCH 10/12] mmc: sdhi: Fixup system PM suspend lock-up Date: Mon, 25 Aug 2014 14:26:02 +0200 Message-Id: <1408969564-6335-11-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1408969564-6335-1-git-send-email-ulf.hansson@linaro.org> References: <1408969564-6335-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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) 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: , At system PM suspend, the tmio core accessed the internal registers of the controller without first moving the device into active state. This caused a lock-up in system PM suspend phase. The reason for the register access were masking of IRQs. Since that is managed via the runtime PM suspend path, let's just re-use that path for system PM suspend. In other words force the device into runtime PM suspend state at system PM suspend and restore it to active state at system PM resume. Reported-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson Tested-by: Geert Uytterhoeven --- drivers/mmc/host/sh_mobile_sdhi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index 4cd0f09..2dafe28 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c @@ -332,7 +332,8 @@ static int sh_mobile_sdhi_remove(struct platform_device *pdev) } static const struct dev_pm_ops tmio_mmc_dev_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(tmio_mmc_host_suspend, tmio_mmc_host_resume) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) SET_PM_RUNTIME_PM_OPS(tmio_mmc_host_runtime_suspend, tmio_mmc_host_runtime_resume, NULL)