OSDN Git Service

clk: qcom: Properly change rates for ahbix clock
authorStephen Boyd <sboyd@codeaurora.org>
Fri, 6 Mar 2015 23:41:53 +0000 (15:41 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2015 20:03:58 +0000 (22:03 +0200)
commit6761ec536ade4be25c5b846e71f96c8ecdc08347
tree252e765c5d36604aa7abe093aa27d5fe4fe42ec1
parent1d77b1031e7230917ed6c8fd1ac82f18a9c33c9d
clk: qcom: Properly change rates for ahbix clock

commit 9d3745d44a7faa7d24db7facb1949a1378162f3e upstream.

The ahbix clock can never be turned off in practice. To change the
rates we need to switch the mux off the M/N counter to an always on
source (XO), reprogram the M/N counter to get the rate we want and
finally switch back to the M/N counter. Add a new ops structure
for this type of clock so that we can set the rate properly.

Fixes: c99e515a92e9 "clk: qcom: Add IPQ806X LPASS clock controller (LCC) driver"
Tested-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/qcom/clk-rcg.c
drivers/clk/qcom/clk-rcg.h
drivers/clk/qcom/lcc-ipq806x.c