@@ -52,7 +52,7 @@ static const u8 cbf_pll_regs[PLL_OFF_MAX_REGS] = {
52
52
[PLL_OFF_STATUS ] = 0x28 ,
53
53
};
54
54
55
- static const struct alpha_pll_config cbfpll_config = {
55
+ static struct alpha_pll_config cbfpll_config = {
56
56
.l = 72 ,
57
57
.config_ctl_val = 0x200d4828 ,
58
58
.config_ctl_hi_val = 0x006 ,
@@ -141,7 +141,7 @@ static int clk_cbf_8996_mux_determine_rate(struct clk_hw *hw,
141
141
{
142
142
struct clk_hw * parent ;
143
143
144
- if (req -> rate < (DIV_THRESHOLD / 2 ))
144
+ if (req -> rate < (DIV_THRESHOLD / cbf_pll_postdiv . div ))
145
145
return - EINVAL ;
146
146
147
147
if (req -> rate < DIV_THRESHOLD )
@@ -312,6 +312,11 @@ static int qcom_msm8996_cbf_probe(struct platform_device *pdev)
312
312
/* Switch CBF to use the primary PLL */
313
313
regmap_update_bits (regmap , CBF_MUX_OFFSET , CBF_MUX_PARENT_MASK , 0x1 );
314
314
315
+ if (of_device_is_compatible (dev -> of_node , "qcom,msm8996pro-cbf" )) {
316
+ cbfpll_config .post_div_val = 0x3 << 8 ;
317
+ cbf_pll_postdiv .div = 4 ;
318
+ }
319
+
315
320
for (i = 0 ; i < ARRAY_SIZE (cbf_msm8996_hw_clks ); i ++ ) {
316
321
ret = devm_clk_hw_register (dev , cbf_msm8996_hw_clks [i ]);
317
322
if (ret )
@@ -342,6 +347,7 @@ static int qcom_msm8996_cbf_remove(struct platform_device *pdev)
342
347
343
348
static const struct of_device_id qcom_msm8996_cbf_match_table [] = {
344
349
{ .compatible = "qcom,msm8996-cbf" },
350
+ { .compatible = "qcom,msm8996pro-cbf" },
345
351
{ /* sentinel */ },
346
352
};
347
353
MODULE_DEVICE_TABLE (of , qcom_msm8996_cbf_match_table );
0 commit comments