[PATCH 4/4] Convert CONFIG_USB_EHCI_IS_TDI to Kconfig

Marek Behún kabel at kernel.org
Sat Oct 9 15:27:35 CEST 2021


From: Marek Behún <marek.behun at nic.cz>

On mvebu this is defined if and only if !ARM64.

Otherwise it is defined for boards with ARCH_MX23, ARCH_TEGRA and
ARCH_ZYNQ, and also for SOC_AR934X (tplink_wdr4300).

Signed-off-by: Marek Behún <marek.behun at nic.cz>
---
 arch/arm/mach-kirkwood/include/mach/config.h | 7 -------
 arch/mips/mach-ath79/Kconfig                 | 1 +
 drivers/usb/host/Kconfig                     | 7 +++++++
 include/configs/clearfog.h                   | 3 ---
 include/configs/controlcenterdc.h            | 3 ---
 include/configs/crs3xx-98dx3236.h            | 3 ---
 include/configs/db-88f6720.h                 | 1 -
 include/configs/db-88f6820-amc.h             | 3 ---
 include/configs/db-88f6820-gp.h              | 3 ---
 include/configs/db-mv784mp-gp.h              | 1 -
 include/configs/db-xc3-24g4xg.h              | 3 ---
 include/configs/ds414.h                      | 3 ---
 include/configs/helios4.h                    | 3 ---
 include/configs/mxs.h                        | 5 -----
 include/configs/nas220.h                     | 7 -------
 include/configs/tegra114-common.h            | 1 -
 include/configs/tegra124-common.h            | 1 -
 include/configs/tegra20-common.h             | 1 -
 include/configs/tegra210-common.h            | 1 -
 include/configs/tegra30-common.h             | 1 -
 include/configs/theadorable.h                | 1 -
 include/configs/tplink_wdr4300.h             | 1 -
 include/configs/turris_omnia.h               | 3 ---
 include/configs/x530.h                       | 3 ---
 include/configs/zynq-common.h                | 2 --
 scripts/config_whitelist.txt                 | 1 -
 26 files changed, 8 insertions(+), 61 deletions(-)

diff --git a/arch/arm/mach-kirkwood/include/mach/config.h b/arch/arm/mach-kirkwood/include/mach/config.h
index f262d70b14..cf6b1b9b63 100644
--- a/arch/arm/mach-kirkwood/include/mach/config.h
+++ b/arch/arm/mach-kirkwood/include/mach/config.h
@@ -62,13 +62,6 @@
 #define CONFIG_RESET_PHY_R	/* use reset_phy() to init mv8831116 PHY */
 #endif /* CONFIG_CMD_NET */
 
-/*
- * USB/EHCI
- */
-#ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI_IS_TDI
-#endif /* CONFIG_CMD_USB */
-
 /*
  * IDE Support on SATA ports
  */
diff --git a/arch/mips/mach-ath79/Kconfig b/arch/mips/mach-ath79/Kconfig
index bdb23b5765..cd85d1b6c3 100644
--- a/arch/mips/mach-ath79/Kconfig
+++ b/arch/mips/mach-ath79/Kconfig
@@ -20,6 +20,7 @@ config SOC_AR934X
 	select SUPPORTS_BIG_ENDIAN
 	select SUPPORTS_CPU_MIPS32_R1
 	select SUPPORTS_CPU_MIPS32_R2
+	select USB_EHCI_IS_TDI if USB_EHCI_HCD
 	help
 	  This supports QCA/Atheros ar934x family SOCs.
 
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index be5e4b994d..ccecb5a3b0 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -139,6 +139,9 @@ config USB_EHCI_HCD
 
 if USB_EHCI_HCD
 
+config USB_EHCI_IS_TDI
+	bool
+
 config USB_EHCI_ATMEL
 	bool  "Support for Atmel on-chip EHCI USB controller"
 	depends on ARCH_AT91
@@ -150,6 +153,7 @@ config USB_EHCI_MARVELL
 	bool "Support for Marvell on-chip EHCI USB controller"
 	depends on ARCH_MVEBU || ARCH_KIRKWOOD || ARCH_ORION5X
 	default y
+	select USB_EHCI_IS_TDI if !ARM64
 	---help---
 	  Enables support for the on-chip EHCI controller on MVEBU SoCs.
 
@@ -179,6 +183,7 @@ config USB_EHCI_MXS
 	bool "Support for i.MX23 EHCI USB controller"
 	depends on ARCH_MX23
 	default y
+	select USB_EHCI_IS_TDI
 	help
 	  Enables support for the on-chip EHCI controller on i.MX23 SoCs.
 
