]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
mmc: sdhci-pxav2, sdhci-pxav3: use clk_prepare/unprepare APIs
authorChao Xie <chao.xie@marvell.com>
Tue, 31 Jul 2012 06:35:25 +0000 (14:35 +0800)
committerChris Ball <cjb@laptop.org>
Tue, 4 Sep 2012 17:58:15 +0000 (13:58 -0400)
Prepare the clock before enabling it.

Signed-off-by: Chao Xie <xiechao.mail@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci-pxav2.c
drivers/mmc/host/sdhci-pxav3.c

index b6ee8857e226fc163d53c1a66d52eda26121735d..8e63a9c04e3176fd9f8950caa2c461636b6cce47 100644 (file)
@@ -197,7 +197,7 @@ static int __devinit sdhci_pxav2_probe(struct platform_device *pdev)
                goto err_clk_get;
        }
        pltfm_host->clk = clk;
-       clk_enable(clk);
+       clk_prepare_enable(clk);
 
        host->quirks = SDHCI_QUIRK_BROKEN_ADMA
                | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL
@@ -239,7 +239,7 @@ static int __devinit sdhci_pxav2_probe(struct platform_device *pdev)
        return 0;
 
 err_add_host:
-       clk_disable(clk);
+       clk_disable_unprepare(clk);
        clk_put(clk);
 err_clk_get:
        sdhci_pltfm_free(pdev);
@@ -255,7 +255,7 @@ static int __devexit sdhci_pxav2_remove(struct platform_device *pdev)
 
        sdhci_remove_host(host, 1);
 
-       clk_disable(pltfm_host->clk);
+       clk_disable_unprepare(pltfm_host->clk);
        clk_put(pltfm_host->clk);
        sdhci_pltfm_free(pdev);
        kfree(pxa);
index 07fe3834fe0b224119d0591672de48949dd18105..a553b180d3404268ce8fe1fb8b430c3ff62b589f 100644 (file)
@@ -231,14 +231,14 @@ static int __devinit sdhci_pxav3_probe(struct platform_device *pdev)
        pltfm_host = sdhci_priv(host);
        pltfm_host->priv = pxa;
 
-       clk = clk_get(dev, "PXA-SDHCLK");
+       clk = clk_get(dev, NULL);
        if (IS_ERR(clk)) {
                dev_err(dev, "failed to get io clock\n");
                ret = PTR_ERR(clk);
                goto err_clk_get;
        }
        pltfm_host->clk = clk;
-       clk_enable(clk);
+       clk_prepare_enable(clk);
 
        host->quirks = SDHCI_QUIRK_BROKEN_TIMEOUT_VAL
                | SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC
@@ -283,7 +283,7 @@ static int __devinit sdhci_pxav3_probe(struct platform_device *pdev)
        return 0;
 
 err_add_host:
-       clk_disable(clk);
+       clk_disable_unprepare(clk);
        clk_put(clk);
 err_clk_get:
        sdhci_pltfm_free(pdev);
@@ -299,7 +299,7 @@ static int __devexit sdhci_pxav3_remove(struct platform_device *pdev)
 
        sdhci_remove_host(host, 1);
 
-       clk_disable(pltfm_host->clk);
+       clk_disable_unprepare(pltfm_host->clk);
        clk_put(pltfm_host->clk);
        sdhci_pltfm_free(pdev);
        kfree(pxa);