From: Seungwon Jeon Date: Tue, 30 Oct 2012 05:28:36 +0000 (+0900) Subject: mmc: sdhci-s3c: fix the card detection in runtime-pm X-Git-Tag: v3.7-rc5~8^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0aa55c2367f082876f92660312214cd20c6a024b;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git mmc: sdhci-s3c: fix the card detection in runtime-pm If host clock is disabled, host cannot detect a card in case of using CD internal for detection. Signed-off-by: Seungwon Jeon Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index a093e2e..a54dd5d 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -747,7 +747,8 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev) sdhci_s3c_setup_card_detect_gpio(sc); #ifdef CONFIG_PM_RUNTIME - clk_disable_unprepare(sc->clk_io); + if (pdata->cd_type != S3C_SDHCI_CD_INTERNAL) + clk_disable_unprepare(sc->clk_io); #endif return 0; @@ -794,7 +795,8 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev) gpio_free(sc->ext_cd_gpio); #ifdef CONFIG_PM_RUNTIME - clk_prepare_enable(sc->clk_io); + if (pdata->cd_type != S3C_SDHCI_CD_INTERNAL) + clk_prepare_enable(sc->clk_io); #endif sdhci_remove_host(host, 1);