@@ -258,12 +263,14 @@ config USB_EHCI_PCI
 config USB_EHCI_TEGRA
 	bool "Support for NVIDIA Tegra on-chip EHCI USB controller"
 	depends on ARCH_TEGRA
+	select USB_EHCI_IS_TDI
 	---help---
 	  Enable support for Tegra on-chip EHCI USB controller
 
 config USB_EHCI_ZYNQ
 	bool "Support for Xilinx Zynq on-chip EHCI USB controller"
 	default y if ARCH_ZYNQ
+	select USB_EHCI_IS_TDI
 	---help---
 	  Enable support for Zynq on-chip EHCI USB controller
 
diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
index a12e1582d6..a30bca5147 100644
--- a/include/configs/clearfog.h
+++ b/include/configs/clearfog.h
@@ -18,9 +18,6 @@
  * U-Boot into it.
  */
 
-/* USB/EHCI configuration */
-#define CONFIG_USB_EHCI_IS_TDI
-
 #define CONFIG_ENV_MIN_ENTRIES		128
 
 /* Environment in MMC */
diff --git a/include/configs/controlcenterdc.h b/include/configs/controlcenterdc.h
index 12e9b8d06d..21e61e5e8f 100644
--- a/include/configs/controlcenterdc.h
+++ b/include/configs/controlcenterdc.h
@@ -27,9 +27,6 @@
 #define CONFIG_SYS_SCSI_MAX_DEVICE	(CONFIG_SYS_SCSI_MAX_SCSI_ID * \
 					 CONFIG_SYS_SCSI_MAX_LUN)
 
-/* USB/EHCI configuration */
-#define CONFIG_USB_EHCI_IS_TDI
-
 /* Environment in SPI NOR flash */
 
 #define PHY_ANEG_TIMEOUT	8000	/* PHY needs a longer aneg time */
diff --git a/include/configs/crs3xx-98dx3236.h b/include/configs/crs3xx-98dx3236.h
index 5300467a76..27b45a7605 100644
--- a/include/configs/crs3xx-98dx3236.h
+++ b/include/configs/crs3xx-98dx3236.h
@@ -13,9 +13,6 @@
 #define CONFIG_SYS_BOOTM_LEN	(64 * 1024 * 1024) /* 64 MB */
 #define CONFIG_SYS_KWD_CONFIG	$(CONFIG_BOARDDIR)/kwbimage.cfg
 
-/* USB/EHCI configuration */
-#define CONFIG_USB_EHCI_IS_TDI
-
 /* Environment in SPI NOR flash */
 
 /* Keep device tree and initrd in lower memory so the kernel can access them */
diff --git a/include/configs/db-88f6720.h b/include/configs/db-88f6720.h
index 76c02f6656..19fc669f89 100644
--- a/include/configs/db-88f6720.h
+++ b/include/configs/db-88f6720.h
@@ -20,7 +20,6 @@
 #define CONFIG_I2C_MVTWSI_BASE0		MVEBU_TWSI_BASE
 
 /* USB/EHCI configuration */
-#define CONFIG_USB_EHCI_IS_TDI
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 3
 
 /* Environment in SPI NOR flash */
diff --git a/include/configs/db-88f6820-amc.h b/include/configs/db-88f6820-amc.h
index c5f0a1d2e0..1f70c609d2 100644
--- a/include/configs/db-88f6820-amc.h
+++ b/include/configs/db-88f6820-amc.h
@@ -10,9 +10,6 @@
  * High Level Configuration Options (easy to change)
  */
 
-/* USB/EHCI configuration */
-#define CONFIG_USB_EHCI_IS_TDI
-
 /* Environment in SPI NOR flash */
 
 #define PHY_ANEG_TIMEOUT	8000	/* PHY needs a longer aneg time */
diff --git a/include/configs/db-88f6820-gp.h b/include/configs/db-88f6820-gp.h
index ecda30bab5..41dadfebb9 100644
--- a/include/configs/db-88f6820-gp.h
+++ b/include/configs/db-88f6820-gp.h
@@ -22,9 +22,6 @@
 #define CONFIG_SYS_SCSI_MAX_DEVICE	(CONFIG_SYS_SCSI_MAX_SCSI_ID * \
 					 CONFIG_SYS_SCSI_MAX_LUN)
 
-/* USB/EHCI configuration */
-#define CONFIG_USB_EHCI_IS_TDI
-
 /* Environment in SPI NOR flash */
 
 #define PHY_ANEG_TIMEOUT	8000	/* PHY needs a longer aneg time */
