vpu: optimize get_vpu_clk with clktree api

PD#156734: vpu: optimize get_vpu_clk with clktree api
use clk_hw_get_rate instead of clk_get_rate.

Change-Id: Ib2d72c04d4df9acbacf06d189bbbce378f582716
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
This commit is contained in:
Evoke Zhang
2018-02-26 15:05:15 +08:00
committed by Yixun Lan
parent 167907751c
commit 54bbddc7fc

View File

@@ -149,6 +149,7 @@ unsigned int get_vpu_clk(void)
unsigned int clk_freq;
unsigned int clk_source, div;
unsigned int mux_id;
struct clk_hw *hw;
if (IS_ERR_OR_NULL(vpu_conf.vpu_clk)) {
VPUERR("%s: vpu_clk\n", __func__);
@@ -174,7 +175,8 @@ unsigned int get_vpu_clk(void)
return clk_freq;
}
clk_freq = clk_get_rate(vpu_conf.vpu_clk);
hw = __clk_get_hw(vpu_conf.vpu_clk);
clk_freq = clk_hw_get_rate(hw);
return clk_freq;
}