mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
phy/rockchip: samsung-hdptx: Check if PHY need configured during startup
Signed-off-by: Wyon bi <bivvy.bi@rock-chips.com> Change-Id: Idd91b95ea60cd6240dbc77d4396c9cae4affdba1
This commit is contained in:
@@ -886,6 +886,15 @@ static void rockchip_hdptx_phy_reset(struct rockchip_hdptx_phy *hdptx)
|
||||
FIELD_PREP(BGR_EN, 0));
|
||||
}
|
||||
|
||||
static bool rockchip_hdptx_phy_enabled(struct rockchip_hdptx_phy *hdptx)
|
||||
{
|
||||
u32 status;
|
||||
|
||||
regmap_read(hdptx->grf, HDPTXPHY_GRF_STATUS0, &status);
|
||||
|
||||
return FIELD_GET(SB_RDY, status);
|
||||
}
|
||||
|
||||
static int rockchip_hdptx_phy_power_on(struct phy *phy)
|
||||
{
|
||||
struct rockchip_hdptx_phy *hdptx = phy_get_drvdata(phy);
|
||||
@@ -897,6 +906,9 @@ static int rockchip_hdptx_phy_power_on(struct phy *phy)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (rockchip_hdptx_phy_enabled(hdptx))
|
||||
return 0;
|
||||
|
||||
rockchip_hdptx_phy_reset(hdptx);
|
||||
|
||||
reset_control_assert(hdptx->apb_reset);
|
||||
|
||||
Reference in New Issue
Block a user