Skip to content

Commit 0aa55c2

Browse files
Seungwon Jeoncjb
authored andcommitted
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>
1 parent 0f310a0 commit 0aa55c2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/mmc/host/sdhci-s3c.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,8 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
747747
sdhci_s3c_setup_card_detect_gpio(sc);
748748

749749
#ifdef CONFIG_PM_RUNTIME
750-
clk_disable_unprepare(sc->clk_io);
750+
if (pdata->cd_type != S3C_SDHCI_CD_INTERNAL)
751+
clk_disable_unprepare(sc->clk_io);
751752
#endif
752753
return 0;
753754

@@ -794,7 +795,8 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev)
794795
gpio_free(sc->ext_cd_gpio);
795796

796797
#ifdef CONFIG_PM_RUNTIME
797-
clk_prepare_enable(sc->clk_io);
798+
if (pdata->cd_type != S3C_SDHCI_CD_INTERNAL)
799+
clk_prepare_enable(sc->clk_io);
798800
#endif
799801
sdhci_remove_host(host, 1);
800802

0 commit comments

Comments
 (0)