* [RFC PATCH 3/4] phy: rockchip-pcie: enable all four lanes
@ 2025-06-07 11:01 Geraldo Nascimento
0 siblings, 0 replies; only message in thread
From: Geraldo Nascimento @ 2025-06-07 11:01 UTC (permalink / raw)
To: linux-rockchip
Cc: Shawn Lin, Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas,
Heiko Stuebner, Vinod Koul, Kishon Vijay Abraham I, linux-phy,
linux-pci, linux-arm-kernel, linux-kernel
Current code enables only Lane 0 because pwr_cnt will be incremented
on first access. Use for-loop to enable all 4 lanes through GRF
register.
Signed-off-by: Geraldo Nascimento <geraldogabriel@gmail.com>
---
drivers/phy/rockchip/phy-rockchip-pcie.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-pcie.c b/drivers/phy/rockchip/phy-rockchip-pcie.c
index bd44af36c67a..48bcc7d2b33b 100644
--- a/drivers/phy/rockchip/phy-rockchip-pcie.c
+++ b/drivers/phy/rockchip/phy-rockchip-pcie.c
@@ -176,11 +176,13 @@ static int rockchip_pcie_phy_power_on(struct phy *phy)
PHY_CFG_ADDR_MASK,
PHY_CFG_ADDR_SHIFT));
- regmap_write(rk_phy->reg_base,
- rk_phy->phy_data->pcie_laneoff,
- HIWORD_UPDATE(!PHY_LANE_IDLE_OFF,
- PHY_LANE_IDLE_MASK,
- PHY_LANE_IDLE_A_SHIFT + inst->index));
+ for (int i=0; i < PHY_MAX_LANE_NUM; i++) {
+ regmap_write(rk_phy->reg_base,
+ rk_phy->phy_data->pcie_laneoff,
+ HIWORD_UPDATE(!PHY_LANE_IDLE_OFF,
+ PHY_LANE_IDLE_MASK,
+ PHY_LANE_IDLE_A_SHIFT + i));
+ }
/*
* No documented timeout value for phy operation below,
--
2.49.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-06-07 11:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-07 11:01 [RFC PATCH 3/4] phy: rockchip-pcie: enable all four lanes Geraldo Nascimento
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®