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: 4774171 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7D0D29F3B4 for ; Mon, 25 Aug 2014 12:28:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A9F38200D6 for ; Mon, 25 Aug 2014 12:28:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 445A62012B for ; Mon, 25 Aug 2014 12:28:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932535AbaHYM22 (ORCPT ); Mon, 25 Aug 2014 08:28:28 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:41113 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932374AbaHYM0l (ORCPT ); Mon, 25 Aug 2014 08:26:41 -0400 Received: by mail-wi0-f173.google.com with SMTP id f8so2450798wiw.0 for ; Mon, 25 Aug 2014 05:26:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=i/Hm9mqUs8atvao/AdxMuQPTeUTBACnVv/vjonprknM=; b=WLUHvJcrIzH64ityttSWaCB94Ee/N15tsvakZOKRfpCaZ1Tkr36k5zuqbHjgrAYuZr btLnZ9aOH8sWipCSMRzekjTP6MYZKBMdGInsRjk9yFfH+eyGfTZ08aKRxSxuzx4Sfiyw QGHfqS3YVHSr3+5vBvd+WfR/YHKGWMdqTikBOuL02YOjOdcnKTg20TjEUDT3B7YRsRQv aO0tKs/RvJ+/i8BU83oBfMDWBeZWmz0MO28Yea3LBMMDMuHLkiI89CiN6MDnR0fuooAF x8iV15wKPCXDves+Vy9751Oi/KIZwvyAMpsxorp6WXnY0LEg3ZBMnc+sNFsfAU4e1iq+ YH0w== X-Gm-Message-State: ALoCoQnBpZYcQDT83RQjmXZU6hwbGIWTrwGSTgknc1gWcI3FLlQk9vD4ctadUp0QXbr7euVMKJ/q 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> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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)