]> git.karo-electronics.de Git - linux-beck.git/commit
clk: qcom: fix RCG M/N counter configuration
authorArchit Taneja <architt@codeaurora.org>
Wed, 4 Mar 2015 09:49:35 +0000 (15:19 +0530)
committerStephen Boyd <sboyd@codeaurora.org>
Mon, 23 Mar 2015 22:48:43 +0000 (15:48 -0700)
commit0b21503dbbfa669dbd847b33578d4041513cddb2
tree82c33048083ebb6e6665d019a2e543e17f79f902
parent0833b5ae69026cf62b5fc6cf83b1f1d1cd36164b
clk: qcom: fix RCG M/N counter configuration

Currently, a RCG's M/N counter (used for fraction division) is
set to either 'bypass' (counter disabled) or 'dual edge' (counter
enabled) based on whether the corresponding rcg struct has a mnd
field specified and a non-zero N.

In the case where M and N are the same value, the M/N counter is
still enabled by code even though no division takes place.
Leaving the RCG in such a state can result in improper behavior.
This was observed with the DSI pixel clock RCG when M and N were
both set to 1.

Add an additional check (M != N) to enable the M/N counter only
when it's needed for fraction division.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Fixes: bcd61c0f535a (clk: qcom: Add support for root clock
generators (RCGs))
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/qcom/clk-rcg2.c