Introduce DesignWare USB3 Driver
Subsystems (4)
cover Introduce DesignWare USB3 Driver
Hi,
the following patches introduce the DesignWare USB3 Driver.
This controller will be used on the OMAP5 series of processors and this is the first contribution to Linux Kernel from OMAP5 program.
The driver is rather stable, but we have few issues on the FPGA platform that we're using. It's very complex platform and very timing and temperature-sensitive.
Thanks for Synopsys for all the help debugging many issues with the HAPS platform (a valuable effort).
We will keep on adding new features to this driver as the development goes, but as of now, it should behave OK with Mass Storage and g_zero at least on FS/HS and SS.
Keep in mind that this was only tested on FPGA (HAPS-61) and a virtual model of the HW and we might have to fix a few things up when we get a real ASIC to test against.
Greg,
I will send you a pull request for this, if you prefer, on monday, but I would suggest giving this a few days or soaking in the mailing list so that other companies which might be using this same IP have time to give it a shot. Maybe Synopsys might also be willing to help testing on HAPS-51 platform, but I'm speculating here ;-)
The original shortlog of the driver is quoted below for reference:
Felipe Balbi (334):
usb: Introduce DesignWare USB3 DRD Driver
usb: dwc3: move structures to core.h
usb: dwc3: split gadget functions to gadget.c
usb: dwc3: more __devinit annotations
usb: dwc3: fix event buffer memleak
usb: dwc3: add the basic OMAP glue
usb: dwc3: start implement IRQ handling
usb: dwc3: gadget: implement depcfg command
usb: dwc3: add a few more parameters
usb: dwc3: gadget: fix parameter setting of DEPXFERCFG
usb: gadget: introduce gadget_is_dwc3()
usb: dwc3: gadget: half initialization of endpoints
usb: dwc: gadget: split more of the generic stuff
usb: dwc: gadget: add more nops
usb: dwc3: add structures for all events
usb: dwc3: implement disconnect IRQ
usb: dwc3: handle in and out ep irq separately
usb: dwc3: partially implemented reset irq
usb: dwc3: drop OTG events
usb: dwc: half done IN ep IRQ
usb: dwc3: increase event buffer size
usb: dwc3: omap: we're parents of core dwc3 device
usb: dwc: gadget: add missing static
usb: dwc: gadget: implement queue()/dequeue()
usb: dwc: gadget: substitute dwc_ with dwc3_
usb: dwc: gadget: add usb_gadget_ops
usb: dwc: gadget: implement pullup()
usb: dwc3: implement get_frame()
usb: dwc3: implement set_selfpowered()
usb: dwc3: hold pointers to eps in dwc structure
usb: dwc3: introduce struct dwc3_trb
usb: dwc3: gadget: minimal driver load/unload
usb: dwc3: gadget: drop ioctl
usb: dwc3: gadget: implement map/unmap buffer
usb: dwc3: gadget: setup TRB
usb: dwc3: use the define
usb: dwc3: gadget: combine endpoint ops
usb: dwc3: gadget: implement fifo_flush
usb: dwc3: gadget: flush all fifos on gadget init
usb: dwc3: gadget: variable names are better uniform
usb: dwc3: gadget: add missing line break
usb: dwc3: move irq handling to gadget.c
usb: dwc3: gadget: drop carkit and i2c events
usb: dwc3: gadget: add debugging to EP irq
usb: dwc3: gadget: split event handlers to their own functions
usb: dwc3: add ep0_state
usb: dwc3: gadget: add debugging
usb: dwc3: gagdget: implement connect done IRQ
usb: dwc3: gadget: implement link state change
usb: dwc3: gadget: add a bit of spacing
usb: dwc3: gadget: lock when clearing gadget and gadget_driver
usb: dwc3: gadget: fix checkpatch.pl warnings
usb: dwc3: headers: search and replace patch
usb: dwc3: omap: mark dev_pm_ops const
usb: dwc3: gadget.h: fix 80+ character lines
usb: dwc3: add a dma_pool for TRBs for each endpoint
usb: dwc3: gadget: create/destroy trb_pool based on ep enable/disable
usb: dwc3: gadget: unfinished TRB allocation
usb: dwc3: gadget: switch over to an array
usb: dwc3: gadget: use & instead of %
usb: dwc3: gadget: add a debugging print
usb: dwc3: add missing kernel-doc
usb: dwc3: gadget: all struct dwc3_ep to be called dep
usb: dwc3: gadget: brain-less cleanups
usb: dwc3: gadget: drop a useless goto
usb: dwc3: gadget: use res_trans_idx
usb: dwc3: gadget: use is_chained flag
usb: dwc3: gadget: add ep_ to the function name
usb: dwc3: gadget: make __dwc3_gadget_ep_queue return a value
usb: dwc3: gadget: free the TRB if queueing fails
usb: dwc3: gadget: get rid of magic constants
usb: dwc3: gadget: move some code around
usb: dwc3: gadget: don't overwrite trbctl
usb: dwc3: gadget: combine two cases
usb: dwc3: gadget: only interrupt on last TRB
usb: dwc3: gadget: introduce dwc3_gadget_ep_get_transfer_index
usb: dwc3: gadget: implement dwc3_gadget_init_endpoint
usb: dwc3: gadget: cut down on duplication
usb: dwc3: gadget: implement dwc3_disable_endpoint()
usb: dwc3: gadget: disable all eps on exit
usb: dwc3: gadget: return early on two cases
usb: dwc3: gadget: implement dwc3_gadget_ep_set_halt
usb: dwc3: gadget: implement dwc3_gadget_ep_set_wedge
usb: dwc3: gadget: drop dwc3_gadget_fifo_status
usb: dwc3: gadget: add blank lines
usb: dwc3: gadget: implement wakeup method
usb: dwc3: core: make suspend and resume return something
usb: dwc3: core: move us to fs_initcall()
usb: dwc3: remove event_ prefix from two fields
usb: dwc3: gadget: introduce next_request()
usb: dwc3: gadget: implement transfer complete IRQ
usb: dwc3: gadget: add request_count
usb: dwc3: gadget: start next request if we have it queued
usb: dwc3: gadget: introduce list_add/list_del helpers
usb: dwc3: gadget: fix compile error
usb: dwc3: shift has to be defined first
usb: dwc3: gadget: combine IN and OUT ep IRQs
usb: dwc3: add enumeration for TRB Statuses
usb: dwc3: gadget: XFERINPROG and XFERNRDY are Isoc-only
usb: dwc3: gadget: use EP CMD Complete IRQ
usb: dwc3: introduce HAPS glue layer
usb: dwc3: glue layers need to probe before core dwc3
usb: dwc3: add resources to dwc3 device
usb: dwc3: gadget: increment after check
usb: dwc3: gadget: return IRQ_HANDLED
Revert "usb: dwc3: gadget: use EP CMD Complete IRQ"
usb: dwc3: gadget: add dwc3_ prefix to prepare_trbs
usb: dwc3: gadget: drop unneeded gadget ops
usb: dwc3: haps: few fixes to haps glue
usb: dwc3: keep it all on module_init
usb: dwc3: gadget: set CSP bit in TRB
usb: dwc3: gadget: use max packet size from ep descriptor
usb: dwc3: gadget: set binterval_m1 field
usb: dwc3: haps: checkpatch.pl asks to use DEFINE_PCI_DEVICE_TABLE
usb: dwc3: gadget: misc cleanups
usb: dwc3: gadget: add missing register write
usb: dwc3: gadget: fix typo DCW -> DWC
usb: dwc3: fix up copyright
device: add dev_WARN_ONCE
usb: dwc3: gadget: convert WARN_ONCE() to dev_WARN_ONCE()
usb: dwc3: gadget: Search&Replace dwc_ dwc3_
usb: dwc3: gadget: drop useless check for ep type
usb: dwc3: gadget: make internal function name uniform
usb: gadget: add USB_GADGET_SUPERSPEED
usb: dwc3: gadget: compile gadget code only if enabled
usb: dwc3: Kconfig: drop "Disable DMA" entry
usb: dwc3: omap: fix exit section annotation
usb: dwc3: drop unnused enumeration
usb: dwc3: fix typo
usb: dwc3: gadget: give ep0 a wMaxPacketSize
usb: dwc3: make our driver Dual BSD/GPL
usb: dwc3: fix license on OMAP and HAPS glue layers
usb: dwc3: core: drop ramN memory bases
usb: dwc3: ep0: remove unneeded return statement
usb: dwc: core: ioremap global space first
usb: dwc3: gadget: fix typo in debugging message
usb: dwc3: gadget: introduce next_queued_request()
usb: dwc3: gadget: convert to next_queued_request()
usb: dwc3: gadget: pass the list_head instead of endpoint
usb: dwc3: gadget: WARN() on double allocation of TRB pool
usb: dwc3: gadget: add lock around __dwc3_gadget_ep_disable()
usb: dwc3: gagdget: fix typo s/requeust/request/
usb: dwc3: gadget: update ep names with xfer type
Revert "usb: dwc3: gadget: WARN() on double allocation of TRB pool"
usb: dwc3: introduce platform_data.h
usb: dwc3: update to use new platform_data
usb: dwc3: gadget: drop unused argument
usb: dwc3: gadget: handle Transfer In Progress
Revert "usb: dwc3: update to use new platform_data" Revert "usb: dwc3: introduce platform_data.h"
usb: dwc3: convert to only one base
usb: dwc3: add features bit definitions
usb: dwc3: use platform_device_id
usb: dwc3: adapt to new platform_device_id
usb: gadget: chips: fix dwc3 recognition
usb: dwc3: core: use pm_runtime_get_sync()
usb: always enter USB directory
usb: dwc3: Kconfig: depend on USB or USB_GADGET
usb: dwc3: haps: remove unused code
usb: dwc3: core: mark platform_device_id __devinitconst Revert "usb: always enter USB directory"
usb: don't enter usb subdirectories directly
usb: dwc3: core: fix up the reset loop
usb: gadget: chips: fixup our name
usb: dwc3: use platform_get_resource_byname
usb: dwc3: gadget: enable correct IRQs
usb: dwc3: drop BIT(13) of DEVTEN
usb: dwc3: gadget: add IRQF_SHARED
usb: dwc3: core: get IRQ by name
usb: dwc3: io: include <asm/io.h>
usb: dwc3: introduce omap glue layer
usb: dwc3: omap: don't try to reinitilize the device
usb: dwc3: omap: drop pm_runtime from the glue layer
usb: dwc3: omap: request IRQ lines before enabling the events
usb: dwc3: fix up Makefile so we always build correctly
usb: dwc3: fix offset of DEPCMD registers
usb: dwc3: gadget: only set binternal_m1 if we have to
usb: dwc3: gadget: we need to enable ep0/1 on POR
usb: dwc3: core: save size of address space in our struct
usb: dwc3: introduce simple debugfs interface
usb: dwc3: haps: don't reinitialize pdev, HAPS remix
usb: dwc3: haps: we need to pass IRQ to core driver too
usb: dwc3: gadget: add verbose print when sending commands
usb: dwc3: gadget: pass ignore_sequence_number as paramter
usb: dwc3: gadget: fix up connection done IRQ
usb: dwc3: gadget: move TRB allocation one layer up
usb: dwc3: allow verbose debug to be selected
usb: dwc3: gadget: fix up wMaxPacketSize on conndone IRQ
usb: dwc3: gadget: move disabled check one layer up
usb: dwc3: gadget: we should write back BYTE count
usb: dwc3: gadget: don't reenable eps on reset IRQ
usb: dwc3: gadget: no need for two defines
usb: dwc3: gadget: don't drop run/stop on disconnect
usb: dwc3: fix typo 'ponts'
usb: dwc3: drop extra semicolon
usb: dwc3: gadget: kill one compile warning
usb: dwc3: gadget: alloc from coherent instead
usb: dwc3: ep0: reference code uses ISP bit
usb: dwc3: gadget: don't hardcode endpoint number to 1
usb: dwc3: gadget: usb & instead of %
usb: dwc3: gadget: issue start transfer after run/stop
usb: dwc3: gadget: don't dereference null pointer
usb: dwc3: ep0: pretty print ep0state
usb: dwc3: ep0: add missing break
usb: dwc3: ep0: drop few warnings
usb: dwc3: ep0: add a few debugging prints
usb: dwc3: ep0: only call complete() if queue isn't empty
usb: dwc3: ep0: inspect the setup packet always
usb: dwc3: ep0: fix compile error
usb: dwc3: ep0: don't queue always to ep0
usb: dwc3: gadget: call device register
usb: dwc3: more debugging info
usb: dwc3: ep0: use next_request()
usb: dwc3: gadget: patch gadget speed
usb: dwc3: ep0: do setup_status phase
usb: dwc3: gadget: pass descriptor to alloc_trb
usb: dwc3: gadget: fix endpoint mapping
usb: dwc3: gadget: only enable xfer_in_progress for isoc
usb: dwc3: gadget: we only need bInterval on SS
usb: dwc3: core: define macro for command status
usb: dwc3: gadget: pretty print for events
usb: dwc3: ep0: print physical endpoint name instead
usb: dwc3: gadget: fix up endpoint name
usb: dwc3: gadget: follow reference code
usb: dwc3: gadget: only call disconnect if we're working
usb: gadget: ep0: move xfernotready closer to its sibling
usb: dwc3: ep0: simplify debugging and handler
usb: dwc3: core: fix a register name
usb: dwc3: debugfs: improve regdump utility
usb: dwc3: omap: move platform_set_drvdata up
usb: dwc3: gadget: move req->queued to move_request_queued
usb: dwc3: gadget: stop transfers before disconnect
usb: dwc3: ep0: call giveback instead of reimplementing it
usb: dwc3: ep0: we only support one request on control ep
usb: dwc3: gadget: no need to command completion IRQ
usb: dwc3: gadget: nuke all requests on disconnect
usb: dwc3: ep0: simply ep0 handlers
usb: dwc3: gadget: decrease verbosity to dev_dbg
usb: dwc3: ep0: fix a compile warning
usb: dwc3: ep0: don't handle setup on xfernotready
usb: dwc3: gadget: disconnect when removing gadget driver
usb: dwc3: gadget: unregister gadget device
usb: dwc3: ep0: don't access list_head without locks
usb: dwc3: ep0: fix for ep0_do_setup_status
usb: dwc3: gadget: no need for XferNotReady for Bulk
usb: dwc3: gadget: don't stop transfers on control pipe
usb: dwc3: gadget: a little re-organization
usb: dwc3: gadget: don't rely on request_count
usb: dwc3: gadget: pass the entire event to handler
usb: dwc3: gadget: add more consts
usb: dwc3: haps: rename to pci
usb: dwc3: fix DAVADDR typo
usb: dwc3: ep0: prevent a possible buffer overflow
usb: dwc3: gadget: ep0 packet size in SS is 512
usb: dwc3: gadget: increase maxpacket size of all non-0 eps
usb: dwc3: gadget: add missing break
usb: dwc3: gadget: disable the uneeded PHY
usb: dwc3: gadget: use correct FIFO numbers
usb: dwc3: gadget: enable XferNotReady for all endpoints
usb: dwc3: gadget: always set bInterval
usb: dwc3: gadget: check correct list
usb: dwc3: gadget: check if request is valid
usb: dwc3: add DWC3_EP_BUSY flag
usb: dwc3: gadget: ep0/ep1 need direction too
usb: dwc3: gadget: use XferNotReady IRQ
usb: dwc3: gadget: control endpoints don't need XferInProgress
usb: dwc3: gadget: print ep name when sending ep cmd
usb: dwc3: gadget: verbose debug print for each IRQ
usb: dwc3: pci: fix pci_set_drvdata() call
usb: dwc3: gadget: add DWC3_EP_PENDING_REQUEST flag
usb: dwc3: pci: add a name to the driver
usb: dwc3: pci: use pci_resource_end()
usb: dwc3: core: calculate timeout correctly
usb: dwc3: core: request the memory region
usb: dwc3: omap: set dma_mask and dma_parms
usb: dwc3: pci: set coherent_dma_mask
usb: dwc3: gadget: introduce helpers for powering PHYs
usb: dwc3: ep0: set address on correct register
usb: dwc3: gadget: reset USB PHYs during init
usb: dwc3: gadget: don't overwrite DCFG
usb: dwc3: core: allow for memory over 4GiB
usb: dwc3: ep0: allow for memory over 4GiB
usb: dwc3: gadget: no need to restart ep0 out
usb: dwc3: gadget: put PHY in reset when powered down
usb: dwc3: search and replace
usb: dwc3: gadget: only set run/stop bit as the last step
usb: dwc3: gadget: fix Kconfig entry
usb: dwc3: gadget: move to threaded IRQ
usb: dwc3: core: fix compile warning
usb: dwc3: gadget: set correct port mode
usb: dwc3: gadget: don't keep PHY in SoftRst
usb: dwc3: gadget: wait a bit after SoftRst too
usb: dwc3: gadget: fix compilation as module
usb: dwc3: gadget: fix usb ep enable sequence
usb: dwc3: gadget: drop ignore argument
usb: dwc3: gadget: fix wrong logic
usb: dwc3: ep0: fix device address setting
usb: dwc3: gadget: reset PHYs on disconnect
usb: dwc3: ep0: in case of error, tell gadget driver
usb: dwc3: gadget: apply SuperSpeed connect/disconnect workaround
usb: dwc3: gadget: move start/stop up in the source file
usb: dwc3: gadget: move to udc_start/udc_stop
usb: dwc3: gadget: move more code to udc_start/stop
usb: dwc3: gadget: fix up ep0->maxpacket
usb: dwc3: fix up a typo on our license header
usb: dwc3: gadget: do not kick transfers on complete
usb: dwc3: gadget: fix compile warning
usb: dwc3: gadget: move trb_pool allocation earlier
usb: dwc3: gadget: allocate trb_pool from coherent
usb: dwc3: gadget: set all dma parameters correctly
usb: dwc3: core: use SIMPLE_DEV_PM_OPS
usb: dwc3: omap: use memcpy_to/fromio()
usb: dwc3: omap: use UNIVERSAL_DEV_PM_OPS
usb: dwc3: Makefile: allow omap glue to build on all omaps
usb: dwc3: gadget: fix debug print
usb: dwc3: gadget: add a few more debugging prints
usb: dwc3: gadget: set LST bit on all TRBs for now
usb: dwc3: core: drop dev_pm_ops
usb: dwc3: core: move pm_runtime init to a saner location
usb: dwc3: omap: dynamically allocate context space
usb: dwc3: Makefile: always allow dwc3-omap to build
MAINTAINERS: add a maintainer for this driver
usb: dwc3: core: this can't be const
usb: dwc3: omap: remove __read_mostly
usb: dwc3: gadget: fix inverted logic
usb: dwc3: move PHY reset to core.c
usb: dwc3: core: put core in reset while resetting PHYs
usb: dwc3: move device reset to gadget.c
usb: dwc3: core: print DMA address as hex
usb: dwc3: core: group core soft reset into one function
usb: dwc3: move device soft reset before event buffer setup
usb: dwc3: core: fix bad resource usage
usb: dwc3: pci: allow multiple PCIe cards on one PC
usb: dwc3: core: fix comment
Sebastian Andrzej Siewior (157):
usb: dwc3: use platform_device_unregister()
usb: dwc3: add a comment about the error case / use list iterator
usb: dwc3: add missing break to dwc3_interrupt
usb: dwc3: fix id detection
usb: dwc3: add type for identify the event buffer type
usb: dwc3: fixup event buffer definition
usb: dwc3: reorganize event buffer handling
usb: dwc3: make use of an if block instead of multiple depends
usb: dwc3: handle error case in dwc3_gadget_init_endpoints()
usb: dwc3: remove list head init
usb: dwc3: add dwc3_gadget_free_endpoints
usb: dwc3: add core deinit function
usb: dwc3: gagdet: fix dev vs device
usb: dwc3: again, use io instead of this
usb: dwc3: save epnum in ep
usb: dwc3: check for DevCtrlHl after touching START/STOP bit
usb: dwc3: rename pullup dwc3_gadget_run_stop()
usb: dwc3: add disconnect interrupt handling
usb: dwc3: split dwc3_gadget_disconnect_interrupt()
usb: dwc3: go through dwc3_gadget_reset_interrupt()
usb: dwc3: partly revert "save epnum in ep"
usb: dwc3: enlarge interrupt_number in dwc3_gadget_ep_depcfg_param1
usb: dwc3: enlarge reserved16_14 in dwc3_gadget_ep_depcfg_param0
usb: dwc3: go through connect done
usb: dwc3: update dwc3_gadget_linksts_change_interrupt
usb: dwc3: remove init list head in dwc3_gadget_ep_alloc_request()
usb: dwc3: don't list_del on dwc3_gadget_ep_free_request()
usb: dwc3: map dma later
usb: dwc3: init request's dma address
usb: dwc3: save the trb belonging to an request
usb: dwc3: fix maybe not initialized value
usb: dwc3: fix buffer address
usb: dwc3: poll for command complete on the correct endpoint
usb: dwc3: simple tx transfer of non ep0
usb: dwc3: dwc3_gadget_conndone_interrupt() send msg to correct endpoint
usb: dwc3: remove double assignment of bpl and length
usb: dwc3: recognize ep0 correctly
usb: dwc3: add an usb control request
usb: dwc3: fix trb address
usb: dwc3: add first setup phase for ep0
usb: dwc3: prepare dwc3_ep0_start_dataphase() for split
usb: dwc3: use dma_map() for the trb.
usb: dwc3: split dwc3_ep0_start_trans() into dwc3_ep0_start_dataphase()
usb: dwc3: add more ep0 bits
usb: dwc3: remove dead block
usb: dwc3: remove assignment of isp_imi
usb: dwc3: move ep0 related functions into a separate file
usb: dwc3: move DWC3_DEPCMD_SETTRANSFRESOURCE to dwc3_init_endpoint()
usb: dwc3: don't init ep0/1 in gadget_init()
usb: dwc3: add missing EP0_IN_WAIT_GADGET bits
usb: dwc3: fix "is singular" assumption
usb: dwc3: use delayed TRB allocations
usb: dwc3: remove one level of indention
usb: dwc3: remove __dwc3_gadget_kick_transfers()
usb: dwc3: remove arguments from __dwc3_gadget_kick_transfer()
usb: dwc3: clear TRB before usage
usb: dwc3: fix the length argument in dwc3_endpoint_transfer_complete()
usb: dwc3: don't enqueue new requsts unless it is the last one
usb: dwc3: unmap the TRB earlier on completion
usb: dwc3: remove irqreturn_t from most functions
usb: dwc3: start ISOC transfers on XferNotReady event
usb: dwc3: convert the current TRB queue design into a ring buffer
usb: dwc3: make a lock less version of dwc3_gadget_ep_set_halt()
usb: dwc3: go to EP0_OUT_WAIT_NRDY on XferNotReady event in EP0_OUT_WAIT_GADGET state
usb: dwc3: stall and restart setup TRB in error case
usb: dwc3: remove extra argument in dwc3_ep0_out_start()
usb: dwc3: handle missing states in dwc3_ep0_start_trans()
usb: dwc3: don't error out on EP0_*_WAIT_GADGET
usb: dwc3: use usb_request directly dwc3_ep0_complete_data()
usb: dwc3: start handling standard usb requests
usb: dwc3: fixup Kconfig madness
usb: dwc3: fix set addr to zero in dwc3_gadget_reset_interrupt()
usb: dwc3: handle USB_REQ_SET_ADDRESS
usb: dwc3: execute DWC3_DEPCMD_SETTRANSFRESOURCE for the correct EP
usb: dwc3: handle USB_REQ_SET_CONFIGURATION
usb: dwc3: let the gadgt driver handle requests by default
usb: ch9: add function defines from ch9, USB 3.0 spec
usb: dwc3: handle USB_REQ_CLEAR_FEATURE
usb: dwc3: handle USB_REQ_SET_FEATURE
usb: dwc3: merge dwc3_ep0_clear_feature() and dwc3_ep0_set_feature()
usb: dwc3: remove WARN_ON() in XFERNOTREADY
usb: dwc3: fixup typo
usb: dwc3: prepare for ISOC updates
usb: dwc3: toggle the HWO in dwc3_prepare_trbs() once the TRB is complete
usb: dwc3: initialize request_list
usb: dwc3: don't remove ep1 from the EP1 list
usb: dwc3: move queued requests onto a seperate list
usb: dwc3: allow to queue ISOC while ISOC are scheduled
usb: dwc3: don't schedule ISOC if we don't have any requests
usb: dwc3: add myself as the Co-Author
usb: dwc3: support for 64bit addr_t
usb: dwc3: generated IOC for ISOC more frequently
usb: dwc3: link the ISOC TRBs
usb: dwc3: fixup IOC/LST/CHN logic on ISOC
usb: dwc3: return -EBUSY if the request is handled
dwc: usb3: make __dwc3_gadget_kick_transfer() consider the correct list
usb: dwc3: add 64bit support for TRBs
arm: omap: use hwmod to create a dwc3 device
usb: dwc3: remove driver name from haps
usb: dwc3: fixup bitfield definitions
usb: dwc3: remove CHN bit
usb: dwc3: add a missing ;
usb: dwc3: initialize dwc in dwc3_gadget_ep_disable()
usb: dwc3: make the TRB structure endian safe
usb: dwc3: invert wait logic in dwc3_send_gadget_ep_cmd()
usb: dwc3: don't look at jiffies in dwc3_send_gadget_ep_cmd()
usb: dwc3: use usb_endpoint_type() where possible
usb: dwc3: remove locking from atomic context
usb: dwc3: remove jiffies assumption in dwc3_gadget_run_stop()
usb: dwc3: no need for irqsave() in dwc3_interrupt()
usb: dwc3: don't flush the fifo on init
usb: dwc3: nuke dwc3_gadget_ep_fifo_flush()
usb: dwc3: gadget: send DEPCMD_SETEPCONFIG/DEPCMD_DEPSTARTCFG correctly
usb: dwc3: fix DWC3_DALEPENA_EPIN() macro
usb: dwc3: DWC3_DALEPENA_EP() is always used for both directions
usb: dwc3: don't queue req for ep0/1 if something is going on
usb: dwc3: simplify dwc3_prepare_trbs() by removing access request_count
usb: dwc3: remove remaining request_count users request_count users
usb: dwc3: add small todo list
usb: dwc3: gadget: use computed value instead
usb: dwc3: gadget: also disable IRQs on error path
usb: dwc3: gadget: move put_device before goto label in err path
uwb: dwc3: gadget: convert dwc3 to new udc class
usb: dwc3: gadget: remove __devexit from exit path (dwc3_gadget_exit)
usb: dwc3: gadget: fix starting one EP more than once
usb: dwc3: gadget: don't treat -EBUSY on TRANSFER_NOT_READY
usb: dwc3: omap: recognize the error on getting irq properly
usb: dwc3: gadget: fix maxpacket size for SS
usb: dwc3: gadget: fix multi TRB handling
usb: dwc3: gadget: don't set IOC bit
usb: dwc3: fix XferResourceIndex mask
usb: dwc3: gadget: don't sleep in interrupt
usb: dwc3: gadget: remove isp_imi for non ISO
usb: dwc3: gadget: add TEST_MODE
usb: dwc3: gadget: use proper endian accessor for wMaxPacketSize
usb: dwc3: gadget: use the length of the name array
usb: dwc3: gadget: handle short-packets-OUT transfers
usb: dwc3: gadget: use GFP_ATOMIC in ep_enable
usb: dwc3: gadget: don't queue transfers if we got interrupt on a short packet
usb: dwc3: gadget: handle more cases in the clean up routine
usb: dwc3: gadget: ep0: use wIndex and initialize it
usb: dwc3: gadget: fixup merge conflict for "proper endian accessor for wMaxPacketSize"
usb: dwc3: gadget: fix usb enpoint numbering
usb: dwc3: add test mode support
usb: dwc3: gadget: remove DWC3_EP_ISOC_RUNNING
usb: dwc3: gadget: issue UPDATE transfer command XferInprogress
usb: dwc3: use numbers instead of name for platform_resources
usb: dwc3: omap: add DT probing
usb: dwc3: gadget: split dwc3_stop_active_transfers() into two functions
usb: dwc3: gadget: only stop a transfer if there is an active one
usb: dwc3: gadget: use dwc3_stop_active_transfer() in ep disable
usb: dwc3: gadget: handle the ISO clean up
usb: dwc3: gadget: prepare to retrieve res_trans_idx via CmdComplete event
usb: dwc3: gadget: split TRB cleanup/complete into two pieces
usb: dwc3: gadget: make the pre-mature dequeue of requests possible
usb: dwc3: gadget: fix ISOC reload
usb: dwc3: gadget: fix NULL pointer dereference in __dwc3_gadget_kick_transfer()
Felipe Balbi (3):
usb: gadget: introduce gadget_is_dwc3()
usb: Introduce DesignWare USB3 DRD Driver
MAINTAINERS: add a maintainer for DesignWare USB3 driver
Sebastian Andrzej Siewior (1):
usb: ch9: add function defines from ch9, USB 3.0 spec
Documentation/usb/dwc3.txt | 53 + MAINTAINERS | 8 + drivers/usb/Kconfig | 2 + drivers/usb/Makefile | 2 + drivers/usb/dwc3/Kconfig | 25 + drivers/usb/dwc3/Makefile | 36 + drivers/usb/dwc3/core.c | 467 +++++++++ drivers/usb/dwc3/core.h | 709 +++++++++++++ drivers/usb/dwc3/debug.h | 51 + drivers/usb/dwc3/debugfs.c | 534 ++++++++++ drivers/usb/dwc3/dwc3-omap.c | 410 ++++++++ drivers/usb/dwc3/dwc3-pci.c | 219 ++++ drivers/usb/dwc3/ep0.c | 782 ++++++++++++++ drivers/usb/dwc3/gadget.c | 2063 +++++++++++++++++++++++++++++++++++++ drivers/usb/dwc3/gadget.h | 292 ++++++ drivers/usb/dwc3/io.h | 55 + drivers/usb/gadget/Kconfig | 12 + drivers/usb/gadget/gadget_chips.h | 3 + include/linux/usb/ch9.h | 5 + 19 files changed, 5728 insertions(+), 0 deletions(-) create mode 100644 Documentation/usb/dwc3.txt create mode 100644 drivers/usb/dwc3/Kconfig create mode 100644 drivers/usb/dwc3/Makefile create mode 100644 drivers/usb/dwc3/core.c create mode 100644 drivers/usb/dwc3/core.h create mode 100644 drivers/usb/dwc3/debug.h create mode 100644 drivers/usb/dwc3/debugfs.c create mode 100644 drivers/usb/dwc3/dwc3-omap.c create mode 100644 drivers/usb/dwc3/dwc3-pci.c create mode 100644 drivers/usb/dwc3/ep0.c create mode 100644 drivers/usb/dwc3/gadget.c create mode 100644 drivers/usb/dwc3/gadget.h create mode 100644 drivers/usb/dwc3/io.h
Signature · 1 line
1.7.6.396.ge0613
A message that is not in the archive (sent off-list or not yet received): 1313766659-28360-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org
PATCH 2/4 usb: gadget: introduce gadget_is_dwc3()
... to check whether we're running on DesignWare
USB3 DRD Controller.
--- drivers/usb/gadget/gadget_chips.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/usb/gadget/gadget_chips.h +3 -0
@@ -31,6 +31,7 @@#define gadget_is_ci13xxx_msm (g) (!strcmp("ci13xxx_msm", (g)->name))#define gadget_is_ci13xxx_pci (g) (!strcmp("ci13xxx_pci", (g)->name))#define gadget_is_dummy (g) (!strcmp("dummy_udc", (g)->name)) +#define gadget_is_dwc3 (g) (!strcmp("dwc3-gadget", (g)->name))#define gadget_is_fsl_qe (g) (!strcmp("fsl_qe_udc", (g)->name))#define gadget_is_fsl_usb2 (g) (!strcmp("fsl-usb2-udc", (g)->name))#define gadget_is_goku (g) (!strcmp("goku_udc", (g)->name))
@@ -115,6 +116,8 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)return 0x30 ; else if (gadget_is_net2272(gadget)) return 0x31; + else if (gadget_is_dwc3(gadget)) + return 0x32;return -ENOENT ; }
Signature · 6 lines
1.7.6.396.ge0613 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 3/4 usb: Introduce DesignWare USB3 DRD Driver
In reply to a message not in the archiveThe DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
--- Documentation/usb/dwc3.txt | 53 ++ drivers/usb/Kconfig | 2 + drivers/usb/Makefile | 2 + drivers/usb/dwc3/Kconfig | 25 + drivers/usb/dwc3/Makefile | 36 + drivers/usb/dwc3/core.c | 467 ++++++++++ drivers/usb/dwc3/core.h | 709 +++++++++++++++ drivers/usb/dwc3/debug.h | 51 + drivers/usb/dwc3/debugfs.c | 534 +++++++++++ drivers/usb/dwc3/dwc3-omap.c | 410 +++++++++ drivers/usb/dwc3/dwc3-pci.c | 219 +++++ drivers/usb/dwc3/ep0.c | 782 ++++++++++++++++ drivers/usb/dwc3/gadget.c | 2063 ++++++++++++++++++++++++++++++++++++++++++ drivers/usb/dwc3/gadget.h | 292 ++++++ drivers/usb/dwc3/io.h | 55 ++ drivers/usb/gadget/Kconfig | 12 + 16 files changed, 5712 insertions(+), 0 deletions(-) create mode 100644 Documentation/usb/dwc3.txt create mode 100644 drivers/usb/dwc3/Kconfig create mode 100644 drivers/usb/dwc3/Makefile create mode 100644 drivers/usb/dwc3/core.c create mode 100644 drivers/usb/dwc3/core.h create mode 100644 drivers/usb/dwc3/debug.h create mode 100644 drivers/usb/dwc3/debugfs.c create mode 100644 drivers/usb/dwc3/dwc3-omap.c create mode 100644 drivers/usb/dwc3/dwc3-pci.c create mode 100644 drivers/usb/dwc3/ep0.c create mode 100644 drivers/usb/dwc3/gadget.c create mode 100644 drivers/usb/dwc3/gadget.h create mode 100644 drivers/usb/dwc3/io.h
Documentation/usb/dwc3.txt new file +53 -0
@@ -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).
drivers/usb/Kconfig +2 -0
@@ -110,6 +110,8 @@ config USB source "drivers/usb/core/Kconfig" +source "drivers/usb/dwc3/Kconfig" + source "drivers/usb/mon/Kconfig" source "drivers/usb/wusbcore/Kconfig"
drivers/usb/Makefile +2 -0
@@ -6,6 +6,8 @@ obj-$(CONFIG_USB) += core/ +obj-$(CONFIG_USB_DWC3) += dwc3/ + obj-$(CONFIG_USB_MON) += mon/ obj-$(CONFIG_PCI) += host/
drivers/usb/dwc3/Kconfig new file +25 -0
@@ -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
drivers/usb/dwc3/Makefile new file +36 -0
@@ -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 +
drivers/usb/dwc3/core.c new file +467 -0
467 lines not on this page · raw message
drivers/usb/dwc3/core.h new file +709 -0
709 lines not on this page · raw message
drivers/usb/dwc3/debug.h new file +51 -0
51 lines not on this page · raw message
drivers/usb/dwc3/debugfs.c new file +534 -0
534 lines not on this page · raw message
drivers/usb/dwc3/dwc3-omap.c new file +410 -0
410 lines not on this page · raw message
drivers/usb/dwc3/dwc3-pci.c new file +219 -0
219 lines not on this page · raw message
drivers/usb/dwc3/ep0.c new file +782 -0
480 lines not on this page · raw message
drivers/usb/dwc3/gadget.c new file +2063 -0
2,063 lines not on this page · raw message
drivers/usb/dwc3/gadget.h new file +292 -0
292 lines not on this page · raw message
drivers/usb/dwc3/io.h new file +55 -0
55 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 6 lines
1.7.6.396.ge0613 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Part of the diff is not shown here. View the raw message.
Re: [PATCH 3/4] usb: Introduce DesignWare USB3 DRD Driver
Quoted 6 lines · Felipe Balbi
drivers/usb/dwc3/core.h new file +6
-0+enum dwc3_link_state { +/* In SuperSpeed */ +DWC3_LINK_STATE_U0 =0x00 ,/* in HS, means ON */ +DWC3_LINK_STATE_U1 =0x01 , +DWC3_LINK_STATE_U2 =0x02 ,/* in HS, means SLEEP */ +DWC3_LINK_STATE_U3 =0x03 ,/* in HS, means SUSPEND */
drivers/usb/dwc3/core.h line 400
Quoted 10 lines
drivers/usb/dwc3/core.h new file +10
-0+DWC3_LINK_STATE_SS_DIS =0x04 , +DWC3_LINK_STATE_RX_DET =0x05 ,/* in HS, means Early Suspend */ +DWC3_LINK_STATE_SS_INACT =0x06 , +DWC3_LINK_STATE_POLL =0x07 , +DWC3_LINK_STATE_RECOV =0x08 , +DWC3_LINK_STATE_HRESET =0x09 , +DWC3_LINK_STATE_CMPLY =0x0a , +DWC3_LINK_STATE_LPBK =0x0b , + DWC3_LINK_STATE_MASK = 0x0f, +};
AFAICT, the link state values are exactly the same as the xHCI link state values in the Port Link State field in the PORTSC register. Is the gadget side (xDCI side) meant to be somewhat compatible with the xHCI host controller spec?
Would it make sense to share these link state macros (and any other similar #defines) with the xHCI driver? We could move them into include/linux/ch11.h.
Sarah Sharp
Re: [PATCH 3/4] usb: Introduce DesignWare USB3 DRD Driver
Hi,
Quoted 14 lines · Sarah Sharp
Quoted 13 lines · Felipe Balbi
drivers/usb/dwc3/core.h new file +13
-0+enum dwc3_link_state { +/* In SuperSpeed */ +DWC3_LINK_STATE_U0 =0x00 ,/* in HS, means ON */ +DWC3_LINK_STATE_U1 =0x01 , +DWC3_LINK_STATE_U2 =0x02 ,/* in HS, means SLEEP */ +DWC3_LINK_STATE_U3 =0x03 ,/* in HS, means SUSPEND */ +DWC3_LINK_STATE_SS_DIS =0x04 , +DWC3_LINK_STATE_RX_DET =0x05 ,/* in HS, means Early Suspend */ +DWC3_LINK_STATE_SS_INACT =0x06 , +DWC3_LINK_STATE_POLL =0x07 , +DWC3_LINK_STATE_RECOV =0x08 , +DWC3_LINK_STATE_HRESET =0x09 , +DWC3_LINK_STATE_CMPLY =0x0a ,
Quoted 8 lines
drivers/usb/dwc3/core.h line 400
Quoted 3 lines
drivers/usb/dwc3/core.h new file +3
-0+DWC3_LINK_STATE_LPBK =0x0b , + DWC3_LINK_STATE_MASK = 0x0f, +};AFAICT, the link state values are exactly the same as the xHCI link state values in the Port Link State field in the PORTSC register. Is the gadget side (xDCI side) meant to be somewhat compatible with the xHCI host controller spec?
I guess Synopsys would be best to answer this question. Paul, do you happen to know the answer ?
Quoted 3 lines
Would it make sense to share these link state macros (and any other similar #defines) with the xHCI driver? We could move them into
include/linux/ch11.h.
I'm not sure it makes sense to make gadget side use ch11 definitions, but we could move them to some other common header, maybe ?
Signature · 1 line
balbi
A message that is not in the archive (sent off-list or not yet received): 20110825203606.GA27161-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org
RE: [PATCH 3/4] usb: Introduce DesignWare USB3 DRD Driver
PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBGZWxpcGUgQmFsYmkgW21haWx0 bzpiYWxiaUB0aS5jb21dDQo+IFNlbnQ6IFRodXJzZGF5LCBBdWd1c3QgMjUsIDIwMTEgMTozNiBQ TQ0KPiBUbzogU2FyYWggU2hhcnANCj4gQ2M6IEZlbGlwZSBCYWxiaTsgR3JlZyBLSDsgTGludXgg VVNCIE1haWxpbmcgTGlzdDsgTGludXggT01BUCBNYWlsaW5nIExpc3Q7IFBhdWwgWmltbWVybWFu DQo+IFN1YmplY3Q6IFJlOiBbUEFUQ0ggMy80XSB1c2I6IEludHJvZHVjZSBEZXNpZ25XYXJlIFVT QjMgRFJEIERyaXZlcg0KPiANCj4gSGksDQo+IA0KPiBPbiBUaHUsIEF1ZyAyNSwgMjAxMSBhdCAx MjoxNTowOVBNIC0wNzAwLCBTYXJhaCBTaGFycCB3cm90ZToNCj4gPiBPbiBGcmksIEF1ZyAxOSwg MjAxMSBhdCAwNjoxMDo1OFBNICswMzAwLCBGZWxpcGUgQmFsYmkgd3JvdGU6DQo+ID4gPiArZW51 bSBkd2MzX2xpbmtfc3RhdGUgew0KPiA+ID4gKwkvKiBJbiBTdXBlclNwZWVkICovDQo+ID4gPiAr CURXQzNfTElOS19TVEFURV9VMAkJPSAweDAwLCAvKiBpbiBIUywgbWVhbnMgT04gKi8NCj4gPiA+ ICsJRFdDM19MSU5LX1NUQVRFX1UxCQk9IDB4MDEsDQo+ID4gPiArCURXQzNfTElOS19TVEFURV9V MgkJPSAweDAyLCAvKiBpbiBIUywgbWVhbnMgU0xFRVAgKi8NCj4gPiA+ICsJRFdDM19MSU5LX1NU QVRFX1UzCQk9IDB4MDMsIC8qIGluIEhTLCBtZWFucyBTVVNQRU5EICovDQo+ID4gPiArCURXQzNf TElOS19TVEFURV9TU19ESVMJCT0gMHgwNCwNCj4gPiA+ICsJRFdDM19MSU5LX1NUQVRFX1JYX0RF VAkJPSAweDA1LCAvKiBpbiBIUywgbWVhbnMgRWFybHkgU3VzcGVuZCAqLw0KPiA+ID4gKwlEV0Mz X0xJTktfU1RBVEVfU1NfSU5BQ1QJPSAweDA2LA0KPiA+ID4gKwlEV0MzX0xJTktfU1RBVEVfUE9M TAkJPSAweDA3LA0KPiA+ID4gKwlEV0MzX0xJTktfU1RBVEVfUkVDT1YJCT0gMHgwOCwNCj4gPiA+ ICsJRFdDM19MSU5LX1NUQVRFX0hSRVNFVAkJPSAweDA5LA0KPiA+ID4gKwlEV0MzX0xJTktfU1RB VEVfQ01QTFkJCT0gMHgwYSwNCj4gPiA+ICsJRFdDM19MSU5LX1NUQVRFX0xQQksJCT0gMHgwYiwN Cj4gPiA+ICsJRFdDM19MSU5LX1NUQVRFX01BU0sJCT0gMHgwZiwNCj4gPiA+ICt9Ow0KPiA+DQo+ ID4gQUZBSUNULCB0aGUgbGluayBzdGF0ZSB2YWx1ZXMgYXJlIGV4YWN0bHkgdGhlIHNhbWUgYXMg dGhlIHhIQ0kgbGluaw0KPiA+IHN0YXRlIHZhbHVlcyBpbiB0aGUgUG9ydCBMaW5rIFN0YXRlIGZp ZWxkIGluIHRoZSBQT1JUU0MgcmVnaXN0ZXIuICBJcw0KPiA+IHRoZSBnYWRnZXQgc2lkZSAoeERD SSBzaWRlKSBtZWFudCB0byBiZSBzb21ld2hhdCBjb21wYXRpYmxlIHdpdGggdGhlDQo+ID4geEhD SSBob3N0IGNvbnRyb2xsZXIgc3BlYz8NCj4gDQo+IEkgZ3Vlc3MgU3lub3BzeXMgd291bGQgYmUg YmVzdCB0byBhbnN3ZXIgdGhpcyBxdWVzdGlvbi4gUGF1bCwgZG8geW91DQo+IGhhcHBlbiB0byBr bm93IHRoZSBhbnN3ZXIgPw0KPiANCj4gPiBXb3VsZCBpdCBtYWtlIHNlbnNlIHRvIHNoYXJlIHRo ZXNlIGxpbmsgc3RhdGUgbWFjcm9zIChhbmQgYW55IG90aGVyDQo+ID4gc2ltaWxhciAjZGVmaW5l cykgd2l0aCB0aGUgeEhDSSBkcml2ZXI/ICBXZSBjb3VsZCBtb3ZlIHRoZW0gaW50bw0KPiA+IGlu Y2x1ZGUvbGludXgvY2gxMS5oLg0KPiANCj4gSSdtIG5vdCBzdXJlIGl0IG1ha2VzIHNlbnNlIHRv IG1ha2UgZ2FkZ2V0IHNpZGUgdXNlIGNoMTEgZGVmaW5pdGlvbnMsDQo+IGJ1dCB3ZSBjb3VsZCBt b3ZlIHRoZW0gdG8gc29tZSBvdGhlciBjb21tb24gaGVhZGVyLCBtYXliZSA/DQoNCk91ciBVU0Iz IGNvcmUgaXMgYSBkdWFsLXJvbGUgZGV2aWNlLCBhbmQgc29tZSBvZiB0aGUgbG9naWMgaXMgc2hh cmVkDQpiZXR3ZWVuIHhIQ0kgbW9kZSBhbmQgRGV2aWNlIG1vZGUuIFNvIGl0J3Mgbm90IGEgY29p bmNpZGVuY2UgdGhhdCB0aGUNCmxpbmsgc3RhdGUgdmFsdWVzIGFyZSB0aGUgc2FtZS4NCg0KSG93 ZXZlciwgaW4gZnV0dXJlIHRoZSBkZXZpY2UgbW9kZSB3aWxsIGhhdmUgYWRkaXRpb25hbCBzdGF0 ZXMgYmV5b25kDQp0aG9zZSBkZWZpbmVkIGZvciB4SENJLiBTbyBhIGNvbXBsZXRlbHkgY29tbW9u IGhlYWRlciBmaWxlIGlzIG5vdA0KcG9zc2libGUsIHVubGVzcyBwZW9wbGUgZG9uJ3QgbWluZCBo YXZpbmcgU3lub3BzeXMtc3BlY2lmaWMgZGVmaW5lcw0KaW5zaWRlIGl0Lg0KDQotLSANClBhdWwN Cg0K
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): F6C4814A9B336243ABC3D1FB44E08AE801D21CC66D-uiPIUNf6hlr3OT/[email protected]
Re: [PATCH 3/4] usb: Introduce DesignWare USB3 DRD Driver
Hi,
Quoted 43 lines · Paul Zimmerman
Quoted 36 lines
-----Original Message-----
From: Felipe Balbi [mailto:[email protected]]
Sent: Thursday, August 25, 2011 1:36 PM
To: Sarah Sharp
Cc: Felipe Balbi; Greg KH; Linux USB Mailing List; Linux OMAP Mailing List; Paul Zimmerman
Subject: Re: [PATCH 3/4] usb: Introduce DesignWare USB3 DRD DriverHi,
Quoted 14 lines · Sarah Sharp
Quoted 13 lines · Felipe Balbi
drivers/usb/dwc3/core.h new file +13
-0+enum dwc3_link_state { +/* In SuperSpeed */ +DWC3_LINK_STATE_U0 =0x00 ,/* in HS, means ON */ +DWC3_LINK_STATE_U1 =0x01 , +DWC3_LINK_STATE_U2 =0x02 ,/* in HS, means SLEEP */ +DWC3_LINK_STATE_U3 =0x03 ,/* in HS, means SUSPEND */ +DWC3_LINK_STATE_SS_DIS =0x04 , +DWC3_LINK_STATE_RX_DET =0x05 ,/* in HS, means Early Suspend */ +DWC3_LINK_STATE_SS_INACT =0x06 , +DWC3_LINK_STATE_POLL =0x07 , +DWC3_LINK_STATE_RECOV =0x08 , +DWC3_LINK_STATE_HRESET =0x09 , +DWC3_LINK_STATE_CMPLY =0x0a ,Quoted 8 lines
drivers/usb/dwc3/core.h line 400
Quoted 3 lines
drivers/usb/dwc3/core.h new file +3
-0+DWC3_LINK_STATE_LPBK =0x0b , + DWC3_LINK_STATE_MASK = 0x0f, +};AFAICT, the link state values are exactly the same as the xHCI link state values in the Port Link State field in the PORTSC register. Is the gadget side (xDCI side) meant to be somewhat compatible with the xHCI host controller spec?
I guess Synopsys would be best to answer this question. Paul, do you happen to know the answer ?
Quoted 6 lines
Quoted 3 lines
Would it make sense to share these link state macros (and any other similar #defines) with the xHCI driver? We could move them into
include/linux/ch11.h.I'm not sure it makes sense to make gadget side use ch11 definitions, but we could move them to some other common header, maybe ?
Quoted 8 lines
Our USB3 core is a dual-role device, and some of the logic is shared between xHCI mode and Device mode. So it's not a coincidence that the link state values are the same.
However, in future the device mode will have additional states beyond those defined for xHCI. So a completely common header file is not possible, unless people don't mind having Synopsys-specific defines inside it.
Thanks for the reply Paul :-) I believe this is strong enough argument to keep things as they are.
Signature · 1 line
balbi
PATCH 1/4 usb: ch9: add function defines from ch9, USB 3.0 spec
In reply to Felipe BalbiFrom: Sebastian Andrzej Siewior <[email protected]>
not to confuse with Table 9-7 in USB 2.0 spec
--- include/linux/usb/ch9.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
include/linux/usb/ch9.h +5 -0
@@ -143,6 +143,11 @@#define USB_INTRF_FUNC_SUSPEND 0/* function suspend */ #define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00 +/* +* Suspend Options, Table 9-7 USB 3.0 spec +*/ +#define USB_INTRF_FUNC_SUSPEND_LP (1 << (8 + 0)) +#define USB_INTRF_FUNC_SUSPEND_RW (1 << (8 + 1))#define USB_ENDPOINT_HALT 0/* IN/OUT will STALL */
Signature · 1 line
1.7.6.396.ge0613
PATCH 4/4 MAINTAINERS: add a maintainer for DesignWare USB3 driver
In reply to Felipe BalbiI'll be focussed on this driver and can maintain
it without any problem.
--- MAINTAINERS | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
MAINTAINERS +8 -0
@@ -2139,6 +2139,14 @@ M: Matthew Garrett <[email protected]> S: Maintained F: drivers/platform/x86/dell-wmi.c +DESIGNWARE USB3 DRD IP DRIVER +M: Felipe Balbi <[email protected]> +L: [email protected] +L: [email protected] +T: git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git +S: Maintained +F: drivers/usb/dwc3/ + DEVICE NUMBER REGISTRY M: Torben Mathiasen <[email protected]> W: http://lanana.org/docs/device-list/index.html
Signature · 1 line
1.7.6.396.ge0613