-
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.
yaml --- r: 264906 b: refs/heads/master c: 72246da h: refs/heads/master v: v3
- Loading branch information
Felipe Balbi
authored and
Greg Kroah-Hartman
committed
Aug 22, 2011
1 parent
7c463b7
commit 53deae4
Showing
17 changed files
with
5,713 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 500fdf8becb9c8d51970c7ac6a4fa308a5481ebe | ||
refs/heads/master: 72246da40f3719af3bfd104a2365b32537c27d83 |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
TODO | ||
~~~~~~ | ||
Please pick something while reading :) | ||
|
||
- Implement streaming support for BULK endpoints | ||
Tatyana's patch "usb: Add streams support to the gadget framework" | ||
introduces streaming support for the gadget driver. | ||
Every usb_request has new field called stream_id which holds its id. | ||
Every usb_ep has a field num_supported_strms which describes the max | ||
number of streams supported (for this ep). | ||
UAS is AFAIK the only gadget with streaming support. | ||
|
||
- Convert interrupt handler to per-ep-thread-irq | ||
|
||
As it turns out some DWC3-commands ~1ms to complete. Currently we spin | ||
until the command completes which is bad. | ||
|
||
Implementation idea: | ||
- dwc core implements a demultiplexing irq chip for interrupts per | ||
endpoint. The interrupt numbers are allocated during probe and belong | ||
to the device. If MSI provides per-endpoint interrupt this dummy | ||
interrupt chip can be replaced with "real" interrupts. | ||
- interrupts are requested / allocated on usb_ep_enable() and removed on | ||
usb_ep_disable(). Worst case are 32 interrupts, the lower limit is two | ||
for ep0/1. | ||
- dwc3_send_gadget_ep_cmd() will sleep in wait_for_completion_timeout() | ||
until the command completes. | ||
- the interrupt handler is split into the following pieces: | ||
- primary handler of the device | ||
goes through every event and calls generic_handle_irq() for event | ||
it. On return from generic_handle_irq() in acknowledges the event | ||
counter so interrupt goes away (eventually). | ||
|
||
- threaded handler of the device | ||
none | ||
|
||
- primary handler of the EP-interrupt | ||
reads the event and tries to process it. Everything that requries | ||
sleeping is handed over to the Thread. The event is saved in an | ||
per-endpoint data-structure. | ||
We probably have to pay attention not to process events once we | ||
handed something to thread so we don't process event X prio Y | ||
where X > Y. | ||
|
||
- threaded handler of the EP-interrupt | ||
handles the remaining EP work which might sleep such as waiting | ||
for command completion. | ||
|
||
Latency: | ||
There should be no increase in latency since the interrupt-thread has a | ||
high priority and will be run before an average task in user land | ||
(except the user changed priorities). |
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
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
config USB_DWC3 | ||
tristate "DesignWare USB3 DRD Core Support" | ||
depends on (USB || USB_GADGET) | ||
select USB_OTG_UTILS | ||
help | ||
Say Y or M here if your system has a Dual Role SuperSpeed | ||
USB controller based on the DesignWare USB3 IP Core. | ||
|
||
If you choose to build this driver is a dynamically linked | ||
module, the module will be called dwc3.ko. | ||
|
||
if USB_DWC3 | ||
|
||
config USB_DWC3_DEBUG | ||
bool "Enable Debugging Messages" | ||
help | ||
Say Y here to enable debugging messages on DWC3 Driver. | ||
|
||
config USB_DWC3_VERBOSE | ||
bool "Enable Verbose Debugging Messages" | ||
depends on USB_DWC3_DEBUG | ||
help | ||
Say Y here to enable verbose debugging messages on DWC3 Driver. | ||
|
||
endif |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
ccflags-$(CONFIG_USB_DWC3_DEBUG) := -DDEBUG | ||
ccflags-$(CONFIG_USB_DWC3_VERBOSE) += -DVERBOSE_DEBUG | ||
|
||
obj-$(CONFIG_USB_DWC3) += dwc3.o | ||
|
||
dwc3-y := core.o | ||
|
||
ifneq ($(CONFIG_USB_GADGET_DWC3),) | ||
dwc3-y += gadget.o ep0.o | ||
endif | ||
|
||
ifneq ($(CONFIG_DEBUG_FS),) | ||
dwc3-y += debugfs.o | ||
endif | ||
|
||
## | ||
# Platform-specific glue layers go here | ||
# | ||
# NOTICE: Make sure your glue layer doesn't depend on anything | ||
# which is arch-specific and that it compiles on all situations. | ||
# | ||
# We want to keep this requirement in order to be able to compile | ||
# the entire driver (with all its glue layers) on several architectures | ||
# and make sure it compiles fine. This will also help with allmodconfig | ||
# and allyesconfig builds. | ||
# | ||
# The only exception is the PCI glue layer, but that's only because | ||
# PCI doesn't provide nops if CONFIG_PCI isn't enabled. | ||
## | ||
|
||
obj-$(CONFIG_USB_DWC3) += dwc3-omap.o | ||
|
||
ifneq ($(CONFIG_PCI),) | ||
obj-$(CONFIG_USB_DWC3) += dwc3-pci.o | ||
endif | ||
|
Oops, something went wrong.