Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: qoriq: add more divider clocks support

More divider clocks are needed by IP. So enlarge the PLL divider
array to accommodate more divider clocks.

Signed-off-by: Tang Yuantian <andy.tang@nxp.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

authored by

Yuantian Tang and committed by
Stephen Boyd
36ab0467 4fbd8d19

+9 -1
+1
Documentation/devicetree/bindings/clock/qoriq-clock.txt
··· 78 78 2 hwaccel index (n in CLKCGnHWACSR) 79 79 3 fman 0 for fm1, 1 for fm2 80 80 4 platform pll 0=pll, 1=pll/2, 2=pll/3, 3=pll/4 81 + 4=pll/5, 5=pll/6, 6=pll/7, 7=pll/8 81 82 5 coreclk must be 0 82 83 83 84 3. Example
+8 -1
drivers/clk/clk-qoriq.c
··· 41 41 }; 42 42 43 43 struct clockgen_pll { 44 - struct clockgen_pll_div div[4]; 44 + struct clockgen_pll_div div[8]; 45 45 }; 46 46 47 47 #define CLKSEL_VALID 1 ··· 1126 1126 for (i = 0; i < ARRAY_SIZE(pll->div); i++) { 1127 1127 struct clk *clk; 1128 1128 int ret; 1129 + 1130 + /* 1131 + * For platform PLL, there are 8 divider clocks. 1132 + * For core PLL, there are 4 divider clocks at most. 1133 + */ 1134 + if (idx != PLATFORM_PLL && i >= 4) 1135 + break; 1129 1136 1130 1137 snprintf(pll->div[i].name, sizeof(pll->div[i].name), 1131 1138 "cg-pll%d-div%d", idx, i + 1);