2 # Makefile for DWC_otg Highspeed USB controller driver
5 ifneq ($(KERNELRELEASE),)
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
16 #ccflags-y += -DDWC_OTG_DEBUGLEV=1 # reduce common debug msgs
18 # Use one of the following flags to compile the software in host-only or
20 #ccflags-y += -DDWC_HOST_ONLY
21 #ccflags-y += -DDWC_DEVICE_ONLY
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
29 ccflags-y += $(BUS_INTERFACE)
30 #ccflags-y += -DDWC_DEV_SRPCAP
32 obj-$(CONFIG_USB_DWCOTG) += dwc_otg.o
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
45 dwc_otg-objs += dwc_otg_cfi.o
48 kernrelwd := $(subst ., ,$(KERNELRELEASE))
49 kernrel3 := $(word 1,$(kernrelwd)).$(word 2,$(kernrelwd)).$(word 3,$(kernrelwd))
51 ifneq ($(kernrel3),2.6.20)
52 ccflags-y += $(CPPFLAGS)
58 PORTLIB := $(PWD)/../dwc_common_port
65 $(MAKE) -C$(KDIR) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules
68 $(MAKE) -C$(KDIR) M=$(PORTLIB) modules_install
69 $(MAKE) -C$(KDIR) M=$(PWD) modules_install
72 $(MAKE) -C$(KDIR) M=$(PORTLIB) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules
73 cp $(PORTLIB)/Module.symvers $(PWD)/
75 docs: $(wildcard *.[hc]) doc/doxygen.cfg
76 $(DOXYGEN) doc/doxygen.cfg
78 tags: $(wildcard *.[hc])
79 $(CTAGS) -e $(wildcard *.[hc]) $(wildcard linux/*.[hc]) $(wildcard $(KDIR)/include/linux/usb*.h)
83 rm -rf *.o *.ko .*cmd *.mod.c .tmp_versions Module.symvers