]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mmc: sdhci-spear: Add clk_{un}prepare() support
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 28 Sep 2012 10:28:23 +0000 (15:58 +0530)
committerChris Ball <cjb@laptop.org>
Fri, 28 Sep 2012 11:01:55 +0000 (07:01 -0400)
clk_{un}prepare is mandatory for platforms using common clock framework.
Since this driver is used by SPEAr platform, which supports common clock
framework, add clk_{un}prepare() support for it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Documentation/devicetree/bindings/mmc/sdhci-spear.txt
drivers/mmc/host/sdhci-spear.c

index 84d6e297908f1ccd1810c5ba6431006c30c5403c..fd3643e7e467d0fee8c5c4a069eacf85cc41a764 100644 (file)
@@ -9,13 +9,10 @@ Required properties:
 Optional properties:
 - cd-gpios: card detect gpio, with zero flags.
 
-If your board don't support these gpios then don't pass the entry.
-
 Example:
 
        sdhci@fc000000 {
                compatible = "st,spear300-sdhci";
                reg = <0xfc000000 0x1000>;
-
-               cd-gpios = <&gpio0 6 0>
+               cd-gpios = <&gpio0 6 0>;
        };
index ecad282741d69a0cb28a6196f68fc36a7b7a9c4f..6be89c032debe32f16ad978730b70695a2512aab 100644 (file)
@@ -140,7 +140,7 @@ static int __devinit sdhci_probe(struct platform_device *pdev)
                goto err;
        }
 
-       ret = clk_enable(sdhci->clk);
+       ret = clk_prepare_enable(sdhci->clk);
        if (ret) {
                dev_dbg(&pdev->dev, "Error enabling clock\n");
                goto put_clk;
@@ -260,7 +260,7 @@ set_drvdata:
 free_host:
        sdhci_free_host(host);
 disable_clk:
-       clk_disable(sdhci->clk);
+       clk_disable_unprepare(sdhci->clk);
 put_clk:
        clk_put(sdhci->clk);
 err:
@@ -282,7 +282,7 @@ static int __devexit sdhci_remove(struct platform_device *pdev)
 
        sdhci_remove_host(host, dead);
        sdhci_free_host(host);
-       clk_disable(sdhci->clk);
+       clk_disable_unprepare(sdhci->clk);
        clk_put(sdhci->clk);
 
        return 0;
@@ -297,7 +297,7 @@ static int sdhci_suspend(struct device *dev)
 
        ret = sdhci_suspend_host(host);
        if (!ret)
-               clk_disable(sdhci->clk);
+               clk_disable_unprepare(sdhci->clk);
 
        return ret;
 }
@@ -308,7 +308,7 @@ static int sdhci_resume(struct device *dev)
        struct spear_sdhci *sdhci = dev_get_platdata(dev);
        int ret;
 
-       ret = clk_enable(sdhci->clk);
+       ret = clk_prepare_enable(sdhci->clk);
        if (ret) {
                dev_dbg(dev, "Resume: Error enabling clock\n");
                return ret;