]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mmc: sdhci-s3c: fix the card detection in runtime-pm
authorSeungwon Jeon <tgih.jun@samsung.com>
Tue, 30 Oct 2012 05:28:36 +0000 (14:28 +0900)
committerChris Ball <cjb@laptop.org>
Wed, 7 Nov 2012 20:40:52 +0000 (15:40 -0500)
If host clock is disabled, host cannot detect a card in case of using
CD internal for detection.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci-s3c.c

index a093e2ecaf809e764b3715df569d69bcba38abeb..a54dd5d7a5f94b1b3e550e799ee95999c5e54df8 100644 (file)
@@ -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);