xref: /OK3568_Linux_fs/kernel/drivers/usb/dwc2/Makefile (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyunccflags-$(CONFIG_USB_DWC2_DEBUG)	+= -DDEBUG
3*4882a593Smuzhiyunccflags-$(CONFIG_USB_DWC2_VERBOSE)	+= -DVERBOSE_DEBUG
4*4882a593Smuzhiyun
5*4882a593Smuzhiyunobj-$(CONFIG_USB_DWC2)			+= dwc2.o
6*4882a593Smuzhiyundwc2-y					:= core.o core_intr.o platform.o drd.o
7*4882a593Smuzhiyundwc2-y					+= params.o
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunifneq ($(filter y,$(CONFIG_USB_DWC2_HOST) $(CONFIG_USB_DWC2_DUAL_ROLE)),)
10*4882a593Smuzhiyun	dwc2-y				+= hcd.o hcd_intr.o
11*4882a593Smuzhiyun	dwc2-y				+= hcd_queue.o hcd_ddma.o
12*4882a593Smuzhiyunendif
13*4882a593Smuzhiyun
14*4882a593Smuzhiyunifneq ($(filter y,$(CONFIG_USB_DWC2_PERIPHERAL) $(CONFIG_USB_DWC2_DUAL_ROLE)),)
15*4882a593Smuzhiyun	dwc2-y       			+= gadget.o
16*4882a593Smuzhiyunendif
17*4882a593Smuzhiyun
18*4882a593Smuzhiyunifneq ($(CONFIG_DEBUG_FS),)
19*4882a593Smuzhiyun	dwc2-y				+= debugfs.o
20*4882a593Smuzhiyunendif
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun# NOTE: The previous s3c-hsotg peripheral mode only driver has been moved to
23*4882a593Smuzhiyun# this location and renamed gadget.c. When building for dynamically linked
24*4882a593Smuzhiyun# modules, dwc2.ko will get built for host mode, peripheral mode, and dual-role
25*4882a593Smuzhiyun# mode. The PCI bus interface module will called dwc2_pci.ko and the platform
26*4882a593Smuzhiyun# interface module will be called dwc2_platform.ko.
27*4882a593Smuzhiyun
28*4882a593Smuzhiyunobj-$(CONFIG_USB_DWC2_PCI)		+= dwc2_pci.o
29*4882a593Smuzhiyundwc2_pci-y				:= pci.o
30