Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94c18149 authored by Rajendra Nayak's avatar Rajendra Nayak Committed by Chris Ball
Browse files

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: default avatarRajendra Nayak <rnayak@ti.com>
Acked-by: default avatarVenkatraman S <svenkatr@ti.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 38cfc2f7
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -1089,7 +1089,7 @@ static int omap_hsmmc_switch_opcond(struct omap_hsmmc_host *host, int vdd)
	/* Disable the clocks */
	pm_runtime_put_sync(host->dev);
	if (host->dbclk)
		clk_disable(host->dbclk);
		clk_disable_unprepare(host->dbclk);

	/* Turn the power off */
	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)
					       vdd);
	pm_runtime_get_sync(host->dev);
	if (host->dbclk)
		clk_enable(host->dbclk);
		clk_prepare_enable(host->dbclk);

	if (ret != 0)
		goto err;
@@ -1899,7 +1899,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
	if (IS_ERR(host->dbclk)) {
		dev_warn(mmc_dev(host->mmc), "Failed to get debounce clk\n");
		host->dbclk = NULL;
	} else if (clk_enable(host->dbclk) != 0) {
	} else if (clk_prepare_enable(host->dbclk) != 0) {
		dev_warn(mmc_dev(host->mmc), "Failed to enable debounce clk\n");
		clk_put(host->dbclk);
		host->dbclk = NULL;
@@ -2023,7 +2023,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
	pm_runtime_disable(host->dev);
	clk_put(host->fclk);
	if (host->dbclk) {
		clk_disable(host->dbclk);
		clk_disable_unprepare(host->dbclk);
		clk_put(host->dbclk);
	}
err1:
@@ -2058,7 +2058,7 @@ static int __devexit omap_hsmmc_remove(struct platform_device *pdev)
	pm_runtime_disable(host->dev);
	clk_put(host->fclk);
	if (host->dbclk) {
		clk_disable(host->dbclk);
		clk_disable_unprepare(host->dbclk);
		clk_put(host->dbclk);
	}

@@ -2116,7 +2116,7 @@ static int omap_hsmmc_suspend(struct device *dev)
	}

	if (host->dbclk)
		clk_disable(host->dbclk);
		clk_disable_unprepare(host->dbclk);
err:
	pm_runtime_put_sync(host->dev);
	return ret;
@@ -2137,7 +2137,7 @@ static int omap_hsmmc_resume(struct device *dev)
	pm_runtime_get_sync(host->dev);

	if (host->dbclk)
		clk_enable(host->dbclk);
		clk_prepare_enable(host->dbclk);

	if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER))
		omap_hsmmc_conf_bus_power(host);