mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 10:04:26 +00:00
fix(drivers/marvell/comphy-cp110): fix error code in pcie power on
Function polling_with_timeout() returns last value from polled register on failure and zero on success. So set "ret" variable to error code -ETIMEDOUT on error like it is done in other functions. Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I16cac81bbcbe2113e139722dc0e8fc2b85428d1b
This commit is contained in:
parent
49b664e75f
commit
c0a909cdcc
1 changed files with 4 additions and 2 deletions
|
@ -1730,11 +1730,13 @@ static int mvebu_cp110_comphy_pcie_power_on(uint64_t comphy_base,
|
|||
HPIPE_LANE_STATUS1_REG;
|
||||
data = HPIPE_LANE_STATUS1_PCLK_EN_MASK;
|
||||
mask = data;
|
||||
ret = polling_with_timeout(addr, data, mask,
|
||||
data = polling_with_timeout(addr, data, mask,
|
||||
PLL_LOCK_TIMEOUT,
|
||||
REG_32BIT);
|
||||
if (ret)
|
||||
if (data) {
|
||||
ERROR("Failed to lock PCIE PLL\n");
|
||||
ret = -ETIMEDOUT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue