-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
usb: dwc2: Update Kconfig to support dual-role
Update DWC2 kconfig and makefile to support dual-role mode. The platform file will always get compiled for the case where the controller is directly connected to the CPU. So for loadable modules, dwc2.ko is built for host, peripheral, and dual-role mode. The PCI bus interface will be called dwc2_pci.ko and the platform interface module will be called dwc2_platform.ko. Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
- Loading branch information
Dinh Nguyen
authored and
Felipe Balbi
committed
Nov 14, 2014
1 parent
f5500ec
commit 5ee8070
Showing
2 changed files
with
55 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
ccflags-$(CONFIG_USB_DWC2_DEBUG) += -DDEBUG | ||
ccflags-$(CONFIG_USB_DWC2_VERBOSE) += -DVERBOSE_DEBUG | ||
|
||
obj-$(CONFIG_USB_DWC2_HOST) += dwc2.o | ||
obj-$(CONFIG_USB_DWC2) += dwc2.o | ||
dwc2-y := core.o core_intr.o | ||
dwc2-y += hcd.o hcd_intr.o | ||
dwc2-y += hcd_queue.o hcd_ddma.o | ||
|
||
ifneq ($(filter y,$(CONFIG_USB_DWC2_HOST) $(CONFIG_USB_DWC2_DUAL_ROLE)),) | ||
dwc2-y += hcd.o hcd_intr.o | ||
dwc2-y += hcd_queue.o hcd_ddma.o | ||
endif | ||
|
||
ifneq ($(filter y,$(CONFIG_USB_DWC2_PERIPHERAL) $(CONFIG_USB_DWC2_DUAL_ROLE)),) | ||
dwc2-y += gadget.o | ||
endif | ||
|
||
# NOTE: The previous s3c-hsotg peripheral mode only driver has been moved to | ||
# this location and renamed gadget.c. When building for dynamically linked | ||
# modules, dwc2_gadget.ko will get built for peripheral mode. For host mode, | ||
# the core module will be dwc2.ko, the PCI bus interface module will called | ||
# dwc2_pci.ko and the platform interface module will be called dwc2_platform.ko. | ||
# At present the host and gadget driver will be separate drivers, but there | ||
# are plans in the near future to create a dual-role driver. | ||
# modules, dwc2.ko will get built for host mode, peripheral mode, and dual-role | ||
# mode. The PCI bus interface module will called dwc2_pci.ko and the platform | ||
# interface module will be called dwc2_platform.ko. | ||
|
||
ifneq ($(CONFIG_USB_DWC2_PCI),) | ||
obj-$(CONFIG_USB_DWC2_HOST) += dwc2_pci.o | ||
obj-$(CONFIG_USB_DWC2) += dwc2_pci.o | ||
dwc2_pci-y := pci.o | ||
endif | ||
|
||
ifneq ($(CONFIG_USB_DWC2_PLATFORM),) | ||
obj-$(CONFIG_USB_DWC2_HOST) += dwc2_platform.o | ||
dwc2_platform-y := platform.o | ||
endif | ||
|
||
obj-$(CONFIG_USB_DWC2_PERIPHERAL) += dwc2_gadget.o | ||
dwc2_gadget-y := gadget.o | ||
obj-$(CONFIG_USB_DWC2_PLATFORM) += dwc2_platform.o | ||
dwc2_platform-y := platform.o |