diff options
author | Rajendra Nayak <rnayak@ti.com> | 2012-06-27 04:49:54 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-07-22 15:25:52 -0400 |
commit | 94c18149451e9ae91a669bc33370273327d7da81 (patch) | |
tree | 12beb3d439c300155a644257449331eb4aacdd44 /drivers/mmc | |
parent | 38cfc2f71cec9508bdd3a11e576738c2182418d0 (diff) |
mmc: omap_hsmmc: add clk_prepare and clk_unprepare
In preparation for OMAP moving to the Common Clock Framework (CCF)
add clk_prepare() and clk_unprepare() for the hsmmc clocks.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Acked-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/omap_hsmmc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 389a3eedfc24..a9227a7a9d69 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
@@ -1089,7 +1089,7 @@ static int omap_hsmmc_switch_opcond(struct omap_hsmmc_host *host, int vdd) | |||
1089 | /* Disable the clocks */ | 1089 | /* Disable the clocks */ |
1090 | pm_runtime_put_sync(host->dev); | 1090 | pm_runtime_put_sync(host->dev); |
1091 | if (host->dbclk) | 1091 | if (host->dbclk) |
1092 | clk_disable(host->dbclk); | 1092 | clk_disable_unprepare(host->dbclk); |
1093 | 1093 | ||
1094 | /* Turn the power off */ | 1094 | /* Turn the power off */ |
1095 | ret = mmc_slot(host).set_power(host->dev, host->slot_id, 0, 0); | 1095 | ret = mmc_slot(host).set_power(host->dev, host->slot_id, 0, 0); |
@@ -1100,7 +1100,7 @@ static int omap_hsmmc_switch_opcond(struct omap_hsmmc_host *host, int vdd) | |||
1100 | vdd); | 1100 | vdd); |
1101 | pm_runtime_get_sync(host->dev); | 1101 | pm_runtime_get_sync(host->dev); |
1102 | if (host->dbclk) | 1102 | if (host->dbclk) |
1103 | clk_enable(host->dbclk); | 1103 | clk_prepare_enable(host->dbclk); |
1104 | 1104 | ||
1105 | if (ret != 0) | 1105 | if (ret != 0) |
1106 | goto err; | 1106 | goto err; |
@@ -1899,7 +1899,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev) | |||
1899 | if (IS_ERR(host->dbclk)) { | 1899 | if (IS_ERR(host->dbclk)) { |
1900 | dev_warn(mmc_dev(host->mmc), "Failed to get debounce clk\n"); | 1900 | dev_warn(mmc_dev(host->mmc), "Failed to get debounce clk\n"); |
1901 | host->dbclk = NULL; | 1901 | host->dbclk = NULL; |
1902 | } else if (clk_enable(host->dbclk) != 0) { | 1902 | } else if (clk_prepare_enable(host->dbclk) != 0) { |
1903 | dev_warn(mmc_dev(host->mmc), "Failed to enable debounce clk\n"); | 1903 | dev_warn(mmc_dev(host->mmc), "Failed to enable debounce clk\n"); |
1904 | clk_put(host->dbclk); | 1904 | clk_put(host->dbclk); |
1905 | host->dbclk = NULL; | 1905 | host->dbclk = NULL; |
@@ -2023,7 +2023,7 @@ err_irq: | |||
2023 | pm_runtime_disable(host->dev); | 2023 | pm_runtime_disable(host->dev); |
2024 | clk_put(host->fclk); | 2024 | clk_put(host->fclk); |
2025 | if (host->dbclk) { | 2025 | if (host->dbclk) { |
2026 | clk_disable(host->dbclk); | 2026 | clk_disable_unprepare(host->dbclk); |
2027 | clk_put(host->dbclk); | 2027 | clk_put(host->dbclk); |
2028 | } | 2028 | } |
2029 | err1: | 2029 | err1: |
@@ -2058,7 +2058,7 @@ static int __devexit omap_hsmmc_remove(struct platform_device *pdev) | |||
2058 | pm_runtime_disable(host->dev); | 2058 | pm_runtime_disable(host->dev); |
2059 | clk_put(host->fclk); | 2059 | clk_put(host->fclk); |
2060 | if (host->dbclk) { | 2060 | if (host->dbclk) { |
2061 | clk_disable(host->dbclk); | 2061 | clk_disable_unprepare(host->dbclk); |
2062 | clk_put(host->dbclk); | 2062 | clk_put(host->dbclk); |
2063 | } | 2063 | } |
2064 | 2064 | ||
@@ -2116,7 +2116,7 @@ static int omap_hsmmc_suspend(struct device *dev) | |||
2116 | } | 2116 | } |
2117 | 2117 | ||
2118 | if (host->dbclk) | 2118 | if (host->dbclk) |
2119 | clk_disable(host->dbclk); | 2119 | clk_disable_unprepare(host->dbclk); |
2120 | err: | 2120 | err: |
2121 | pm_runtime_put_sync(host->dev); | 2121 | pm_runtime_put_sync(host->dev); |
2122 | return ret; | 2122 | return ret; |
@@ -2137,7 +2137,7 @@ static int omap_hsmmc_resume(struct device *dev) | |||
2137 | pm_runtime_get_sync(host->dev); | 2137 | pm_runtime_get_sync(host->dev); |
2138 | 2138 | ||
2139 | if (host->dbclk) | 2139 | if (host->dbclk) |
2140 | clk_enable(host->dbclk); | 2140 | clk_prepare_enable(host->dbclk); |
2141 | 2141 | ||
2142 | if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER)) | 2142 | if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER)) |
2143 | omap_hsmmc_conf_bus_power(host); | 2143 | omap_hsmmc_conf_bus_power(host); |