]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
usb: dwc2: gadget: fix TX FIFO size and address initialization
authorRobert Baldyga <r.baldyga@samsung.com>
Mon, 29 Aug 2016 20:38:52 +0000 (13:38 -0700)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 31 Aug 2016 07:06:05 +0000 (10:06 +0300)
commitaa381a7259c3f53727bcaa8c5f9359e940a0e3fd
tree9c5853906977ae684ef24c1f5963623d5ff9792b
parentad674a15249e7d800162858e49272877a782ec40
usb: dwc2: gadget: fix TX FIFO size and address initialization

According to DWC2 documentation, DPTxFSize field of DPTXFSIZn register
is read only, which means that software cannot change FIFO size.

Register description says:
"The value of this register is the Largest Device Mode Periodic Tx Data
FIFO Depth (parameter OTG_TX_DPERIO_DFIFO_DEPTH_n), as specified during
coreConsultant configuration."

That means, that we have to setup only FIFO start addresses (DPTxFStAddr),
taking into account reset values of DPTxFSize.

Initialize FIFO start addresses properly and remove unneeded core related
to incorrect FIFO size initialization.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/core.h
drivers/usb/dwc2/gadget.c