Skip to contentSkip to conversation

usb: remove some unused code

PATCH In review Alex Elder 4 participants 7 messages Oct 31, 2017 – Nov 3, 2017

Subsystems (3)
lore
Share & tools
lore

Alex Elder

author
#0 lore raw

v3 cover usb: remove some unused code

This series deletes some Qualcomm USB code is no longer needed by any Qualcomm hardware. A separate series deletes the Kconfig options that enable building this code from the ARM64 defconfig.

With these drivers, host and gadget mode were implemented separately for the same hardware, which is inherently racy and broken. These drivers have not really been needed since Stephen Boyd reworked the ChipIdea driver to support these platforms.

-Alex

v3: - rebased, and expanded the above description; no functional change
v2: - delete sections of Kconfig files that control whether the deleted
code gets built

Alex Elder (3):
usb: host: remove ehci-msm.c
usb: phy: remove phy-msm-usb.c
usb: phy: remove phy-qcom-8x16-usb.c

 drivers/usb/host/Kconfig            |   12 -
 drivers/usb/host/Makefile           |    1 -
 drivers/usb/host/ehci-msm.c         |  265 -----
 drivers/usb/phy/Kconfig             |   29 -
 drivers/usb/phy/Makefile            |    2 -
 drivers/usb/phy/phy-msm-usb.c       | 2085 -----------------------------------
 drivers/usb/phy/phy-qcom-8x16-usb.c |  366 ------
 7 files changed, 2760 deletions(-)
 delete mode 100644 drivers/usb/host/ehci-msm.c
 delete mode 100644 drivers/usb/phy/phy-msm-usb.c
 delete mode 100644 drivers/usb/phy/phy-qcom-8x16-usb.c
Signature · 1 line
2.11.0
author
#1 lore raw

PATCH v3 1/3 usb: host: remove ehci-msm.c

No Qualcomm SoC requires the "ehci-msm.c" code any more. So remove it.

---
 drivers/usb/host/Kconfig    |  12 --
 drivers/usb/host/Makefile   |   1 -
 drivers/usb/host/ehci-msm.c | 265 --------------------------------------------
 3 files changed, 278 deletions(-)
 delete mode 100644 drivers/usb/host/ehci-msm.c
drivers/usb/host/Kconfig +0 -12
index fa5692dec832..f03b8041a9b1 100644
@@ -222,18 +222,6 @@ config USB_EHCI_HCD_AT91
           Enables support for the on-chip EHCI controller on
           Atmel chips.
 
-config USB_EHCI_MSM
-	tristate "Support for Qualcomm QSD/MSM on-chip EHCI USB controller"
-	depends on ARCH_QCOM
-	select USB_EHCI_ROOT_HUB_TT
-	---help---
-	  Enables support for the USB Host controller present on the
-	  Qualcomm chipsets. Root Hub has inbuilt TT.
-	  This driver depends on OTG driver for PHY initialization,
-	  clock management, powering up VBUS, and power management.
-	  This driver is not supported on boards like trout which
-	  has an external PHY.
-
 config USB_EHCI_TEGRA
        tristate "NVIDIA Tegra HCD support"
        depends on ARCH_TEGRA
drivers/usb/host/Makefile +0 -1
index cf2691fffcc0..1645c549bdb1 100644
@@ -39,7 +39,6 @@ obj-$(CONFIG_USB_EHCI_HCD_SPEAR)	+= ehci-spear.o
 obj-$(CONFIG_USB_EHCI_HCD_STI)	+= ehci-st.o
 obj-$(CONFIG_USB_EHCI_EXYNOS)	+= ehci-exynos.o
 obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o
-obj-$(CONFIG_USB_EHCI_MSM)	+= ehci-msm.o
 obj-$(CONFIG_USB_EHCI_TEGRA)	+= ehci-tegra.o
 obj-$(CONFIG_USB_W90X900_EHCI)	+= ehci-w90x900.o
 
drivers/usb/host/ehci-msm.c deleted +0 -265

265 lines not on this page · raw message

Signature · 1 line
2.11.0
maintainer Acked-by on v3 1/3
#2 lore raw

Re: [PATCH v3 1/3] usb: host: remove ehci-msm.c

Quoted 6 lines · Alex Elder

No Qualcomm SoC requires the "ehci-msm.c" code any more. So remove it.

Quoted 6 lines
---
 drivers/usb/host/Kconfig    |  12 --
 drivers/usb/host/Makefile   |   1 -
 drivers/usb/host/ehci-msm.c | 265 --------------------------------------------
 3 files changed, 278 deletions(-)
 delete mode 100644 drivers/usb/host/ehci-msm.c
author
#3 lore raw

PATCH v3 2/3 usb: phy: remove phy-msm-usb.c

In reply to Alex Elder

No Qualcomm SoC requires the "phy-msm-usb.c" USB phy driver support any more, so remove the code.

---
 drivers/usb/phy/Kconfig       |   15 -
 drivers/usb/phy/Makefile      |    1 -
 drivers/usb/phy/phy-msm-usb.c | 2085 -----------------------------------------
 3 files changed, 2101 deletions(-)
 delete mode 100644 drivers/usb/phy/phy-msm-usb.c
drivers/usb/phy/Kconfig +0 -15
index aff702c0eb9f..f5775e5c9f52 100644
@@ -137,21 +137,6 @@ config USB_ISP1301
 	  To compile this driver as a module, choose M here: the
 	  module will be called phy-isp1301.
 
