@@ -211,8 +211,8 @@ static void sdhci_s3c_set_clock(struct sdhci_host *host, unsigned int clock)
211
211
if (ourhost -> cur_clk != best_src ) {
212
212
struct clk * clk = ourhost -> clk_bus [best_src ];
213
213
214
- clk_enable (clk );
215
- clk_disable (ourhost -> clk_bus [ourhost -> cur_clk ]);
214
+ clk_prepare_enable (clk );
215
+ clk_disable_unprepare (ourhost -> clk_bus [ourhost -> cur_clk ]);
216
216
217
217
/* turn clock off to card before changing clock source */
218
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
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
612
for (clks = 0 , ptr = 0 ; ptr < MAX_BUS_CLK ; ptr ++ ) {
613
613
struct clk * clk ;
@@ -638,7 +638,7 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
638
638
}
639
639
640
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
642
#endif
643
643
644
644
res = platform_get_resource (pdev , IORESOURCE_MEM , 0 );
@@ -747,13 +747,13 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
747
747
sdhci_s3c_setup_card_detect_gpio (sc );
748
748
749
749
#ifdef CONFIG_PM_RUNTIME
750
- clk_disable (sc -> clk_io );
750
+ clk_disable_unprepare (sc -> clk_io );
751
751
#endif
752
752
return 0 ;
753
753
754
754
err_req_regs :
755
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
757
#endif
758
758
for (ptr = 0 ; ptr < MAX_BUS_CLK ; ptr ++ ) {
759
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
764
err_no_busclks :
765
- clk_disable (sc -> clk_io );
765
+ clk_disable_unprepare (sc -> clk_io );
766
766
clk_put (sc -> clk_io );
767
767
768
768
err_io_clk :
@@ -794,22 +794,22 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev)
794
794
gpio_free (sc -> ext_cd_gpio );
795
795
796
796
#ifdef CONFIG_PM_RUNTIME
797
- clk_enable (sc -> clk_io );
797
+ clk_prepare_enable (sc -> clk_io );
798
798
#endif
799
799
sdhci_remove_host (host , 1 );
800
800
801
801
pm_runtime_dont_use_autosuspend (& pdev -> dev );
802
802
pm_runtime_disable (& pdev -> dev );
803
803
804
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
806
#endif
807
807
for (ptr = 0 ; ptr < MAX_BUS_CLK ; ptr ++ ) {
808
808
if (sc -> clk_bus [ptr ]) {
809
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
813
clk_put (sc -> clk_io );
814
814
815
815
if (pdev -> dev .of_node ) {
@@ -849,8 +849,8 @@ static int sdhci_s3c_runtime_suspend(struct device *dev)
849
849
850
850
ret = sdhci_runtime_suspend_host (host );
851
851
852
- clk_disable (ourhost -> clk_bus [ourhost -> cur_clk ]);
853
- clk_disable (busclk );
852
+ clk_disable_unprepare (ourhost -> clk_bus [ourhost -> cur_clk ]);
853
+ clk_disable_unprepare (busclk );
854
854
return ret ;
855
855
}
856
856
@@ -861,8 +861,8 @@ static int sdhci_s3c_runtime_resume(struct device *dev)
861
861
struct clk * busclk = ourhost -> clk_io ;
862
862
int ret ;
863
863
864
- clk_enable (busclk );
865
- clk_enable (ourhost -> clk_bus [ourhost -> cur_clk ]);
864
+ clk_prepare_enable (busclk );
865
+ clk_prepare_enable (ourhost -> clk_bus [ourhost -> cur_clk ]);
866
866
ret = sdhci_runtime_resume_host (host );
867
867
return ret ;
868
868
}
0 commit comments