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>
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__);
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;
}