From patchwork Tue Dec 2 16:47:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 5421301 Return-Path: X-Original-To: patchwork-linux-arm@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 7360A9F319 for ; Tue, 2 Dec 2014 16:51:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A16A720253 for ; Tue, 2 Dec 2014 16:51:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BE1D320225 for ; Tue, 2 Dec 2014 16:51:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XvqcQ-0007Qj-Po; Tue, 02 Dec 2014 16:48:06 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XvqcI-0007KM-23 for linux-arm-kernel@lists.infradead.org; Tue, 02 Dec 2014 16:47:59 +0000 Received: from trochilidae.toradex.int (unknown [46.140.72.82]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 7EBEB5E3688; Tue, 2 Dec 2014 17:46:58 +0100 (CET) From: Stefan Agner To: chris@printf.net, ulf.hansson@linaro.org, anton@enomsg.org Subject: [PATCH 2/2] mmc: sdhci-esdhc-imx: enable IPG clock for sdio interrupts Date: Tue, 2 Dec 2014 17:47:25 +0100 Message-Id: <1417538845-10867-2-git-send-email-stefan@agner.ch> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1417538845-10867-1-git-send-email-stefan@agner.ch> References: <1417538845-10867-1-git-send-email-stefan@agner.ch> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141202_084758_275032_24FD4DAD X-CRM114-Status: UNSURE ( 8.66 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, stefan@agner.ch, rmk+kernel@arm.linux.org.uk, shawn.guo@linaro.org, b29396@freescale.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Enable IPG clock for sdio interrupts while runtime PM, since this clock is needed for register access. The need of this clock has been verified on Vybrid, but this is probably true for i.MX53 and maybe others. The need for bus access during runtime suspend has been introduced with be138554a792 ("mmc: sdhci: allow sdio interrupts while sdhci runtime suspended"). Signed-off-by: Stefan Agner --- drivers/mmc/host/sdhci-esdhc-imx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 587ee0e..b7e9ad1 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1193,10 +1193,10 @@ static int sdhci_esdhc_runtime_suspend(struct device *dev) ret = sdhci_runtime_suspend_host(host); - if (!sdhci_sdio_irq_enabled(host)) { + if (!sdhci_sdio_irq_enabled(host)) clk_disable_unprepare(imx_data->clk_per); - clk_disable_unprepare(imx_data->clk_ipg); - } + + clk_disable_unprepare(imx_data->clk_ipg); clk_disable_unprepare(imx_data->clk_ahb); return ret; @@ -1208,10 +1208,10 @@ static int sdhci_esdhc_runtime_resume(struct device *dev) struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct pltfm_imx_data *imx_data = pltfm_host->priv; - if (!sdhci_sdio_irq_enabled(host)) { + if (!sdhci_sdio_irq_enabled(host)) clk_prepare_enable(imx_data->clk_per); - clk_prepare_enable(imx_data->clk_ipg); - } + + clk_prepare_enable(imx_data->clk_ipg); clk_prepare_enable(imx_data->clk_ahb); return sdhci_runtime_resume_host(host);