Commit 38f742df authored by Jacob Keller's avatar Jacob Keller Committed by Tony Nguyen
Browse files

ice: read TSPLL registers again before reporting status



After programming the TSPLL, re-read the registers before reporting status.
This ensures the debug log message will show what was actually programmed,
rather than relying on a cached value.

Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent d261d755
Loading
Loading
Loading
Loading
+18 −4
Original line number Diff line number Diff line
@@ -239,8 +239,15 @@ static int ice_tspll_cfg_e82x(struct ice_hw *hw, enum ice_tspll_freq clk_freq,
		return -EBUSY;
	}

	ice_tspll_log_cfg(hw, dw24.ts_pll_enable, clk_src, clk_freq, true,
			  true);
	err = ice_read_cgu_reg(hw, ICE_CGU_R9, &dw9.val);
	if (err)
		return err;
	err = ice_read_cgu_reg(hw, ICE_CGU_R24, &dw24.val);
	if (err)
		return err;

	ice_tspll_log_cfg(hw, dw24.ts_pll_enable, dw24.time_ref_sel,
			  dw9.time_ref_freq_sel, true, false);

	return 0;
}
@@ -433,8 +440,15 @@ static int ice_tspll_cfg_e825c(struct ice_hw *hw, enum ice_tspll_freq clk_freq,
		return -EBUSY;
	}

	ice_tspll_log_cfg(hw, dw23.ts_pll_enable, clk_src, clk_freq, true,
			  true);
	err = ice_read_cgu_reg(hw, ICE_CGU_R9, &dw9.val);
	if (err)
		return err;
	err = ice_read_cgu_reg(hw, ICE_CGU_R23, &dw23.val);
	if (err)
		return err;

	ice_tspll_log_cfg(hw, dw23.ts_pll_enable, dw23.time_ref_sel,
			  dw9.time_ref_freq_sel, true, true);

	return 0;
}