clk: qcom: Fix MN frequency tables, parent map, and jpegd
authorStephen Boyd <sboyd@codeaurora.org>
Wed, 9 Jul 2014 01:36:06 +0000 (18:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 20:41:12 +0000 (13:41 -0700)
commit67c6eac3d76683a20eaefe7ae8b0cee65a6ae9f3
tree2adb6d7e716f67e04d2fe7b4413bb3e1ca52235b
parenta33896f188f56c3cd268d1cf89396a7d01e77de5
clk: qcom: Fix MN frequency tables, parent map, and jpegd

commit ff20783f7b9f35b29e768d8ecc7076c1ca1a60ca upstream.

Clocks that don't have a pre-divider don't list any pre-divider
in their frequency tables, but their tables are initialized using
aggregate initializers. Use tagged initializers so we properly
assign the m and n values for each frequency. Furthermore, the
mmcc_pxo_pll8_pll2_pll3 array improperly mapped the second
element to pll2 instead of pll8, causing the clock driver to
recalculate the wrong rate for any clocks using this array along
with a rate that uses pll2. Plus the .num_parents field is 3
instead of 4 so you can't even switch the parent to pll3. Finally
I noticed that the jpegd clock improperly indicates that the
pre-divider width is only 2, when it's actually 4 bits wide.

Fixes: 6d00b56fe "clk: qcom: Add support for MSM8960's multimedia clock controller (MMCC)"
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/qcom/mmcc-msm8960.c