diff --git a/include/configs/db-mv784mp-gp.h b/include/configs/db-mv784mp-gp.h
index defe480613..dbbc33ebf9 100644
--- a/include/configs/db-mv784mp-gp.h
+++ b/include/configs/db-mv784mp-gp.h
@@ -21,7 +21,6 @@
 #define CONFIG_I2C_MVTWSI_BASE0		MVEBU_TWSI_BASE
 
 /* USB/EHCI configuration */
-#define CONFIG_USB_EHCI_IS_TDI
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 3
 
 /* Environment in SPI NOR flash */
diff --git a/include/configs/db-xc3-24g4xg.h b/include/configs/db-xc3-24g4xg.h
index 206afae590..6a4c5a7ab5 100644
--- a/include/configs/db-xc3-24g4xg.h
+++ b/include/configs/db-xc3-24g4xg.h
@@ -12,9 +12,6 @@
 
 #define CONFIG_SYS_KWD_CONFIG	$(CONFIG_BOARDDIR)/kwbimage.cfg
 
-/* USB/EHCI configuration */
-#define CONFIG_USB_EHCI_IS_TDI
-
 /* Environment in SPI NOR flash */
 
 /* NAND */
diff --git a/include/configs/ds414.h b/include/configs/ds414.h
index 85abed5d3b..1f2d2c5e44 100644
--- a/include/configs/ds414.h
+++ b/include/configs/ds414.h
@@ -24,9 +24,6 @@
 #define CONFIG_PCI_SCAN_SHOW
 #endif
 
-/* USB/EHCI/XHCI configuration */
-#define CONFIG_USB_EHCI_IS_TDI
-
 /*
  * mv-common.h should be defined after CMD configs since it used them
  * to enable certain macros
diff --git a/include/configs/helios4.h b/include/configs/helios4.h
index 7ed70602d1..56d35d6fdb 100644
--- a/include/configs/helios4.h
+++ b/include/configs/helios4.h
@@ -18,9 +18,6 @@
  * U-Boot into it.
  */
 
-/* USB/EHCI configuration */
-#define CONFIG_USB_EHCI_IS_TDI
-
 #define CONFIG_ENV_MIN_ENTRIES		128
 
 /* Environment in MMC */
diff --git a/include/configs/mxs.h b/include/configs/mxs.h
index 4473d5177a..f67c7306de 100644
--- a/include/configs/mxs.h
+++ b/include/configs/mxs.h
@@ -126,9 +126,4 @@
 #define CONFIG_SPI_HALF_DUPLEX
 #endif
 
-/* USB */
-#ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI_IS_TDI
-#endif
-
 #endif	/* __CONFIGS_MXS_H__ */
diff --git a/include/configs/nas220.h b/include/configs/nas220.h
index 52c55be061..99b14ba621 100644
--- a/include/configs/nas220.h
+++ b/include/configs/nas220.h
@@ -60,13 +60,6 @@
 #define CONFIG_PHY_BASE_ADR 8
 #endif /* CONFIG_CMD_NET */
 
-/*
- * USB/EHCI
- */
-#ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI_IS_TDI
-#endif /* CONFIG_CMD_USB */
-
 /*
  * File system
  */
diff --git a/include/configs/tegra114-common.h b/include/configs/tegra114-common.h
index 06b687d556..0973721180 100644
--- a/include/configs/tegra114-common.h
+++ b/include/configs/tegra114-common.h
@@ -58,7 +58,6 @@
 #define CONFIG_SPL_STACK		0x800ffffc
 
 /* For USB EHCI controller */
-#define CONFIG_USB_EHCI_IS_TDI
 #define CONFIG_USB_EHCI_TXFIFO_THRESH	0x10
 
 #endif /* _TEGRA114_COMMON_H_ */
diff --git a/include/configs/tegra124-common.h b/include/configs/tegra124-common.h
index de78ac9924..df688dabd1 100644
--- a/include/configs/tegra124-common.h
+++ b/include/configs/tegra124-common.h
@@ -60,7 +60,6 @@
 #define CONFIG_SPL_STACK		0x800ffffc
 
 /* For USB EHCI controller */
-#define CONFIG_USB_EHCI_IS_TDI
 #define CONFIG_USB_EHCI_TXFIFO_THRESH	0x10
 
 /* GPU needs setup */
diff --git a/include/configs/tegra20-common.h b/include/configs/tegra20-common.h
index d2bed64ccd..063213cbfe 100644
--- a/include/configs/tegra20-common.h
+++ b/include/configs/tegra20-common.h
@@ -78,7 +78,6 @@
  * packets depending on the buffer address and size.
  */
 #define CONFIG_USB_EHCI_TXFIFO_THRESH	0x10
