phy: fsl-imx8mq-usb: Clear the PCS_TX_SWING_FULL field before using it
Subsystems (2)
PATCH v3 1/1 phy: fsl-imx8mq-usb: Clear the PCS_TX_SWING_FULL field before using it
Clear the PCS_TX_SWING_FULL field mask before setting the new value in PHY_CTRL5 register. Without clearing the mask first, the OR operation could leave previously set bits, resulting in incorrect register configuration.
---
v3:
- Fixed commit message line wrapping (75 chars) v2:
- Improved commit subject as suggested by Fabio Estevam
drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 1 + 1 file changed, 1 insertion(+)
drivers/phy/freescale/phy-fsl-imx8mq-usb.c +1 -0
@@ -504,6 +504,7 @@ static void imx8m_phy_tune(struct imx8mq_usb_phy *imx_phy)if (imx_phy->pcs_tx_swing_full !=PHY_TUNE_DEFAULT ) { value =readl (imx_phy->base +PHY_CTRL5 ); + value &= ~PHY_CTRL5_PCS_TX_SWING_FULL_MASK ; value |=FIELD_PREP (PHY_CTRL5_PCS_TX_SWING_FULL_MASK , imx_phy->pcs_tx_swing_full);writel (value, imx_phy->base +PHY_CTRL5 );
base-commit: ea1013c1539270e372fc99854bc6e4d94eaeff66
Signature · 1 line
2.47.3
Quoted 6 lines · Stefano Radaelli
Clear the
PCS_TX_SWING_FULLfield mask before setting the new value inPHY_CTRL5register. Without clearing the mask first, the OR operation could leave previously set bits, resulting in incorrect register configuration.
Quoted 6 lines
Fixes 63c85ad0cd81 ("phy: fsl-imx8mp-usb: add support for phy tuning")Suggested-by Leonid Segal <[email protected]>Signed-off-by Stefano Radaelli <[email protected]>Reviewed-by Xu Yang <[email protected]>Reviewed-by Frank Li <[email protected]>
Quoted 11 lines · Stefano Radaelli
Clear the
PCS_TX_SWING_FULLfield mask before setting the new value inPHY_CTRL5register. Without clearing the mask first, the OR operation could leave previously set bits, resulting in incorrect register configuration.Fixes 63c85ad0cd81 ("phy: fsl-imx8mp-usb: add support for phy tuning")Suggested-by Leonid Segal <[email protected]>Signed-off-by Stefano Radaelli <[email protected]>Reviewed-by Xu Yang <[email protected]>Reviewed-by Frank Li <[email protected]>
Quoted 23 lines
---
v3:
- Fixed commit message line wrapping (75 chars) v2:
- Improved commit subject as suggested by Fabio Estevamdrivers/phy/freescale/phy-fsl-imx8mq-usb.c | 1 + 1 file changed, 1 insertion(+)drivers/phy/freescale/phy-fsl-imx8mq-usb.c +1
-0@@ -504,6 +504,7 @@ static void imx8m_phy_tune(struct imx8mq_usb_phy *imx_phy)if (imx_phy->pcs_tx_swing_full !=PHY_TUNE_DEFAULT ) { value =readl (imx_phy->base +PHY_CTRL5 ); + value &= ~PHY_CTRL5_PCS_TX_SWING_FULL_MASK ; value |=FIELD_PREP (PHY_CTRL5_PCS_TX_SWING_FULL_MASK , imx_phy->pcs_tx_swing_full);writel (value, imx_phy->base +PHY_CTRL5 );base-commit:
ea1013c1539270e372fc99854bc6e4d94eaeff66
Signature · 4 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Quoted 6 lines · Stefano Radaelli
Clear the
PCS_TX_SWING_FULLfield mask before setting the new value inPHY_CTRL5register. Without clearing the mask first, the OR operation could leave previously set bits, resulting in incorrect register configuration.
Applied, thanks!
[1/1] phy: fsl-imx8mq-usb: Clear the PCS_TX_SWING_FULL field before using it
commit: 8becf9179a4b45104a1701010ed666b55bf4b3a6
Best regards,
Signature · 1 line
~Vinod