Browse Source

realtek: fix PLL register inconsistencies

Some devices have wrong/empty values in the PLL registers. Work
around that by reporting the default values.

Signed-off-by: Markus Stockhausen <[email protected]>
Markus Stockhausen 3 years ago
parent
commit
6ff21c436d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      target/linux/realtek/files-5.10/drivers/clk/realtek/clk-rtl83xx.c

+ 3 - 0
target/linux/realtek/files-5.10/drivers/clk/realtek/clk-rtl83xx.c

@@ -366,6 +366,9 @@ static unsigned long rtcl_recalc_rate(struct clk_hw *hw, unsigned long parent_ra
 
 	switch (rtcl_ccu->soc) {
 	case SOC_RTL838X:
+		if ((ctrl0 == 0) && (ctrl1 == 0) && (clk->idx == CLK_LXB))
+			return 200000000;
+
 		cmu_divn2_selb = RTL838X_PLL_CTRL1_CMU_DIVN2_SELB(ctrl1);
 		cmu_divn3_sel = rtcl_divn3[RTL838X_PLL_CTRL1_CMU_DIVN3_SEL(ctrl1)];
 		break;