Skip to content

Commit aacad39

Browse files
clamor-sgregkh
authored andcommitted
usb: phy: tegra: cosmetic fixes
Change TEGRA_USB_HOSTPC1_DEVLC_PTS_HSIC to its literal value instead of using the BIT macro, as it is an enumeration. Correct the spelling in the comment and rename uhsic_registers_shift to uhsic_registers_offset. These changes are cosmetic and do not affect code behavior. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Link: https://patch.msgid.link/20260202080526.23487-2-clamor95@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8ccfe3a commit aacad39

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

drivers/usb/phy/phy-tegra-usb.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#define TEGRA_USB_HOSTPC1_DEVLC 0x1b4
4949
#define TEGRA_USB_HOSTPC1_DEVLC_PTS(x) (((x) & 0x7) << 29)
5050
#define TEGRA_USB_HOSTPC1_DEVLC_PHCD BIT(22)
51-
#define TEGRA_USB_HOSTPC1_DEVLC_PTS_HSIC BIT(2)
51+
#define TEGRA_USB_HOSTPC1_DEVLC_PTS_HSIC 4
5252

5353
/* Bits of PORTSC1, which will get cleared by writing 1 into them */
5454
#define TEGRA_PORTSC1_RWC_BITS (PORT_CSC | PORT_PEC | PORT_OCC)
@@ -169,7 +169,7 @@
169169
/*
170170
* Tegra20 has no UTMIP registers on PHY2 and UHSIC registers start from 0x800
171171
* just where UTMIP registers should have been. This is the case only with Tegra20
172-
* Tegra30+ have UTMIP registers at 0x800 and UHSIC registers shifter by 0x400
172+
* Tegra30+ have UTMIP registers at 0x800 and UHSIC registers are shifted by 0x400
173173
* to 0xc00, but register layout is preserved.
174174
*/
175175
#define UHSIC_PLL_CFG1 0x804
@@ -873,15 +873,15 @@ static int ulpi_phy_power_off(struct tegra_usb_phy *phy)
873873
static u32 tegra_hsic_readl(struct tegra_usb_phy *phy, u32 reg)
874874
{
875875
void __iomem *base = phy->regs;
876-
u32 shift = phy->soc_config->uhsic_registers_shift;
876+
u32 shift = phy->soc_config->uhsic_registers_offset;
877877

878878
return readl_relaxed(base + shift + reg);
879879
}
880880

881881
static void tegra_hsic_writel(struct tegra_usb_phy *phy, u32 reg, u32 value)
882882
{
883883
void __iomem *base = phy->regs;
884-
u32 shift = phy->soc_config->uhsic_registers_shift;
884+
u32 shift = phy->soc_config->uhsic_registers_offset;
885885

886886
writel_relaxed(value, base + shift + reg);
887887
}
@@ -1469,7 +1469,7 @@ static const struct tegra_phy_soc_config tegra20_soc_config = {
14691469
.requires_usbmode_setup = false,
14701470
.requires_extra_tuning_parameters = false,
14711471
.requires_pmc_ao_power_up = false,
1472-
.uhsic_registers_shift = 0,
1472+
.uhsic_registers_offset = 0,
14731473
.uhsic_tx_rtune = 0, /* 40 ohm */
14741474
};
14751475

@@ -1479,7 +1479,7 @@ static const struct tegra_phy_soc_config tegra30_soc_config = {
14791479
.requires_usbmode_setup = true,
14801480
.requires_extra_tuning_parameters = true,
14811481
.requires_pmc_ao_power_up = true,
1482-
.uhsic_registers_shift = 0x400,
1482+
.uhsic_registers_offset = 0x400,
14831483
.uhsic_tx_rtune = 8, /* 50 ohm */
14841484
};
14851485

include/linux/usb/tegra_usb_phy.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ struct gpio_desc;
2323
* requires_extra_tuning_parameters: true if xcvr_hsslew, hssquelch_level
2424
* and hsdiscon_level should be set for adequate signal quality
2525
* requires_pmc_ao_power_up: true if USB AO is powered down by default
26-
* uhsic_registers_shift: for Tegra30+ where HSIC registers were shifted
26+
* uhsic_registers_offset: for Tegra30+ where HSIC registers were offset
2727
* comparing to Tegra20 by 0x400, since Tegra20 has no UTMIP on PHY2
2828
* uhsic_tx_rtune: fine tuned 50 Ohm termination resistor for NMOS/PMOS driver
2929
*/
@@ -34,7 +34,7 @@ struct tegra_phy_soc_config {
3434
bool requires_usbmode_setup;
3535
bool requires_extra_tuning_parameters;
3636
bool requires_pmc_ao_power_up;
37-
u32 uhsic_registers_shift;
37+
u32 uhsic_registers_offset;
3838
u32 uhsic_tx_rtune;
3939
};
4040

0 commit comments

Comments
 (0)