Skip to content

Commit 9a1d2c7

Browse files
author
Desnes Nunes
committed
usb: phy: tegra: Remove unused functions
JIRA: https://issues.redhat.com/browse/RHEL-122021 commit bc9a0c6 Author: "Dr. David Alan Gilbert" <linux@treblig.org> Date: Tue, 3 Jun 2025 21:39:05 +0100 tegra_ehci_phy_restore_start() and tegra_ehci_phy_restore_end() last use was removed in 2013 by commit a4faa54 ("USB: EHCI: tegra: remove all power management") tegra_usb_phy_preresume() and tegra_usb_phy_postresume() last use was removed in 2020 by commit c3590c7 ("usb: host: ehci-tegra: Remove the driver") (Although that one makes me wonder how much of the rest of the file is actually used) Remove both sets. Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org> Link: https://lore.kernel.org/r/20250603203905.279307-1-linux@treblig.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Desnes Nunes <desnesn@redhat.com>
1 parent 4bfee93 commit 9a1d2c7

File tree

2 files changed

+0
-98
lines changed

2 files changed

+0
-98
lines changed

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

Lines changed: 0 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -711,58 +711,6 @@ static int utmi_phy_power_off(struct tegra_usb_phy *phy)
711711
return utmip_pad_power_off(phy);
712712
}
713713

714-
static void utmi_phy_preresume(struct tegra_usb_phy *phy)
715-
{
716-
void __iomem *base = phy->regs;
717-
u32 val;
718-
719-
val = readl_relaxed(base + UTMIP_TX_CFG0);
720-
val |= UTMIP_HS_DISCON_DISABLE;
721-
writel_relaxed(val, base + UTMIP_TX_CFG0);
722-
}
723-
724-
static void utmi_phy_postresume(struct tegra_usb_phy *phy)
725-
{
726-
void __iomem *base = phy->regs;
727-
u32 val;
728-
729-
val = readl_relaxed(base + UTMIP_TX_CFG0);
730-
val &= ~UTMIP_HS_DISCON_DISABLE;
731-
writel_relaxed(val, base + UTMIP_TX_CFG0);
732-
}
733-
734-
static void utmi_phy_restore_start(struct tegra_usb_phy *phy,
735-
enum tegra_usb_phy_port_speed port_speed)
736-
{
737-
void __iomem *base = phy->regs;
738-
u32 val;
739-
740-
val = readl_relaxed(base + UTMIP_MISC_CFG0);
741-
val &= ~UTMIP_DPDM_OBSERVE_SEL(~0);
742-
if (port_speed == TEGRA_USB_PHY_PORT_SPEED_LOW)
743-
val |= UTMIP_DPDM_OBSERVE_SEL_FS_K;
744-
else
745-
val |= UTMIP_DPDM_OBSERVE_SEL_FS_J;
746-
writel_relaxed(val, base + UTMIP_MISC_CFG0);
747-
usleep_range(1, 10);
748-
749-
val = readl_relaxed(base + UTMIP_MISC_CFG0);
750-
val |= UTMIP_DPDM_OBSERVE;
751-
writel_relaxed(val, base + UTMIP_MISC_CFG0);
752-
usleep_range(10, 100);
753-
}
754-
755-
static void utmi_phy_restore_end(struct tegra_usb_phy *phy)
756-
{
757-
void __iomem *base = phy->regs;
758-
u32 val;
759-
760-
val = readl_relaxed(base + UTMIP_MISC_CFG0);
761-
val &= ~UTMIP_DPDM_OBSERVE;
762-
writel_relaxed(val, base + UTMIP_MISC_CFG0);
763-
usleep_range(10, 100);
764-
}
765-
766714
static int ulpi_phy_power_on(struct tegra_usb_phy *phy)
767715
{
768716
void __iomem *base = phy->regs;
@@ -1123,43 +1071,6 @@ static int tegra_usb_phy_init(struct usb_phy *u_phy)
11231071
return err;
11241072
}
11251073

1126-
void tegra_usb_phy_preresume(struct usb_phy *u_phy)
1127-
{
1128-
struct tegra_usb_phy *phy = to_tegra_usb_phy(u_phy);
1129-
1130-
if (!phy->is_ulpi_phy)
1131-
utmi_phy_preresume(phy);
1132-
}
1133-
EXPORT_SYMBOL_GPL(tegra_usb_phy_preresume);
1134-
1135-
void tegra_usb_phy_postresume(struct usb_phy *u_phy)
1136-
{
1137-
struct tegra_usb_phy *phy = to_tegra_usb_phy(u_phy);
1138-
1139-
if (!phy->is_ulpi_phy)
1140-
utmi_phy_postresume(phy);
1141-
}
1142-
EXPORT_SYMBOL_GPL(tegra_usb_phy_postresume);
1143-
1144-
void tegra_ehci_phy_restore_start(struct usb_phy *u_phy,
1145-
enum tegra_usb_phy_port_speed port_speed)
1146-
{
1147-
struct tegra_usb_phy *phy = to_tegra_usb_phy(u_phy);
1148-
1149-
if (!phy->is_ulpi_phy)
1150-
utmi_phy_restore_start(phy, port_speed);
1151-
}
1152-
EXPORT_SYMBOL_GPL(tegra_ehci_phy_restore_start);
1153-
1154-
void tegra_ehci_phy_restore_end(struct usb_phy *u_phy)
1155-
{
1156-
struct tegra_usb_phy *phy = to_tegra_usb_phy(u_phy);
1157-
1158-
if (!phy->is_ulpi_phy)
1159-
utmi_phy_restore_end(phy);
1160-
}
1161-
EXPORT_SYMBOL_GPL(tegra_ehci_phy_restore_end);
1162-
11631074
static int read_utmi_param(struct platform_device *pdev, const char *param,
11641075
u8 *dest)
11651076
{

include/linux/usb/tegra_usb_phy.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,4 @@ struct tegra_usb_phy {
8080
bool powered_on;
8181
};
8282

83-
void tegra_usb_phy_preresume(struct usb_phy *phy);
84-
85-
void tegra_usb_phy_postresume(struct usb_phy *phy);
86-
87-
void tegra_ehci_phy_restore_start(struct usb_phy *phy,
88-
enum tegra_usb_phy_port_speed port_speed);
89-
90-
void tegra_ehci_phy_restore_end(struct usb_phy *phy);
91-
9283
#endif /* __TEGRA_USB_PHY_H */

0 commit comments

Comments
 (0)