Skip to content

Commit e7f4da4

Browse files
thierryredingkishon
authored andcommitted
phy: tegra: xusb: Uncomment register write
The reason why this was originally commented out is no longer clear. The UPHY driver for SATA works fine with or without this change. The reset value of the XDIGCLK_EN bit is 0, so unless programmed by the bootloader this shouldn't make a difference anyway. Define a macro for this bit and uncomment the code. This also fixes a coverity issue brought to my attention by Rohith because not only is the XDIGCLK_EN field modification commented out, but also the register write which causes none of the earlier modifications of the register value to be written to the register and the value being overwritten. Reported-by: Rohith Seelaboyina <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]>
1 parent ec1fcd7 commit e7f4da4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/phy/tegra/xusb-tegra210.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
#define XUSB_PADCTL_UPHY_PLL_CTL2_CAL_EN (1 << 0)
170170

171171
#define XUSB_PADCTL_UPHY_PLL_P0_CTL4 0x36c
172+
#define XUSB_PADCTL_UPHY_PLL_CTL4_XDIGCLK_EN (1 << 19)
172173
#define XUSB_PADCTL_UPHY_PLL_CTL4_TXCLKREF_EN (1 << 15)
173174
#define XUSB_PADCTL_UPHY_PLL_CTL4_TXCLKREF_SEL_SHIFT 12
174175
#define XUSB_PADCTL_UPHY_PLL_CTL4_TXCLKREF_SEL_MASK 0x3
@@ -537,11 +538,8 @@ static int tegra210_sata_uphy_enable(struct tegra_xusb_padctl *padctl, bool usb)
537538
value |= (XUSB_PADCTL_UPHY_PLL_CTL4_TXCLKREF_SEL_SATA_VAL <<
538539
XUSB_PADCTL_UPHY_PLL_CTL4_TXCLKREF_SEL_SHIFT);
539540

540-
/* XXX PLL0_XDIGCLK_EN */
541-
/*
542-
value &= ~(1 << 19);
541+
value &= ~XUSB_PADCTL_UPHY_PLL_CTL4_XDIGCLK_EN;
543542
padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL4);
544-
*/
545543

546544
value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL1);
547545
value &= ~((XUSB_PADCTL_UPHY_PLL_CTL1_FREQ_MDIV_MASK <<

0 commit comments

Comments
 (0)