Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: phy: tegra: Remove unused functions

tegra_ehci_phy_restore_start() and tegra_ehci_phy_restore_end()
last use was removed in 2013 by
commit a4faa54e3aa2 ("USB: EHCI: tegra: remove all power management")

tegra_usb_phy_preresume() and tegra_usb_phy_postresume() last
use was removed in 2020 by
commit c3590c7656fb ("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>

authored by

Dr. David Alan Gilbert and committed by
Greg Kroah-Hartman
bc9a0c68 b26fa800

-98
-89
drivers/usb/phy/phy-tegra-usb.c
··· 711 711 return utmip_pad_power_off(phy); 712 712 } 713 713 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 - 766 714 static int ulpi_phy_power_on(struct tegra_usb_phy *phy) 767 715 { 768 716 void __iomem *base = phy->regs; ··· 1070 1122 1071 1123 return err; 1072 1124 } 1073 - 1074 - void tegra_usb_phy_preresume(struct usb_phy *u_phy) 1075 - { 1076 - struct tegra_usb_phy *phy = to_tegra_usb_phy(u_phy); 1077 - 1078 - if (!phy->is_ulpi_phy) 1079 - utmi_phy_preresume(phy); 1080 - } 1081 - EXPORT_SYMBOL_GPL(tegra_usb_phy_preresume); 1082 - 1083 - void tegra_usb_phy_postresume(struct usb_phy *u_phy) 1084 - { 1085 - struct tegra_usb_phy *phy = to_tegra_usb_phy(u_phy); 1086 - 1087 - if (!phy->is_ulpi_phy) 1088 - utmi_phy_postresume(phy); 1089 - } 1090 - EXPORT_SYMBOL_GPL(tegra_usb_phy_postresume); 1091 - 1092 - void tegra_ehci_phy_restore_start(struct usb_phy *u_phy, 1093 - enum tegra_usb_phy_port_speed port_speed) 1094 - { 1095 - struct tegra_usb_phy *phy = to_tegra_usb_phy(u_phy); 1096 - 1097 - if (!phy->is_ulpi_phy) 1098 - utmi_phy_restore_start(phy, port_speed); 1099 - } 1100 - EXPORT_SYMBOL_GPL(tegra_ehci_phy_restore_start); 1101 - 1102 - void tegra_ehci_phy_restore_end(struct usb_phy *u_phy) 1103 - { 1104 - struct tegra_usb_phy *phy = to_tegra_usb_phy(u_phy); 1105 - 1106 - if (!phy->is_ulpi_phy) 1107 - utmi_phy_restore_end(phy); 1108 - } 1109 - EXPORT_SYMBOL_GPL(tegra_ehci_phy_restore_end); 1110 1125 1111 1126 static int read_utmi_param(struct platform_device *pdev, const char *param, 1112 1127 u8 *dest)
-9
include/linux/usb/tegra_usb_phy.h
··· 80 80 bool powered_on; 81 81 }; 82 82 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 - 92 83 #endif /* __TEGRA_USB_PHY_H */