Skip to content

Commit 66d76b6

Browse files
cristiccvinodkoul
authored andcommitted
phy: rockchip: samsung-hdptx: Drop hw_rate driver data
The ->hw_rate member of struct rk_hdptx_phy was mainly used to keep track of the clock rate programmed in hardware and support implementing the ->recalc_rate() callback in hdptx_phy_clk_ops. Computing the clock rate from the actual PHY PLL configuration seems to work reliably, hence remove the now redundant struct member. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://patch.msgid.link/20260113-phy-hdptx-frl-v6-8-8d5f97419c0b@collabora.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 3481fc0 commit 66d76b6

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,6 @@ struct rk_hdptx_phy {
387387

388388
/* clk provider */
389389
struct clk_hw hw;
390-
unsigned long hw_rate;
391390
bool restrict_rate_change;
392391

393392
atomic_t usage_count;
@@ -931,7 +930,7 @@ static int rk_hdptx_tmds_ropll_cmn_config(struct rk_hdptx_phy *hdptx)
931930
{
932931
const struct ropll_config *cfg = NULL;
933932
struct ropll_config rc = {0};
934-
int ret, i;
933+
int i;
935934

936935
if (!hdptx->hdmi_cfg.tmds_char_rate)
937936
return 0;
@@ -993,12 +992,7 @@ static int rk_hdptx_tmds_ropll_cmn_config(struct rk_hdptx_phy *hdptx)
993992
regmap_update_bits(hdptx->regmap, CMN_REG(0086), PLL_PCG_CLK_EN_MASK,
994993
FIELD_PREP(PLL_PCG_CLK_EN_MASK, 0x1));
995994

996-
ret = rk_hdptx_post_enable_pll(hdptx);
997-
if (!ret)
998-
hdptx->hw_rate = DIV_ROUND_CLOSEST_ULL(hdptx->hdmi_cfg.tmds_char_rate * 8,
999-
hdptx->hdmi_cfg.bpc);
1000-
1001-
return ret;
995+
return rk_hdptx_post_enable_pll(hdptx);
1002996
}
1003997

1004998
static int rk_hdptx_tmds_ropll_mode_config(struct rk_hdptx_phy *hdptx)
@@ -1903,9 +1897,6 @@ static unsigned long rk_hdptx_phy_clk_recalc_rate(struct clk_hw *hw,
19031897
u64 rate;
19041898
int ret;
19051899

1906-
if (hdptx->hw_rate)
1907-
return hdptx->hw_rate;
1908-
19091900
ret = regmap_read(hdptx->grf, GRF_HDPTX_CON0, &status);
19101901
if (ret || !(status & HDPTX_I_PLL_EN))
19111902
return 0;

0 commit comments

Comments
 (0)