usb: phy: qusb2: Update tune params based on efuse value
For 8nm zero value is treated as a valid efuse value and driver should honor this efuse value to update the tune params. This change makes the updation of tune value possible even if the efuse value is zero. Change-Id: I6eac2e2414bf61b89aa41bebbfe56ad10017969e Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
This commit is contained in:
parent
9ffc7bc467
commit
a81e149134
1 changed files with 4 additions and 6 deletions
|
@ -430,8 +430,8 @@ static void qusb_phy_get_tune1_param(struct qusb_phy *qphy)
|
|||
bit_mask = (bit_mask << qphy->efuse_num_of_bits) - 1;
|
||||
|
||||
/*
|
||||
* if efuse reg is updated (i.e non-zero) then use it to program
|
||||
* tune parameters
|
||||
* For 8nm zero is treated as a valid efuse value and driver
|
||||
* should program the tune1 reg based on efuse value
|
||||
*/
|
||||
qphy->tune_val = readl_relaxed(qphy->efuse_reg);
|
||||
pr_debug("%s(): bit_mask:%d efuse based tune1 value:%d\n",
|
||||
|
@ -440,10 +440,8 @@ static void qusb_phy_get_tune1_param(struct qusb_phy *qphy)
|
|||
qphy->tune_val = TUNE_VAL_MASK(qphy->tune_val,
|
||||
qphy->efuse_bit_pos, bit_mask);
|
||||
reg = readb_relaxed(qphy->base + qphy->phy_reg[PORT_TUNE1]);
|
||||
if (qphy->tune_val) {
|
||||
reg = reg & 0x0f;
|
||||
reg |= (qphy->tune_val << 4);
|
||||
}
|
||||
reg = reg & 0x0f;
|
||||
reg |= (qphy->tune_val << 4);
|
||||
|
||||
qphy->tune_val = reg;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue