Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
67 lines
1.6 KiB
Makefile
67 lines
1.6 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
ccflags-$(CONFIG_USB_MTU3_DEBUG) += -DDEBUG
|
|
|
|
ifneq ($(CONFIG_USB_MTU3_PLAT_PHONE),)
|
|
ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/
|
|
ccflags-y += -I$(srctree)/drivers/power/supply/mediatek/misc/
|
|
ccflags-y += -I$(srctree)/drivers/misc/mediatek/typec/tcpc/
|
|
ifeq ($(CONFIG_MACH_MT6877),y)
|
|
ccflags-y += -I$(srctree)/drivers/usb/mtu3/mt6877/
|
|
else
|
|
ccflags-y += -I$(srctree)/drivers/usb/mtu3/$(CONFIG_MTK_PLATFORM)/
|
|
endif
|
|
endif
|
|
|
|
ifneq ($(CONFIG_USB_MTU3_PLAT_PHONE),)
|
|
|
|
ifeq ($(CONFIG_MACH_MT6877),y)
|
|
obj-y += $(subst ",,mt6877)/
|
|
else
|
|
obj-y += $(subst ",,$(CONFIG_MTK_PLATFORM))/
|
|
endif
|
|
obj-y += mtu3_debugfs_v2.o
|
|
|
|
obj-$(CONFIG_USB_MTU3) += musb_hdrc.o
|
|
|
|
musb_hdrc-y := mtu3_plat_v2.o
|
|
|
|
ifneq ($(filter y,$(CONFIG_USB_MTU3_HOST) $(CONFIG_USB_MTU3_DUAL_ROLE)),)
|
|
musb_hdrc-y += mtu3_host_v2.o
|
|
endif
|
|
|
|
ifneq ($(filter y,$(CONFIG_USB_MTU3_GADGET) $(CONFIG_USB_MTU3_DUAL_ROLE)),)
|
|
musb_hdrc-y += mtu3_core.o mtu3_gadget_ep0.o mtu3_gadget.o mtu3_qmu.o
|
|
endif
|
|
|
|
ifneq ($(CONFIG_USB_MTU3_DUAL_ROLE),)
|
|
musb_hdrc-y += mtu3_dr_v2.o
|
|
endif
|
|
|
|
else
|
|
|
|
subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat
|
|
|
|
ifneq ($(filter y,$(CONFIG_MACH_MT8168)),)
|
|
subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/base/power/mt8168/
|
|
endif
|
|
|
|
|
|
obj-$(CONFIG_USB_MTU3) += mtu3.o
|
|
|
|
mtu3-y := mtu3_plat.o
|
|
|
|
ifneq ($(filter y,$(CONFIG_USB_MTU3_HOST) $(CONFIG_USB_MTU3_DUAL_ROLE)),)
|
|
mtu3-y += mtu3_host.o
|
|
endif
|
|
|
|
ifneq ($(filter y,$(CONFIG_USB_MTU3_GADGET) $(CONFIG_USB_MTU3_DUAL_ROLE)),)
|
|
mtu3-y += mtu3_core.o mtu3_gadget_ep0.o mtu3_gadget.o mtu3_qmu.o
|
|
endif
|
|
|
|
ifneq ($(CONFIG_USB_MTU3_DUAL_ROLE),)
|
|
mtu3-y += mtu3_dr.o
|
|
endif
|
|
|
|
endif
|