]> git.karo-electronics.de Git - linux-beck.git/commitdiff
clk: rockchip: drop old_rate calculation on pll rate changes
authorHeiko Stuebner <heiko@sntech.de>
Tue, 15 Mar 2016 16:34:56 +0000 (17:34 +0100)
committerHeiko Stuebner <heiko@sntech.de>
Mon, 9 May 2016 14:04:39 +0000 (16:04 +0200)
Previously when everything happened in the set_rate callbacks itself we
needed the old_rate value for the possible rate rollback, so that made
it easy to also use it in the debug output.

Now with the param-handling being done in separate functions, reading and
recalculating the current pll rate only to use it in a debug message that
won't get displayed in regular cases anyway is quite a waste.

Therefore drop that value from the debug output. In the worst case that
previous rate will have been displayed on the rate change before.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
drivers/clk/rockchip/clk-pll.c

index 76e278d679ba472584a5dfd5e155bc3c90ae832a..db81e454166bfba9f66f35368d6f0b58ab6fdd7f 100644 (file)
@@ -247,10 +247,9 @@ static int rockchip_rk3036_pll_set_rate(struct clk_hw *hw, unsigned long drate,
 {
        struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw);
        const struct rockchip_pll_rate_table *rate;
-       unsigned long old_rate = rockchip_rk3036_pll_recalc_rate(hw, prate);
 
-       pr_debug("%s: changing %s from %lu to %lu with a parent rate of %lu\n",
-                __func__, __clk_get_name(hw->clk), old_rate, drate, prate);
+       pr_debug("%s: changing %s to %lu with a parent rate of %lu\n",
+                __func__, __clk_get_name(hw->clk), drate, prate);
 
        /* Get required rate settings from table */
        rate = rockchip_get_pll_settings(pll, drate);
@@ -479,10 +478,9 @@ static int rockchip_rk3066_pll_set_rate(struct clk_hw *hw, unsigned long drate,
 {
        struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw);
        const struct rockchip_pll_rate_table *rate;
-       unsigned long old_rate = rockchip_rk3066_pll_recalc_rate(hw, prate);
 
-       pr_debug("%s: changing %s from %lu to %lu with a parent rate of %lu\n",
-                __func__, clk_hw_get_name(hw), old_rate, drate, prate);
+       pr_debug("%s: changing %s to %lu with a parent rate of %lu\n",
+                __func__, clk_hw_get_name(hw), drate, prate);
 
        /* Get required rate settings from table */
        rate = rockchip_get_pll_settings(pll, drate);
@@ -725,10 +723,9 @@ static int rockchip_rk3399_pll_set_rate(struct clk_hw *hw, unsigned long drate,
 {
        struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw);
        const struct rockchip_pll_rate_table *rate;
-       unsigned long old_rate = rockchip_rk3399_pll_recalc_rate(hw, prate);
 
-       pr_debug("%s: changing %s from %lu to %lu with a parent rate of %lu\n",
-                __func__, __clk_get_name(hw->clk), old_rate, drate, prate);
+       pr_debug("%s: changing %s to %lu with a parent rate of %lu\n",
+                __func__, __clk_get_name(hw->clk), drate, prate);
 
        /* Get required rate settings from table */
        rate = rockchip_get_pll_settings(pll, drate);