From patchwork Wed Nov 7 22:57:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Heiko_St=C3=BCbner?= X-Patchwork-Id: 1712951 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 365F33FCAE for ; Wed, 7 Nov 2012 23:38:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754261Ab2KGXiZ (ORCPT ); Wed, 7 Nov 2012 18:38:25 -0500 Received: from gloria.sntech.de ([95.129.55.99]:55110 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754186Ab2KGXiZ (ORCPT ); Wed, 7 Nov 2012 18:38:25 -0500 Received: from 191.red-80-33-160.staticip.rima-tde.net ([80.33.160.191] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1TWEYx-0000cy-1L; Wed, 07 Nov 2012 23:58:12 +0100 From: Heiko =?iso-8859-1?q?St=FCbner?= To: Chris Ball Subject: [PATCH] Revert "mmc: sdhci-s3c: Add clk_(enable/disable) in runtime suspend/resume" Date: Wed, 7 Nov 2012 23:57:15 +0100 User-Agent: KMail/1.13.7 (Linux/3.2.0-2-amd64; KDE/4.8.4; x86_64; ; ) Cc: linux-mmc@vger.kernel.org, Chander Kashyap , Seungwon Jeon MIME-Version: 1.0 Message-Id: <201211072357.15572.heiko@sntech.de> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org This reverts commit 2abeb5c5ded2e7f7d288058426fb0ae852adc77f, as it breaks machines using the gpio-based card-detect option with a loop of mmc0: Timeout waiting for hardware interrupt. mmc0: Internal clock never stabilised. mmc0: Timeout waiting for hardware interrupt. mmc0: Internal clock never stabilised. Signed-off-by: Heiko Stuebner --- This is of course meant for 3.7-rc drivers/mmc/host/sdhci-s3c.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 2903949..e019672 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -637,9 +637,7 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev) goto err_no_busclks; } -#ifndef CONFIG_PM_RUNTIME clk_enable(sc->clk_bus[sc->cur_clk]); -#endif res = platform_get_resource(pdev, IORESOURCE_MEM, 0); host->ioaddr = devm_request_and_ioremap(&pdev->dev, res); @@ -746,15 +744,10 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev) gpio_is_valid(pdata->ext_cd_gpio)) sdhci_s3c_setup_card_detect_gpio(sc); -#ifdef CONFIG_PM_RUNTIME - clk_disable(sc->clk_io); -#endif return 0; err_req_regs: -#ifndef CONFIG_PM_RUNTIME clk_disable(sc->clk_bus[sc->cur_clk]); -#endif for (ptr = 0; ptr < MAX_BUS_CLK; ptr++) { if (sc->clk_bus[ptr]) { clk_put(sc->clk_bus[ptr]); @@ -793,17 +786,12 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev) if (gpio_is_valid(sc->ext_cd_gpio)) gpio_free(sc->ext_cd_gpio); -#ifdef CONFIG_PM_RUNTIME - clk_enable(sc->clk_io); -#endif sdhci_remove_host(host, 1); pm_runtime_dont_use_autosuspend(&pdev->dev); pm_runtime_disable(&pdev->dev); -#ifndef CONFIG_PM_RUNTIME clk_disable(sc->clk_bus[sc->cur_clk]); -#endif for (ptr = 0; ptr < MAX_BUS_CLK; ptr++) { if (sc->clk_bus[ptr]) { clk_put(sc->clk_bus[ptr]); @@ -843,28 +831,15 @@ static int sdhci_s3c_resume(struct device *dev) static int sdhci_s3c_runtime_suspend(struct device *dev) { struct sdhci_host *host = dev_get_drvdata(dev); - struct sdhci_s3c *ourhost = to_s3c(host); - struct clk *busclk = ourhost->clk_io; - int ret; - - ret = sdhci_runtime_suspend_host(host); - clk_disable(ourhost->clk_bus[ourhost->cur_clk]); - clk_disable(busclk); - return ret; + return sdhci_runtime_suspend_host(host); } static int sdhci_s3c_runtime_resume(struct device *dev) { struct sdhci_host *host = dev_get_drvdata(dev); - struct sdhci_s3c *ourhost = to_s3c(host); - struct clk *busclk = ourhost->clk_io; - int ret; - clk_enable(busclk); - clk_enable(ourhost->clk_bus[ourhost->cur_clk]); - ret = sdhci_runtime_resume_host(host); - return ret; + return sdhci_runtime_resume_host(host); } #endif