mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 03:27:30 -04:00
Expose Cadence USBSSP through the same platform path as USBSS, trim Kconfig and Makefile: one core loadable object plus separate glue .ko files. Single cdns.ko bundles core, DRD, the generic "cdns,usb3" platform driver in cdns3-plat.c, optional host.o, and optional gadget objects. Use CONFIG_USB_CDNS3_GADGET as a bool to compile gadget support into that module. Remove duplicate MODULE_* declarations from cdns3-plat.c now that it links into the same module. Kconfig: the generic platform driver is selected via CONFIG_USB_CDNS3. Move CONFIG_USB_CDNSP_PCI beside CONFIG_USB_CDNS3_PCI_WRAP under "Platform glue driver support". SoC glue entries (TI, i.MX, StarFive) depend only on CONFIG_USB_CDNS3. Tighten CONFIG_USB_CDNS_SUPPORT dependencies so the umbrella follows host or gadget when either is built as a module. Match host and gadget bools to the cdns.ko tristate with USB=USB_CDNS3 and USB_GADGET=USB_CDNS3 instead of comparing against USB_CDNS_SUPPORT. Link host.o when CONFIG_USB_CDNS3_HOST is enabled and use that symbol in host-export.h, removing the redundant CONFIG_USB_CDNS_HOST indirection. Export cdns_core_init_role and reorganize the function cdns_init, and controller version could be gotten before the gadget init function is decided per controller. Keep host_init / gadget_init callbacks in struct cdns, so core.c does not need direct linkage to host or gadget objects. Refactor cdnsp-pci.c into a thin PCI-to-platform wrapper. drivers/usb/Makefile: descend into drivers/usb/cdns3/ only when CONFIG_USB_CDNS_SUPPORT is enabled. Assisted-by: Cursor:claude-4.6-opus Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Peter Chen <peter.chen@cixtech.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20260421023459.506145-3-peter.chen@cixtech.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
68 lines
1.7 KiB
Makefile
68 lines
1.7 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for the kernel USB device drivers.
|
|
#
|
|
|
|
# Object files in subdirectories
|
|
|
|
obj-$(CONFIG_USB_COMMON) += common/
|
|
obj-$(CONFIG_USB) += core/
|
|
obj-$(CONFIG_USB_SUPPORT) += phy/
|
|
|
|
obj-$(CONFIG_USB_DWC3) += dwc3/
|
|
obj-$(CONFIG_USB_DWC2) += dwc2/
|
|
obj-$(CONFIG_USB_ISP1760) += isp1760/
|
|
|
|
obj-$(CONFIG_USB_CDNS_SUPPORT) += cdns3/
|
|
|
|
obj-$(CONFIG_USB_FOTG210) += fotg210/
|
|
|
|
obj-$(CONFIG_USB_MON) += mon/
|
|
obj-$(CONFIG_USB_MTU3) += mtu3/
|
|
|
|
obj-$(CONFIG_USB_PCI) += host/
|
|
obj-$(CONFIG_USB_EHCI_HCD) += host/
|
|
obj-$(CONFIG_USB_ISP116X_HCD) += host/
|
|
obj-$(CONFIG_USB_OHCI_HCD) += host/
|
|
obj-$(CONFIG_USB_UHCI_HCD) += host/
|
|
obj-$(CONFIG_USB_FHCI_HCD) += host/
|
|
obj-$(CONFIG_USB_XHCI_HCD) += host/
|
|
obj-$(CONFIG_USB_SL811_HCD) += host/
|
|
obj-$(CONFIG_USB_R8A66597_HCD) += host/
|
|
obj-$(CONFIG_USB_FSL_USB2) += host/
|
|
obj-$(CONFIG_USB_FOTG210_HCD) += host/
|
|
obj-$(CONFIG_USB_MAX3421_HCD) += host/
|
|
obj-$(CONFIG_USB_XEN_HCD) += host/
|
|
|
|
obj-$(CONFIG_USB_C67X00_HCD) += c67x00/
|
|
|
|
obj-$(CONFIG_USB_ACM) += class/
|
|
obj-$(CONFIG_USB_PRINTER) += class/
|
|
obj-$(CONFIG_USB_WDM) += class/
|
|
obj-$(CONFIG_USB_TMC) += class/
|
|
|
|
obj-$(CONFIG_USB_STORAGE) += storage/
|
|
obj-$(CONFIG_USB) += storage/
|
|
|
|
obj-$(CONFIG_USB_MDC800) += image/
|
|
obj-$(CONFIG_USB_MICROTEK) += image/
|
|
|
|
obj-$(CONFIG_USB_SERIAL) += serial/
|
|
|
|
obj-$(CONFIG_USB) += misc/
|
|
obj-$(CONFIG_EARLY_PRINTK_USB) += early/
|
|
|
|
obj-$(CONFIG_USB_ATM) += atm/
|
|
obj-$(CONFIG_USB_SPEEDTOUCH) += atm/
|
|
|
|
obj-$(CONFIG_USB_MUSB_HDRC) += musb/
|
|
obj-$(CONFIG_USB_CHIPIDEA) += chipidea/
|
|
obj-$(CONFIG_USB_RENESAS_USBHS) += renesas_usbhs/
|
|
obj-$(CONFIG_USB_GADGET) += gadget/
|
|
|
|
obj-$(CONFIG_USBIP_CORE) += usbip/
|
|
|
|
obj-$(CONFIG_TYPEC) += typec/
|
|
|
|
obj-$(CONFIG_USB_ROLE_SWITCH) += roles/
|