From patchwork Mon Aug 25 12:26:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 35907 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 76A71203C0 for ; Mon, 25 Aug 2014 12:26:43 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id la4sf41094401vcb.10 for ; Mon, 25 Aug 2014 05:26:43 -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=aLK+vH6H0nkcg9hWQ1V9i8EEcLCr2iSaUxzmiP5NbzI=; b=QdEaeA5y2oaifpsd5ByTCky6sZFRKZVwiXoz1W+O7f8qsCakz0edBXgx4/LC3e5Qp0 feBwvBjLqzU66l5OoQlrMyhlLETj9mtP6nJwBjCfcKyncAmdLeNVeYeZq8zR/Ta+1ddp +RQilgTEXpMGZe4lHI9lF9n7OzrGHHn5ZvIecS0ZQeOAHx4cCSaYQwiM55EwkwQ2vETY aiYw8DW397N7pHf4c49PIjjFTcziSA6qLQr/ce+z/rcK1bRive+TT0/PcM1JezuB8ivS oudCzxargWXNi/d/PL++coLb36PLKPNgk7KFJHfhkgj/FSoYQrdAniXZTnhjeAtVAXaH k63Q== X-Gm-Message-State: ALoCoQmuoJw5ZlJrnGjeWUaXEv2+R9FIcF+X39WnaLX95PCWqTbTNrDaMJ/g1AAF62tQpqUtJqWN X-Received: by 10.236.121.133 with SMTP id r5mr13888781yhh.28.1408969603206; Mon, 25 Aug 2014 05:26:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.36.168 with SMTP id p37ls455197qgp.12.gmail; Mon, 25 Aug 2014 05:26:43 -0700 (PDT) X-Received: by 10.52.137.51 with SMTP id qf19mr240989vdb.97.1408969603134; Mon, 25 Aug 2014 05:26:43 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id k6si11076165vcl.81.2014.08.25.05.26.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Aug 2014 05:26:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id hq11so15159445vcb.30 for ; Mon, 25 Aug 2014 05:26:43 -0700 (PDT) X-Received: by 10.220.81.132 with SMTP id x4mr18431218vck.0.1408969603072; Mon, 25 Aug 2014 05:26:43 -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 uj3csp113271vcb; Mon, 25 Aug 2014 05:26:42 -0700 (PDT) X-Received: by 10.180.74.42 with SMTP id q10mr15235347wiv.39.1408969602023; Mon, 25 Aug 2014 05:26:42 -0700 (PDT) Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by mx.google.com with ESMTPS id g4si77072wiv.28.2014.08.25.05.26.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Aug 2014 05:26:42 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 74.125.82.51 as permitted sender) client-ip=74.125.82.51; Received: by mail-wg0-f51.google.com with SMTP id b13so12983649wgh.10 for ; Mon, 25 Aug 2014 05:26:41 -0700 (PDT) X-Received: by 10.180.101.129 with SMTP id fg1mr14948283wib.20.1408969601384; Mon, 25 Aug 2014 05:26:41 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id u5sm145337wia.17.2014.08.25.05.26.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Aug 2014 05:26:40 -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 11/12] mmc: tmio_mmc: Fixup system PM suspend lock-up Date: Mon, 25 Aug 2014 14:26:03 +0200 Message-Id: <1408969564-6335-12-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.171 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 --- drivers/mmc/host/tmio_mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c index 58f50ef..659028d 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c @@ -30,7 +30,7 @@ static int tmio_mmc_suspend(struct device *dev) const struct mfd_cell *cell = mfd_get_cell(pdev); int ret; - ret = tmio_mmc_host_suspend(dev); + ret = pm_runtime_force_suspend(dev); /* Tell MFD core it can disable us now.*/ if (!ret && cell->disable) @@ -50,7 +50,7 @@ static int tmio_mmc_resume(struct device *dev) ret = cell->resume(pdev); if (!ret) - ret = tmio_mmc_host_resume(dev); + ret = pm_runtime_force_resume(dev); return ret; }