summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci-s3c.c
diff options
context:
space:
mode:
authorSeungwon Jeon <tgih.jun@samsung.com>2012-10-30 06:28:36 +0100
committerChris Ball <cjb@laptop.org>2012-11-07 21:40:52 +0100
commit0aa55c2367f082876f92660312214cd20c6a024b (patch)
tree999e2be6bd80b799b616b8d4e12a6aa5d79e6a8a /drivers/mmc/host/sdhci-s3c.c
parentmmc: sdhci-s3c: use clk_prepare_enable and clk_disable_unprepare (diff)
downloadlinux-0aa55c2367f082876f92660312214cd20c6a024b.tar.xz
linux-0aa55c2367f082876f92660312214cd20c6a024b.zip
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 <tgih.jun@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-s3c.c')
-rw-r--r--drivers/mmc/host/sdhci-s3c.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index a093e2ecaf80..a54dd5d7a5f9 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);