Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / drivers / usb / host / dwc_otg / Makefile
1 #
2 # Makefile for DWC_otg Highspeed USB controller driver
3 #
4
5 ifneq ($(KERNELRELEASE),)
6
7 # Use the BUS_INTERFACE variable to compile the software for either
8 # PCI(PCI_INTERFACE) or LM(LM_INTERFACE) bus.
9 ifeq ($(BUS_INTERFACE),)
10 #       BUS_INTERFACE = -DPCI_INTERFACE
11 #       BUS_INTERFACE = -DLM_INTERFACE
12         BUS_INTERFACE = -DPLATFORM_INTERFACE
13 endif
14
15 #ccflags-y      += -DDEBUG
16 #ccflags-y      += -DDWC_OTG_DEBUGLEV=1 # reduce common debug msgs
17
18 # Use one of the following flags to compile the software in host-only or
19 # device-only mode.
20 #ccflags-y        += -DDWC_HOST_ONLY
21 #ccflags-y        += -DDWC_DEVICE_ONLY
22
23 ccflags-y       += -Dlinux -DDWC_HS_ELECT_TST
24 #ccflags-y      += -DDWC_EN_ISOC
25 ccflags-y       += -I$(srctree)/drivers/usb/host/dwc_common_port
26 #ccflags-y      += -I$(PORTLIB)
27 ccflags-y       += -DDWC_LINUX
28 ccflags-y       += $(CFI)
29 ccflags-y       += $(BUS_INTERFACE)
30 #ccflags-y      += -DDWC_DEV_SRPCAP
31
32 obj-$(CONFIG_USB_DWCOTG) += dwc_otg.o
33
34 dwc_otg-objs    := dwc_otg_driver.o dwc_otg_attr.o
35 dwc_otg-objs    += dwc_otg_cil.o dwc_otg_cil_intr.o
36 dwc_otg-objs    += dwc_otg_pcd_linux.o dwc_otg_pcd.o dwc_otg_pcd_intr.o
37 dwc_otg-objs    += dwc_otg_hcd.o dwc_otg_hcd_linux.o dwc_otg_hcd_intr.o dwc_otg_hcd_queue.o dwc_otg_hcd_ddma.o
38 dwc_otg-objs    += dwc_otg_adp.o
39 dwc_otg-objs    += dwc_otg_fiq_fsm.o
40 ifneq ($(CONFIG_ARM64),y)
41 dwc_otg-objs    += dwc_otg_fiq_stub.o
42 endif
43
44 ifneq ($(CFI),)
45 dwc_otg-objs    += dwc_otg_cfi.o
46 endif
47
48 kernrelwd := $(subst ., ,$(KERNELRELEASE))
49 kernrel3 := $(word 1,$(kernrelwd)).$(word 2,$(kernrelwd)).$(word 3,$(kernrelwd))
50
51 ifneq ($(kernrel3),2.6.20)
52 ccflags-y += $(CPPFLAGS)
53 endif
54
55 else
56
57 PWD             := $(shell pwd)
58 PORTLIB         := $(PWD)/../dwc_common_port
59
60 # Command paths
61 CTAGS           := $(CTAGS)
62 DOXYGEN         := $(DOXYGEN)
63
64 default: portlib
65         $(MAKE) -C$(KDIR) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules
66
67 install: default
68         $(MAKE) -C$(KDIR) M=$(PORTLIB) modules_install
69         $(MAKE) -C$(KDIR) M=$(PWD) modules_install
70
71 portlib:
72         $(MAKE) -C$(KDIR) M=$(PORTLIB) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules
73         cp $(PORTLIB)/Module.symvers $(PWD)/
74
75 docs:   $(wildcard *.[hc]) doc/doxygen.cfg
76         $(DOXYGEN) doc/doxygen.cfg
77
78 tags:   $(wildcard *.[hc])
79         $(CTAGS) -e $(wildcard *.[hc]) $(wildcard linux/*.[hc]) $(wildcard $(KDIR)/include/linux/usb*.h)
80
81
82 clean:
83         rm -rf   *.o *.ko .*cmd *.mod.c .tmp_versions Module.symvers
84
85 endif