ARM: tegra3: dvfs: moving to clk prepare APIs
Sivaram Nair [Tue, 23 Oct 2012 06:39:22 +0000 (09:39 +0300)]
The clk_enable/clk_disable pair of APIs are replaced with
tegra_clk_prepare_enable and tegra_clk_disable_unprepare.

This is needed for the migration to common clk framework.

Bug 920915

Change-Id: I119d635ed8ce041359fdc9ab6f7c86743256b2cb
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: http://git-master/r/146780
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

arch/arm/mach-tegra/tegra3_dvfs.c

index 53f49aa..da61000 100644 (file)
@@ -987,7 +987,7 @@ int tegra_dvfs_rail_disable_prepare(struct dvfs_rail *rail)
                struct clk *bridge = tegra_get_clock_by_name("bridge.emc");
                BUG_ON(!bridge);
 
-               ret = clk_enable(bridge);
+               ret = tegra_clk_prepare_enable(bridge);
                pr_info("%s: %s: %s bridge.emc\n", __func__,
                        rail->reg_id, ret ? "failed to enable" : "enabled");
        }
@@ -1007,7 +1007,7 @@ int tegra_dvfs_rail_post_enable(struct dvfs_rail *rail)
                struct clk *bridge = tegra_get_clock_by_name("bridge.emc");
                BUG_ON(!bridge);
 
-               clk_disable(bridge);
+               tegra_clk_disable_unprepare(bridge);
                pr_info("%s: %s: disabled bridge.emc\n",
                        __func__, rail->reg_id);
        }