# SPDX-License-Identifier: GPL-2.0
#
# Makefile for USB Host Controller Drivers
#

# tell define_trace.h where to find the xhci trace header
CFLAGS_xhci-trace.o := -I$(srctree)/$(src)

ccflags-y += -I$(DEVICE_MODULES_PATH)/drivers/misc/mediatek/usb/usb_offload
ccflags-y := -I$(srctree)/drivers/usb/core/
ccflags-y += -I$(srctree)/drivers/base/power/
xhci-mtk-hcd-v2-y := xhci.o xhci-mem.o xhci-ext-caps.o
xhci-mtk-hcd-v2-y += xhci-ring.o xhci-hub.o xhci-dbg.o
xhci-mtk-hcd-v2-y += xhci-trace.o
xhci-mtk-hcd-v2-y += xhci-mtk.o xhci-mtk-sch.o

ifneq ($(CONFIG_DEVICE_MODULES_USB_MTK_HQA_TEST),)
	xhci-mtk-hcd-v2-y += xhci-mtk-test.o
	xhci-mtk-hcd-v2-y += xhci-mtk-unusual.o
	xhci-mtk-hcd-v2-y += xhci-mtk-intr-en.o
	xhci-mtk-hcd-v2-y += xhci-mtk-vrt-vref.o
	xhci-mtk-hcd-v2-y += xhci-mtk-term-vref.o
	xhci-mtk-hcd-v2-y += xhci-mtk-hstx-srctrl.o
	xhci-mtk-hcd-v2-y += xhci-mtk-discth.o
	xhci-mtk-hcd-v2-y += xhci-mtk-chgdt-en.o
	xhci-mtk-hcd-v2-y += xhci-mtk-reg.o
	xhci-mtk-hcd-v2-y += xhci-mtk-preemphasic.o
endif

ifneq ($(CONFIG_DEBUG_FS),)
	xhci-mtk-hcd-v2-y		+= xhci-debugfs.o
endif

obj-$(CONFIG_DEVICE_MODULES_USB_XHCI_MTK) += xhci-mtk-hcd-v2.o
