OSDN Git Service

clk: qcom: clk-smd-rpm: Fix the reported rate of branches
authorGeorgi Djakov <georgi.djakov@linaro.org>
Mon, 17 Jul 2017 15:35:42 +0000 (18:35 +0300)
committerStephen Boyd <sboyd@codeaurora.org>
Tue, 18 Jul 2017 01:22:30 +0000 (18:22 -0700)
commitd515e027a9bcadbabfb95fa15fde94bd372d48bd
treed4ffe13169d2b79227a85768fac155566c4c1510
parentfa12167cedea353e71dfb776023b84381305b4d9
clk: qcom: clk-smd-rpm: Fix the reported rate of branches

As there is no way to actually query the hardware for the current clock
rate, now racalc_rate() just returns the last rate that was previously
set. But if the rate was not set yet, we return the bogus rate of 1000Hz.

The branch clocks have the same rate as their parent, so in this case we
just need to remove recalc_rate ops and then the core framework will handle
this automagically. The round_rate() is unused, so remove it as well.

Reported-by: Archit Taneja <architt@codeaurora.org>
Fixes: 00f64b58874e ("clk: qcom: Add support for SMD-RPM Clocks")
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/qcom/clk-smd-rpm.c