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
$(obj
)/..
/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 dwc_otg-objs
+= dwc_otg_fiq_stub.o
42 dwc_otg-objs
+= dwc_otg_cfi.o
45 kernrelwd
:= $(subst .
, ,$(KERNELRELEASE
))
46 kernrel3
:= $(word 1,$(kernrelwd
)).
$(word 2,$(kernrelwd
)).
$(word 3,$(kernrelwd
))
48 ifneq ($(kernrel3
),2.6.20)
49 ccflags-y
+= $(CPPFLAGS
)
55 PORTLIB
:= $(PWD
)/..
/dwc_common_port
62 $(MAKE
) -C
$(KDIR
) M
=$(PWD
) ARCH
=$(ARCH
) CROSS_COMPILE
=$(CROSS_COMPILE
) modules
65 $(MAKE
) -C
$(KDIR
) M
=$(PORTLIB
) modules_install
66 $(MAKE
) -C
$(KDIR
) M
=$(PWD
) modules_install
69 $(MAKE
) -C
$(KDIR
) M
=$(PORTLIB
) ARCH
=$(ARCH
) CROSS_COMPILE
=$(CROSS_COMPILE
) modules
70 cp
$(PORTLIB
)/Module.symvers
$(PWD
)/
72 docs
: $(wildcard *.
[hc
]) doc
/doxygen.cfg
73 $(DOXYGEN
) doc
/doxygen.cfg
75 tags: $(wildcard *.
[hc
])
76 $(CTAGS
) -e
$(wildcard *.
[hc
]) $(wildcard linux
/*.
[hc
]) $(wildcard $(KDIR
)/include/linux
/usb
*.h
)
80 rm -rf
*.o
*.ko .
*cmd
*.mod.c .tmp_versions Module.symvers