diff options
author | Konstantin Porotchkin <kostap@marvell.com> | 2017-04-19 13:37:59 +0300 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2017-05-09 14:38:18 +0300 |
commit | 18797ad6c377b3a253a4c6ddb457aa8239dfe591 (patch) | |
tree | 858f6bd684d0e6e9c520e3b9b150e2270b4783bc /drivers/phy | |
parent | d374e90b2777fe54036149100af4b413eae79a77 (diff) | |
download | u-boot-18797ad6c377b3a253a4c6ddb457aa8239dfe591.tar.xz |
fix: mvebu_ comphy: Update COMPHY sequence number
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
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Igal Liberman <igall@marvell.com>
Cc: Stefan Chulski <stefanc@marvell.com>
Cc: Nadav Haklai <nadavh@marvell.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/phy')
-rw-r--r-- | drivers/phy/marvell/comphy_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/phy/marvell/comphy_core.c b/drivers/phy/marvell/comphy_core.c index caa1928f07..7729e4be66 100644 --- a/drivers/phy/marvell/comphy_core.c +++ b/drivers/phy/marvell/comphy_core.c @@ -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 */ |