-config USB_MSM_OTG
-	tristate "Qualcomm on-chip USB OTG controller support"
-	depends on (USB || USB_GADGET) && (ARCH_QCOM || COMPILE_TEST)
-	depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
-	depends on RESET_CONTROLLER
-	select USB_PHY
-	help
-	  Enable this to support the USB OTG transceiver on Qualcomm chips. It
-	  handles PHY initialization, clock management, and workarounds
-	  required after resetting the hardware and power management.
-	  This driver is required even for peripheral only or host only
-	  mode configurations.
-	  This driver is not supported on boards like trout which
-	  has an external PHY.
-
 config USB_QCOM_8X16_PHY
 	tristate "Qualcomm APQ8016/MSM8916 on-chip USB PHY controller support"
 	depends on ARCH_QCOM || COMPILE_TEST
drivers/usb/phy/Makefile +0 -1
index e7c9ca8cafb0..61013f38abbe 100644
@@ -18,7 +18,6 @@ obj-$(CONFIG_TWL6030_USB)		+= phy-twl6030-usb.o
 obj-$(CONFIG_USB_EHCI_TEGRA)		+= phy-tegra-usb.o
 obj-$(CONFIG_USB_GPIO_VBUS)		+= phy-gpio-vbus-usb.o
 obj-$(CONFIG_USB_ISP1301)		+= phy-isp1301.o
-obj-$(CONFIG_USB_MSM_OTG)		+= phy-msm-usb.o
 obj-$(CONFIG_USB_QCOM_8X16_PHY)	+= phy-qcom-8x16-usb.o
 obj-$(CONFIG_USB_MV_OTG)		+= phy-mv-usb.o
 obj-$(CONFIG_USB_MXS_PHY)		+= phy-mxs-usb.o
drivers/usb/phy/phy-msm-usb.c deleted +0 -2085

2,085 lines not on this page · raw message

Signature · 1 line
2.11.0
#4 lore raw

Re: [PATCH v3 2/3] usb: phy: remove phy-msm-usb.c

Hi Alex,

Quoted 8 lines · Alex Elder

No Qualcomm SoC requires the "phy-msm-usb.c" USB phy driver support any more, so remove the code.

---

<snip>

Quoted 1 line

-#include <linux/usb/msm_hsusb_hw.h>

This file and ehci-msm.c were the last consumers of this header, so it too can now be deleted. Has your series been picked up yet? If so I or someone can send a follow-up patch.

Jack

Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
#5 lore raw

Re: [PATCH v3 2/3] usb: phy: remove phy-msm-usb.c

Quoted 11 lines · Jack Pham

Hi Alex,

Quoted 8 lines · Alex Elder

No Qualcomm SoC requires the "phy-msm-usb.c" USB phy driver support any more, so remove the code.

---

Quoted 7 lines

<snip>

Quoted 1 line

-#include <linux/usb/msm_hsusb_hw.h>

This file and ehci-msm.c were the last consumers of this header, so it too can now be deleted. Has your series been picked up yet? If so I or someone can send a follow-up patch.

Thanks for pointing that out! I'll post a new patch now to remove it.

-Alex

Quoted 3 lines

Jack

author
#6 lore raw

PATCH v3 3/3 usb: phy: remove phy-qcom-8x16-usb.c

In reply to Alex Elder

No Qualcomm SoC requires the "phy-qcom-8x16-usb.c" USB phy driver support any more, so remove the code.

---
 drivers/usb/phy/Kconfig             |  14 --
 drivers/usb/phy/Makefile            |   1 -
 drivers/usb/phy/phy-qcom-8x16-usb.c | 366 ------------------------------------
 3 files changed, 381 deletions(-)
 delete mode 100644 drivers/usb/phy/phy-qcom-8x16-usb.c
drivers/usb/phy/Kconfig +0 -14
index f5775e5c9f52..0f8ab981d572 100644
@@ -137,20 +137,6 @@ config USB_ISP1301
 	  To compile this driver as a module, choose M here: the
 	  module will be called phy-isp1301.
 
-config USB_QCOM_8X16_PHY
-	tristate "Qualcomm APQ8016/MSM8916 on-chip USB PHY controller support"
-	depends on ARCH_QCOM || COMPILE_TEST
-	depends on RESET_CONTROLLER
-	select USB_PHY
-	select USB_ULPI_VIEWPORT
-	help
-	  Enable this to support the USB transceiver on Qualcomm 8x16 chipsets.
-	  It handles PHY initialization, clock management, power management,
-	  and workarounds required after resetting the hardware.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called phy-qcom-8x16-usb.
-
 config USB_MV_OTG
 	tristate "Marvell USB OTG support"
 	depends on USB_EHCI_MV && USB_MV_UDC && PM && USB_OTG
drivers/usb/phy/Makefile +0 -1
index 61013f38abbe..8beefb7f2777 100644
@@ -18,7 +18,6 @@ obj-$(CONFIG_TWL6030_USB)		+= phy-twl6030-usb.o
 obj-$(CONFIG_USB_EHCI_TEGRA)		+= phy-tegra-usb.o
 obj-$(CONFIG_USB_GPIO_VBUS)		+= phy-gpio-vbus-usb.o
 obj-$(CONFIG_USB_ISP1301)		+= phy-isp1301.o
-obj-$(CONFIG_USB_QCOM_8X16_PHY)	+= phy-qcom-8x16-usb.o
 obj-$(CONFIG_USB_MV_OTG)		+= phy-mv-usb.o
 obj-$(CONFIG_USB_MXS_PHY)		+= phy-mxs-usb.o
 obj-$(CONFIG_USB_ULPI)			+= phy-ulpi.o
drivers/usb/phy/phy-qcom-8x16-usb.c deleted +0 -366

366 lines not on this page · raw message

Signature · 1 line
2.11.0