Skip to contentSkip to conversation

fix: mvebu_ comphy: Update COMPHY sequence number

PATCH New kostap at marvell.com 2 participants 3 messages Apr 19, 2017 – May 9, 2017 Generic PHY framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix: mvebu_ comphy: Update COMPHY sequence number

From: Konstantin Porotchkin <[email protected]>

Use local static counter for maintaining the COMPHY chip-ID upon its initialization.
The dev->seq originally used as the COMPHY chip-ID depends on the device tree scan order and produces wrong results that breaks the deficated PHYs init flow, which in turn breaks the USB support.

Change-Id I4e3f7ec36590a7f95dc94d9269a3c47fb708c4a9
Cc Stefan Roese <[email protected]>
Cc Igal Liberman <[email protected]>
Cc Stefan Chulski <[email protected]>
Cc Nadav Haklai <[email protected]>
---
 drivers/phy/marvell/comphy_core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/phy/marvell/comphy_core.c +2 -1
index caa1928..7729e4b 100644
@@ -113,6 +113,7 @@ static int comphy_probe(struct udevice *dev)
 	int subnode;
 	int lane;
 	int last_idx = 0;
+	static int current_idx;
 
 	/* Save base addresses for later use */
 	chip_cfg->comphy_base_addr = (void *)dev_get_addr_index(dev, 0);
@@ -175,7 +176,7 @@ static int comphy_probe(struct udevice *dev)
 	}
 
 	/* Save comphy index for MultiCP devices (A8K) */
-	chip_cfg->comphy_index = dev->seq;
+	chip_cfg->comphy_index = current_idx++;
 	/* PHY power UP sequence */
 	chip_cfg->ptr_comphy_chip_init(chip_cfg, comphy_map_data);
 	/* PHY print SerDes status */
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 fix: mvebu_ comphy: Update COMPHY sequence number

Quoted 9 lines · kostap at marvell.com

From: Konstantin Porotchkin <[email protected]>

Use local static counter for maintaining the COMPHY chip-ID upon its initialization.
The dev->seq originally used as the COMPHY chip-ID depends on the device tree scan order and produces wrong results that breaks the deficated PHYs init flow, which in turn breaks the USB support.

Quoted 6 lines
Change-Id I4e3f7ec36590a7f95dc94d9269a3c47fb708c4a9
Cc Stefan Roese <[email protected]>
Cc Igal Liberman <[email protected]>
Cc Stefan Chulski <[email protected]>
Cc Nadav Haklai <[email protected]>

Thanks,
Stefan

#2 lore raw

PATCH 1/1 fix: mvebu_ comphy: Update COMPHY sequence number

In reply to kostap at marvell.com
Quoted 9 lines · kostap at marvell.com

From: Konstantin Porotchkin <[email protected]>

Use local static counter for maintaining the COMPHY chip-ID upon its initialization.
The dev->seq originally used as the COMPHY chip-ID depends on the device tree scan order and produces wrong results that breaks the deficated PHYs init flow, which in turn breaks the USB support.

Quoted 6 lines
Change-Id I4e3f7ec36590a7f95dc94d9269a3c47fb708c4a9
Cc Stefan Roese <[email protected]>
Cc Igal Liberman <[email protected]>
Cc Stefan Chulski <[email protected]>
Cc Nadav Haklai <[email protected]>

Applied to u-boot-marvell/master.

Thanks,
Stefan