diff options
author | Thomas Abraham <thomas.abraham@linaro.org> | 2012-10-02 19:35:43 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-11-07 15:02:56 -0500 |
commit | 0f310a057feb91ff17a7f4d5f8405e73035084e2 (patch) | |
tree | 0792ecadec93d7f8707ebaee30265c61e1ac63be /drivers/mmc | |
parent | 8e2b36ea6e3abc613cbbdb41692fbd2f9ee18996 (diff) |
mmc: sdhci-s3c: use clk_prepare_enable and clk_disable_unprepare
Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
calls as required by common clock framework.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-s3c.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 2903949594c6..a093e2ecaf80 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c | |||
@@ -211,8 +211,8 @@ static void sdhci_s3c_set_clock(struct sdhci_host *host, unsigned int clock) | |||
211 | if (ourhost->cur_clk != best_src) { | 211 | if (ourhost->cur_clk != best_src) { |
212 | struct clk *clk = ourhost->clk_bus[best_src]; | 212 | struct clk *clk = ourhost->clk_bus[best_src]; |
213 | 213 | ||
214 | clk_enable(clk); | 214 | clk_prepare_enable(clk); |
215 | clk_disable(ourhost->clk_bus[ourhost->cur_clk]); | 215 | clk_disable_unprepare(ourhost->clk_bus[ourhost->cur_clk]); |
216 | 216 | ||
217 | /* turn clock off to card before changing clock source */ | 217 | /* turn clock off to card before changing clock source */ |
218 | writew(0, host->ioaddr + SDHCI_CLOCK_CONTROL); | 218 | writew(0, host->ioaddr + SDHCI_CLOCK_CONTROL); |
@@ -607,7 +607,7 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev) | |||
607 | } | 607 | } |
608 | 608 | ||
609 | /* enable the local io clock and keep it running for the moment. */ | 609 | /* enable the local io clock and keep it running for the moment. */ |
610 | clk_enable(sc->clk_io); | 610 | clk_prepare_enable(sc->clk_io); |
611 | 611 | ||
612 | for (clks = 0, ptr = 0; ptr < MAX_BUS_CLK; ptr++) { | 612 | for (clks = 0, ptr = 0; ptr < MAX_BUS_CLK; ptr++) { |
613 | struct clk *clk; | 613 | struct clk *clk; |
@@ -638,7 +638,7 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev) | |||
638 | } | 638 | } |
639 | 639 | ||
640 | #ifndef CONFIG_PM_RUNTIME | 640 | #ifndef CONFIG_PM_RUNTIME |
641 | clk_enable(sc->clk_bus[sc->cur_clk]); | 641 | clk_prepare_enable(sc->clk_bus[sc->cur_clk]); |
642 | #endif | 642 | #endif |
643 | 643 | ||
644 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 644 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
@@ -747,13 +747,13 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev) | |||
747 | sdhci_s3c_setup_card_detect_gpio(sc); | 747 | sdhci_s3c_setup_card_detect_gpio(sc); |
748 | 748 | ||
749 | #ifdef CONFIG_PM_RUNTIME | 749 | #ifdef CONFIG_PM_RUNTIME |
750 | clk_disable(sc->clk_io); | 750 | clk_disable_unprepare(sc->clk_io); |
751 | #endif | 751 | #endif |
752 | return 0; | 752 | return 0; |
753 | 753 | ||
754 | err_req_regs: | 754 | err_req_regs: |
755 | #ifndef CONFIG_PM_RUNTIME | 755 | #ifndef CONFIG_PM_RUNTIME |
756 | clk_disable(sc->clk_bus[sc->cur_clk]); | 756 | clk_disable_unprepare(sc->clk_bus[sc->cur_clk]); |
757 | #endif | 757 | #endif |
758 | for (ptr = 0; ptr < MAX_BUS_CLK; ptr++) { | 758 | for (ptr = 0; ptr < MAX_BUS_CLK; ptr++) { |
759 | if (sc->clk_bus[ptr]) { | 759 | if (sc->clk_bus[ptr]) { |
@@ -762,7 +762,7 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev) | |||
762 | } | 762 | } |
763 | 763 | ||
764 | err_no_busclks: | 764 | err_no_busclks: |
765 | clk_disable(sc->clk_io); | 765 | clk_disable_unprepare(sc->clk_io); |
766 | clk_put(sc->clk_io); | 766 | clk_put(sc->clk_io); |
767 | 767 | ||
768 | err_io_clk: | 768 | err_io_clk: |
@@ -794,7 +794,7 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev) | |||
794 | gpio_free(sc->ext_cd_gpio); | 794 | gpio_free(sc->ext_cd_gpio); |
795 | 795 | ||
796 | #ifdef CONFIG_PM_RUNTIME | 796 | #ifdef CONFIG_PM_RUNTIME |
797 | clk_enable(sc->clk_io); | 797 | clk_prepare_enable(sc->clk_io); |
798 | #endif | 798 | #endif |
799 | sdhci_remove_host(host, 1); | 799 | sdhci_remove_host(host, 1); |
800 | 800 | ||
@@ -802,14 +802,14 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev) | |||
802 | pm_runtime_disable(&pdev->dev); | 802 | pm_runtime_disable(&pdev->dev); |
803 | 803 | ||
804 | #ifndef CONFIG_PM_RUNTIME | 804 | #ifndef CONFIG_PM_RUNTIME |
805 | clk_disable(sc->clk_bus[sc->cur_clk]); | 805 | clk_disable_unprepare(sc->clk_bus[sc->cur_clk]); |
806 | #endif | 806 | #endif |
807 | for (ptr = 0; ptr < MAX_BUS_CLK; ptr++) { | 807 | for (ptr = 0; ptr < MAX_BUS_CLK; ptr++) { |
808 | if (sc->clk_bus[ptr]) { | 808 | if (sc->clk_bus[ptr]) { |
809 | clk_put(sc->clk_bus[ptr]); | 809 | clk_put(sc->clk_bus[ptr]); |
810 | } | 810 | } |
811 | } | 811 | } |
812 | clk_disable(sc->clk_io); | 812 | clk_disable_unprepare(sc->clk_io); |
813 | clk_put(sc->clk_io); | 813 | clk_put(sc->clk_io); |
814 | 814 | ||
815 | if (pdev->dev.of_node) { | 815 | if (pdev->dev.of_node) { |
@@ -849,8 +849,8 @@ static int sdhci_s3c_runtime_suspend(struct device *dev) | |||
849 | 849 | ||
850 | ret = sdhci_runtime_suspend_host(host); | 850 | ret = sdhci_runtime_suspend_host(host); |
851 | 851 | ||
852 | clk_disable(ourhost->clk_bus[ourhost->cur_clk]); | 852 | clk_disable_unprepare(ourhost->clk_bus[ourhost->cur_clk]); |
853 | clk_disable(busclk); | 853 | clk_disable_unprepare(busclk); |
854 | return ret; | 854 | return ret; |
855 | } | 855 | } |
856 | 856 | ||
@@ -861,8 +861,8 @@ static int sdhci_s3c_runtime_resume(struct device *dev) | |||
861 | struct clk *busclk = ourhost->clk_io; | 861 | struct clk *busclk = ourhost->clk_io; |
862 | int ret; | 862 | int ret; |
863 | 863 | ||
864 | clk_enable(busclk); | 864 | clk_prepare_enable(busclk); |
865 | clk_enable(ourhost->clk_bus[ourhost->cur_clk]); | 865 | clk_prepare_enable(ourhost->clk_bus[ourhost->cur_clk]); |
866 | ret = sdhci_runtime_resume_host(host); | 866 | ret = sdhci_runtime_resume_host(host); |
867 | return ret; | 867 | return ret; |
868 | } | 868 | } |