Skip to content

Commit c3fe707

Browse files
walmisvinodkoul
authored andcommitted
phy: rockchip-pcie: Enable all four lanes if required
Current code enables only Lane 0 because pwr_cnt will be incremented on first call to the function. Let's reorder the enablement code to enable all 4 lanes through GRF. Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Robin Murphy <[email protected]> Signed-off-by: Valmantas Paliksa <[email protected]> Signed-off-by: Geraldo Nascimento <[email protected]> Reviewed-by: Robin Murphy <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/16b610aab34e069fd31d9f57260c10df2a968f80.1751322015.git.geraldogabriel@gmail.com Signed-off-by: Vinod Koul <[email protected]>
1 parent dfef90f commit c3fe707

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/phy/rockchip/phy-rockchip-pcie.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ static int rockchip_pcie_phy_power_on(struct phy *phy)
160160

161161
guard(mutex)(&rk_phy->pcie_mutex);
162162

163+
regmap_write(rk_phy->reg_base,
164+
rk_phy->phy_data->pcie_laneoff,
165+
HIWORD_UPDATE(!PHY_LANE_IDLE_OFF,
166+
PHY_LANE_IDLE_MASK,
167+
PHY_LANE_IDLE_A_SHIFT + inst->index));
168+
163169
if (rk_phy->pwr_cnt++) {
164170
return 0;
165171
}
@@ -176,12 +182,6 @@ static int rockchip_pcie_phy_power_on(struct phy *phy)
176182
PHY_CFG_ADDR_MASK,
177183
PHY_CFG_ADDR_SHIFT));
178184

179-
regmap_write(rk_phy->reg_base,
180-
rk_phy->phy_data->pcie_laneoff,
181-
HIWORD_UPDATE(!PHY_LANE_IDLE_OFF,
182-
PHY_LANE_IDLE_MASK,
183-
PHY_LANE_IDLE_A_SHIFT + inst->index));
184-
185185
/*
186186
* No documented timeout value for phy operation below,
187187
* so we make it large enough here. And we use loop-break

0 commit comments

Comments
 (0)