-#define CONFIG_USB_EHCI_IS_TDI
 
 #define CONFIG_SYS_NAND_SELF_INIT
 
diff --git a/include/configs/tegra210-common.h b/include/configs/tegra210-common.h
index 6c58ccc3d5..c36bdb0bb9 100644
--- a/include/configs/tegra210-common.h
+++ b/include/configs/tegra210-common.h
@@ -47,7 +47,6 @@
 	"ramdisk_addr_r=0x83200000\0"
 
 /* For USB EHCI controller */
-#define CONFIG_USB_EHCI_IS_TDI
 #define CONFIG_USB_EHCI_TXFIFO_THRESH	0x10
 
 /* GPU needs setup */
diff --git a/include/configs/tegra30-common.h b/include/configs/tegra30-common.h
index 56b2671e43..b878b1a9e6 100644
--- a/include/configs/tegra30-common.h
+++ b/include/configs/tegra30-common.h
@@ -55,7 +55,6 @@
 #define CONFIG_SPL_STACK		0x800ffffc
 
 /* For USB EHCI controller */
-#define CONFIG_USB_EHCI_IS_TDI
 #define CONFIG_USB_EHCI_TXFIFO_THRESH	0x10
 
 #endif /* _TEGRA30_COMMON_H_ */
diff --git a/include/configs/theadorable.h b/include/configs/theadorable.h
index 073855592b..b43c03d3e8 100644
--- a/include/configs/theadorable.h
+++ b/include/configs/theadorable.h
@@ -29,7 +29,6 @@
 #define CONFIG_I2C_MVTWSI_BASE1		MVEBU_TWSI1_BASE
 
 /* USB/EHCI configuration */
-#define CONFIG_USB_EHCI_IS_TDI
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 3
 
 /* Environment in SPI NOR flash */
diff --git a/include/configs/tplink_wdr4300.h b/include/configs/tplink_wdr4300.h
index ede94e95f7..3e76d638c9 100644
--- a/include/configs/tplink_wdr4300.h
+++ b/include/configs/tplink_wdr4300.h
@@ -41,7 +41,6 @@
 /* USB, USB storage, USB ethernet */
 #define CONFIG_EHCI_MMIO_BIG_ENDIAN
 #define CONFIG_EHCI_DESC_BIG_ENDIAN
-#define CONFIG_USB_EHCI_IS_TDI
 
 /*
  * Diagnostics
diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h
index 4d8a7c37de..8d7d5c2bfc 100644
--- a/include/configs/turris_omnia.h
+++ b/include/configs/turris_omnia.h
@@ -17,9 +17,6 @@
  * U-Boot into it.
  */
 
-/* USB/EHCI configuration */
-#define CONFIG_USB_EHCI_IS_TDI
-
 /* Environment in SPI NOR flash */
 
 #define PHY_ANEG_TIMEOUT	8000	/* PHY needs a longer aneg time */
diff --git a/include/configs/x530.h b/include/configs/x530.h
index 23b1121460..f8b808ec7c 100644
--- a/include/configs/x530.h
+++ b/include/configs/x530.h
@@ -45,9 +45,6 @@
 
 /* Additional FS support/configuration */
 
-/* USB/EHCI configuration */
-#define CONFIG_USB_EHCI_IS_TDI
-
 /* Environment in SPI NOR flash */
 
 #define PHY_ANEG_TIMEOUT	8000	/* PHY needs a longer aneg time */
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index f3c8512641..4de2f94b04 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -55,8 +55,6 @@
 #endif
 
 #ifdef CONFIG_USB_EHCI_ZYNQ
-# define CONFIG_USB_EHCI_IS_TDI
-
 # define DFU_DEFAULT_POLL_TIMEOUT	300
 # define CONFIG_THOR_RESET_OFF
 #endif
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index bf5f7cae74..bbb278197c 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -3035,7 +3035,6 @@ CONFIG_USB_EHCI_BASE
 CONFIG_USB_EHCI_BASE_LIST
 CONFIG_USB_EHCI_EXYNOS
 CONFIG_USB_EHCI_FARADAY
-CONFIG_USB_EHCI_IS_TDI
 CONFIG_USB_EHCI_TXFIFO_THRESH
 CONFIG_USB_ETH_QMULT
 CONFIG_USB_ETH_SUBSET
-- 
2.32.0



More information about the U-Boot mailing list