[PATCH v2 01/30] usb: dwc2: Deprecate g-use-dma binding

2016-11-09 Thread John Youn
This is not needed as the gadget now fully supports DMA and it can autodetect it. This was initially added because gadget DMA mode was only partially implemented so could not be automatically enabled. Signed-off-by: John Youn <johny...@synopsys.com> --- Documentation/devicetree/bindings/us

[PATCH v2 08/30] usb: dwc2: host: Rename MAX_DMA_DESC_SIZE to HOST_DMA_NBYTES_LIMIT

2016-11-09 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Rename MAX_DMA_DESC_SIZE to HOST_DMA_NBYTES_LIMIT as it stores value of host DMA descriptor transfer bytes' limit. Values are different in case of gadget DMA descriptors. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-b

[PATCH v2 14/30] usb: dwc2: gadget: Fixes for StsPhseRcvd interrupt

2016-11-09 Thread John Youn
commit. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 6c988

[PATCH v2 10/30] usb: dwc2: gadget: Add DDMA chain pointers to dwc2_hsotg_ep structure

2016-11-09 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Add DMA descriptor members to the dwc2_hsotg_ep structure. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 7 +++ drivers/usb/

[PATCH v2 00/30] usb: dwc2: Gadget descriptor DMA and IOT

2016-11-09 Thread John Youn
GFP_ATOMIC flags. * Remove unnecessary patch removing a WARN_ON. * Reorganize and clarify BNA interrupt. * Fix issue with enabling STSPHSERCVD interrupt. Regards, John John Youn (4): usb: dwc2: Deprecate g-use-dma binding usb: dwc2: Update DMA descriptor structure usb: dwc2: Make the DMA descriptor

[PATCH v2 11/30] usb: dwc2: gadget: Add DDMA chain fill and parse functions

2016-11-09 Thread John Youn
ed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 138 ++ 1 file changed, 138 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c inde

[PATCH v2 07/30] usb: dwc2: gadget: Add DMA descriptor chains for EP 0

2016-11-09 Thread John Youn
Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 13 drivers/usb/dwc2/gadget.c | 54 +++ 2 files changed, 67 insertions(+) diff --git a/drive

[PATCH v2 15/30] usb: dwc2: gadget: Start DDMA IN status phase in StsPhseRcvd handler

2016-11-09 Thread John Youn
<vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index bcae58d..e5d0959 100644 --- a/drivers/usb/dwc2/gadget.c

[PATCH v2 03/30] usb: dwc2: Make the DMA descriptor structure packed

2016-11-09 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Make the DMA descriptor structure packed to guarantee alignment and size in memory. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/hw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/u

[PATCH v2 04/30] usb: dwc2: gadget: Add descriptor DMA parameter

2016-11-09 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Add a parameter for descriptor DMA and set it based on hardware capabilities. This won't actually be used by the gadget until later, when the descriptor DMA code is in place. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-

[PATCH v2 02/30] usb: dwc2: Update DMA descriptor structure

2016-11-09 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Rename DMA descriptor structure from dwc2_hcd_dma_desc to dwc2_dma_desc as it is applies to both host and gadget. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- driv

[PATCH v2 06/30] usb: dwc2: gadget: Add DMA descriptor status quadlet fields

2016-11-09 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Add device mode DMA transfer descriptor status quadlet field notations. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/hw.h | 37 ++

[PATCH 1/2] usb: dwc3: gadget: Remove descriptor arguments to ep_enable

2016-11-09 Thread John Youn
The __dwc3_gadget_endpoint_enable() function has access to the endpoint descriptors via the usb_ep. So we don't need to pass them in as arguments. The descriptors should be set by the caller prior to calling usb_ep_enable(). Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/us

[PATCH 2/2] usb: dwc3: gadget: Remove descriptor arguments to ep_config

2016-11-09 Thread John Youn
This function has access to the descriptors via the usb_ep. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/gadget.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 0e73383..4

Re: [PATCH 02/30] usb: dwc2: Update DMA descriptor structure

2016-11-09 Thread John Youn
On 11/9/2016 4:18 AM, David Laight wrote: > From: John Youn >> Sent: 08 November 2016 22:30 > ... >>>> Also make it __packed. >>> >>> why are you making it packed? Does it _have_ to be packed? If it must, >>> why wasn't it before? >> >

Re: [PATCH 01/30] usb: dwc2: Deprecate g-use-dma binding

2016-11-09 Thread John Youn
On 11/8/2016 11:54 PM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >> On 11/8/2016 1:12 AM, Felipe Balbi wrote: >>> >>> Hi, >>> >>> John Youn <johny...@synopsys.com> writes: >>>> Add

Re: [PATCH] usb: dwc2: gadget: Update for new usb_endpoint_maxp()

2016-11-09 Thread John Youn
On 11/9/2016 12:02 AM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >>> John Youn <john.y...@synopsys.com> writes: >>>>> John Youn <john.y...@synopsys.com> writes: >>>>>>>> @@ -1812,17 +

Re: [PATCH 13/30] usb: dwc2: gadget: Fixes for StsPhseRcvd interrupt

2016-11-08 Thread John Youn
On 11/8/2016 1:25 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> From: Vahram Aharonyan <vahr...@synopsys.com> >> >> Corrected unmasking of StsPhseRcvd interrupt not to be performed during >> gadget initializat

Re: [PATCH 05/30] usb: dwc2: gadget: Enable BNA interrupt in descriptor DMA mode

2016-11-08 Thread John Youn
On 11/8/2016 1:16 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> From: Vahram Aharonyan <vahr...@synopsys.com> >> >> Update endpoint related register descriptions to add DOEPMSK_BNAMSK. >> >> Add

Re: [PATCH 14/30] usb: dwc2: gadget: Start DDMA IN status phase in StsPhseRcvd handler

2016-11-08 Thread John Youn
On 11/8/2016 1:27 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> From: Vahram Aharonyan <vahr...@synopsys.com> >> >> In DDMA mode of operation IN status phase of control write transfer >> should start aft

Re: [PATCH 03/30] usb: dwc2: gadget: Add descriptor DMA binding

2016-11-08 Thread John Youn
On 11/8/2016 1:15 AM, Felipe Balbi wrote: > John Youn <johny...@synopsys.com> writes: > >> From: Vahram Aharonyan <vahr...@synopsys.com> >> >> Add the devicetree binding to enable descriptor DMA and read it in to >> the corresponding parameter during pr

Re: [PATCH 02/30] usb: dwc2: Update DMA descriptor structure

2016-11-08 Thread John Youn
On 11/8/2016 1:14 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> From: Vahram Aharonyan <vahr...@synopsys.com> >> >> Rename DMA descriptor structure from dwc2_hcd_dma_desc to dwc2_dma_desc >> as it is applies to b

Re: [PATCH] usb: dwc2: gadget: Update for new usb_endpoint_maxp()

2016-11-08 Thread John Youn
On 11/8/2016 2:48 AM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >>> John Youn <john.y...@synopsys.com> writes: >>>>>> @@ -1812,17 +1812,17 @@ static u32 dwc2_hsotg_ep0_mps(unsigned int mps) >>>>&g

[PATCH v2] usb: dwc2: gadget: Update for new usb_endpoint_maxp()

2016-11-08 Thread John Youn
<mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- v2: * Set the ep.maxpacket to the correct value for EP0 drivers/usb/dwc2/gadget.c | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/drivers/usb/dwc2/gadg

Re: [PATCH 01/30] usb: dwc2: Deprecate g-use-dma binding

2016-11-08 Thread John Youn
On 11/8/2016 1:12 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> Add a vendor prefix and make the name more consistent by renaming it to >> "snps,gadget-dma-enable". >> >> Signed-off-by: John Youn <joh

Re: [PATCH 23/30] usb: dwc2: gadget: Adjustments in debug prints

2016-11-08 Thread John Youn
On 11/8/2016 1:29 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> From: Vahram Aharonyan <vahr...@synopsys.com> >> >> During USB CV tests found timing issues in Slave mode caused by amount >> of data prin

Re: [PATCH v2 3/5] usb: dwc3: gadget: Write the event count in interrupt

2016-11-08 Thread John Youn
On 11/8/2016 6:09 AM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >> On 11/4/2016 2:13 AM, Janusz Dziedzic wrote: >>> On 4 November 2016 at 07:41, Janusz Dziedzic <janusz.dzied...@tieto.com> >>> wrote: &g

[PATCH 30/30] usb: dwc2: gadget: Add new core parameter for low speed

2016-11-07 Thread John Youn
yelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/gadget.c | 27 +-- drivers/usb/dwc2/hcd.c| 8 +--- drivers/usb/dwc2/params.c | 8 ++-- 4 files changed, 33 insertion

[PATCH 22/30] usb: dwc2: gadget: Adjust ISOC OUT request's actual len for DDMA

2016-11-07 Thread John Youn
ytes were received from the bus, after xfercomplete rx_bytes value is 3. Hence add this value to the amount of transferred bytes. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 4 1 file

[PATCH 21/30] usb: dwc2: gadget: Add start and complete calls for DDMA ISOC

2016-11-07 Thread John Youn
t_ddma() and dwc2_gadget_start_next_isoc_ddma() in XferCompl interrupt handler. Add call of dwc2_gadget_start_next_isoc_ddma() in BNA interrupt handler to restart OUT endpoint once it gets disabled due to BNA interrupt assertion. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John

[PATCH 27/30] usb: dwc2: Add support of dedicated full-speed PHY interface

2016-11-07 Thread John Youn
s well. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 26 +- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadg

[PATCH 29/30] usb: dwc2: gadget: Program ep0_mps for LS

2016-11-07 Thread John Youn
From: Vardan Mikayelyan <mvar...@synopsys.com> When device is enumerated in LS we should program ep0_mps accordingly. USB2 spec says that in LS mode, control ep mps must be 8. Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.co

[PATCH 25/30] usb: dwc2: gadget: Correct dwc2_hsotg_ep_stop_xfr() function

2016-11-07 Thread John Youn
O mode, current endpoint is periodic or not. It does not clear EPDISBLD interrupt after programming of DXEPCTL_EPDIS, does not flush shared TX FIFO and tries to clear global out NAK in wrong manner instead of setting DCTL_CGOUTNAK. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-

[PATCH 28/30] usb: dwc2: gadget: Add IOT device IDs, configure core accordingly

2016-11-07 Thread John Youn
From: Vardan Mikayelyan <mvar...@synopsys.com> Add new device IDs for IOT gadget. Done changes in probe to configure core accordingly depending on device ID value. Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> ---

[PATCH 24/30] usb: dwc2: gadget: For DDMA parse setup only after SetUp interrupt

2016-11-07 Thread John Youn
<vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 71f57de..8ade249 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers

[PATCH 26/30] usb: dwc2: gadget: Disable enabled HW endpoint in dwc2_hsotg_ep_disable

2016-11-07 Thread John Youn
before dwc2_hsotg_ep_enable and dwc2_hsotg_ep_disable function definitions. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 182 +++--- 1 file changed, 93 insertion

[PATCH 23/30] usb: dwc2: gadget: Adjustments in debug prints

2016-11-07 Thread John Youn
Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 095af16..71f57de 100644 --- a/drivers

[PATCH 13/30] usb: dwc2: gadget: Fixes for StsPhseRcvd interrupt

2016-11-07 Thread John Youn
quence. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 2ca57

[PATCH 17/30] usb: dwc2: gadget: Add DDMA isoc related fields to dwc2_hsotg_ep

2016-11-07 Thread John Youn
of these fields in function dwc2_hsotg_ep_enable(). Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 5 + drivers/usb/dwc2/gadget.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/drivers/u

[PATCH 12/30] usb: dwc2: gadget: DDMA transfer start and complete

2016-11-07 Thread John Youn
ete_in() interrupt handlers for DDMA mode to get information on transferred data from descriptors instead of DXEPTSIZ. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 66

[PATCH 15/30] usb: dwc2: gadget: Enable descriptor DMA mode

2016-11-07 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Add DCFG register field macro for descriptor DMA mode and update core initialization routine to set that bit accordingly. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> ---

[PATCH 20/30] usb: dwc2: gadget: In DDMA keep incompISOOUT and incompISOIN masked

2016-11-07 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> In DDMA mode incompISOOUT should be masked, similar as Bulk Out - XferCompl and BNA should be handled. incompISOIN is not valid in DDMA and is not getting asserted. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-b

[PATCH 18/30] usb: dwc2: gadget: Fill isoc descriptor and start transfer in DDMA

2016-11-07 Thread John Youn
ronyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 133 ++ 1 file changed, 133 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 336c799..93657e2 10

[PATCH 14/30] usb: dwc2: gadget: Start DDMA IN status phase in StsPhseRcvd handler

2016-11-07 Thread John Youn
<vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index e866edc..4e84862 100644 --- a/drivers/usb/dwc2/gadget.c

[PATCH 19/30] usb: dwc2: gadget: Add completions for DDMA isoc transfers

2016-11-07 Thread John Youn
ahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 105 ++ 1 file changed, 105 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 93657e2..4314e4d 100644 --- a/dri

[PATCH 16/30] usb: dwc2: Enable gadget DDMA by default for HAPS

2016-11-07 Thread John Youn
Enables the gadget descriptor DMA mode by default in the HAPS PCI driver. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/pci.c b/drivers/usb/dwc2/pci.c index 46a9d2b..57e4d82f 100644 --- a/d

[PATCH 10/30] usb: dwc2: gadget: Add DDMA chain fill and parse functions

2016-11-07 Thread John Youn
ed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 138 ++ 1 file changed, 138 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c inde

[PATCH 08/30] usb: dwc2: gadget: Transfer length limit checking for DDMA

2016-11-07 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Add dwc2_gadget_get_chain_limit() function and its call in transfer start routine to correctly estimate one go on transfer size if descriptor DMA mode is selected. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John

[PATCH 09/30] usb: dwc2: gadget: Add DDMA chain pointers to dwc2_hsotg_ep structure

2016-11-07 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Add DMA descriptor members to the dwc2_hsotg_ep structure. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 7 +++ drivers/usb/

[PATCH 07/30] usb: dwc2: host: Rename MAX_DMA_DESC_SIZE to HOST_DMA_NBYTES_LIMIT

2016-11-07 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Rename MAX_DMA_DESC_SIZE to HOST_DMA_NBYTES_LIMIT as it stores value of host DMA descriptor transfer bytes' limit. Values are different in case of gadget DMA descriptors. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-b

[PATCH 11/30] usb: dwc2: gadget: EP 0 specific DDMA programming

2016-11-07 Thread John Youn
illing DDMA chain for status phase as well - add calls of dwc2_gadget_set_ep0_desc_chain() and dwc2_gadget_config_nonisoc_xfer_ddma() functions. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/

[PATCH 05/30] usb: dwc2: gadget: Enable BNA interrupt in descriptor DMA mode

2016-11-07 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Update endpoint related register descriptions to add DOEPMSK_BNAMSK. Add BNA interrupt's unmasking during gadget initalization if descriptor DMA mode is selected. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John

[PATCH 02/30] usb: dwc2: Update DMA descriptor structure

2016-11-07 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Rename DMA descriptor structure from dwc2_hcd_dma_desc to dwc2_dma_desc as it is applies to both host and gadget. Also make it __packed. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny.

[PATCH 03/30] usb: dwc2: gadget: Add descriptor DMA binding

2016-11-07 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Add the devicetree binding to enable descriptor DMA and read it in to the corresponding parameter during probe. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- Docume

[PATCH 04/30] usb: dwc2: gadget: Add DMA descriptor status quadlet fields

2016-11-07 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Add device mode DMA transfer descriptor status quadlet field notations. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/hw.h | 37 ++

[PATCH 06/30] usb: dwc2: gadget: Add DMA descriptor chains for EP 0

2016-11-07 Thread John Youn
Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 13 +++ drivers/usb/dwc2/gadget.c | 56 +++ 2 files changed, 69 insertions(+) diff --git a/drivers

[PATCH 00/30] usb: dwc2: Gadget descriptor DMA and IOT

2016-11-07 Thread John Youn
with: * HSOTG IP version 3.30a * FS/LS IOT IP version 1.00a * HS IOT IP version 1.00a This series should be applied on top of: http://marc.info/?l=linux-usb=147822095118860=2 Regards, John John Youn (2): usb: dwc2: Deprecate g-use-dma binding usb: dwc2: Enable gadget DDMA by default for HAPS Vahram

[PATCH 01/30] usb: dwc2: Deprecate g-use-dma binding

2016-11-07 Thread John Youn
Add a vendor prefix and make the name more consistent by renaming it to "snps,gadget-dma-enable". Signed-off-by: John Youn <johny...@synopsys.com> --- Documentation/devicetree/bindings/usb/dwc2.txt | 5 - arch/arm/boot/dts/rk3036.dtsi | 2 +- arch/arm/boot

Re: [PATCH] usb: dwc2: gadget: simplify list handling

2016-11-07 Thread John Youn
On 11/7/2016 11:06 AM, Nicholas Mc Guire wrote: > The current code is effectively equivalent to list_first_entry_or_null() > so simply switch and simplify the code. > > Fixes: 9c39ddc60ee9 ("USB: s3c-hsotg: Fix stall condition processing") > Signed-off-by: Nicholas Mc Guire >

Re: [PATCH] usb: dwc2: gadget: Update for new usb_endpoint_maxp()

2016-11-07 Thread John Youn
On 11/6/2016 11:32 PM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >>>> @@ -1812,17 +1812,17 @@ static u32 dwc2_hsotg_ep0_mps(unsigned int mps) >>>> * @hsotg: The driver state. >>>> * @ep: The index number

Re: [PATCH] usb: dwc2: gadget: Update for new usb_endpoint_maxp()

2016-11-04 Thread John Youn
On 11/1/2016 4:14 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> From: Vardan Mikayelyan <mvar...@synopsys.com> >> >> Update the dwc2 driver for the new behavior of the usb_endpoint_maxp() >> and also use

Re: [PATCH v2 3/5] usb: dwc3: gadget: Write the event count in interrupt

2016-11-04 Thread John Youn
On 11/4/2016 2:13 AM, Janusz Dziedzic wrote: > On 4 November 2016 at 07:41, Janusz Dziedzic <janusz.dzied...@tieto.com> > wrote: >> On 4 November 2016 at 02:31, John Youn <johny...@synopsys.com> wrote: >>> >>> Since we are saving the event count a

Re: [PATCH] usb: dwc2: gadget: Update for new usb_endpoint_maxp()

2016-11-03 Thread John Youn
On 11/1/2016 4:14 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> From: Vardan Mikayelyan <mvar...@synopsys.com> >> >> Update the dwc2 driver for the new behavior of the usb_endpoint_maxp() >> and also use

[PATCH v2 1/5] usb: dwc3: Add a check for the DWC_usb3 core

2016-11-03 Thread John Youn
Add a helper function to check if we are running on a DWC_usb3 core. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/core.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 2322863..c22b38b

[PATCH v2 0/5] usb: dwc3: Interrupt moderation

2016-11-03 Thread John Youn
This patch series implements interrupt moderation and also uses it in implementing a workaround for STAR 9000961433. v2: * Remove the devicetree binding John Youn (5): usb: dwc3: Add a check for the DWC_usb3 core usb: dwc3: Add a function to check properties usb: dwc3: gadget: Write

[PATCH v2 5/5] usb: dwc3: Workaround for irq mask issue

2016-11-03 Thread John Youn
is immediately deasserted and won't be asserted again until GEVNTCOUNT.EHB is cleared. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/core.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index b

[PATCH v2 3/5] usb: dwc3: gadget: Write the event count in interrupt

2016-11-03 Thread John Youn
were the interrupt line cannot be masked between the hard/soft interrupt handler. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/gadget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c

[PATCH v2 2/5] usb: dwc3: Add a function to check properties

2016-11-03 Thread John Youn
Add a function to check properties and call it from probe. This will allow us to add check code without bloating the probe function. This needs to be done after dwc3_get_properties() and dwc3_core_init() so that all the properties and hardware configs are available. Signed-off-by: John Youn

[PATCH v2 4/5] usb: dwc3: Implement interrupt moderation

2016-11-03 Thread John Youn
ies for DWC_usb3 version 3.00a and higher and for DWC_usb31 version 1.20a and higher. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/core.c | 16 drivers/usb/dwc3/core.h | 15 +++ drivers/usb/dwc3/gadget.c | 16 3 files ch

[PATCH v2 07/13] usb: dwc2: Remove unnecessary prototypes

2016-11-03 Thread John Youn
that went along with the prototype into the structure. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 227 -- drivers/usb/dwc2/params.c | 62 +++-- 2 files changed, 54 insertions(+), 235 deletions(-) diff

[PATCH v2 05/13] usb: dwc2: Move parameter initialization into params.c

2016-11-03 Thread John Youn
Consolidate and move all the parameter initialization code from the probe function to params.c. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 3 +++ drivers/usb/dwc2/params.c | 29 + drivers/usb/dwc2/platform.

[PATCH v2 11/13] Documentation: devicetree: dwc2: Add host DMA binding

2016-11-03 Thread John Youn
Add the snps,host-dma-disable binding. This controls whether to disable DMA in host mode. Signed-off-by: John Youn <johny...@synopsys.com> --- Documentation/devicetree/bindings/usb/dwc2.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.

[PATCH v2 12/13] usb: dwc2: Get host DMA device properties

2016-11-03 Thread John Youn
The driver will automatically enable host DMA and use it if available. This is consistent with the behavior of all existing platforms. Read in the "snps,host-dma-disable" device property to disable it. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dw

[PATCH v2 10/13] usb: dwc2: Rename the dma_enable parameter to host_dma

2016-11-03 Thread John Youn
Rename it so that it is more consistent with the gadget dma parameter. It only affects host-mode operation so prefix it with "host". Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 4 ++-- drivers/usb/dwc2

[PATCH v2 08/13] usb: dwc2: Rename host_rx_fifo_size hardware parameter

2016-11-03 Thread John Youn
This hardware parameter is not host specific. It also applies to device mode. Drop the "host" from the name to make that clear. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 2 +- drivers/usb/dwc2/params.c | 10 +- 2 files changed, 6

[PATCH v2 06/13] usb: dwc2: Remove dwc2_set_all_params function

2016-11-03 Thread John Youn
Replace this by statically defining a function with defaults, and just assigning it. This will allow us to use parameters of any type and any default value. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 2 -- drivers/usb/dwc2/params.c

[PATCH v2 09/13] usb: dwc2: Move gadget settings into core_params

2016-11-03 Thread John Youn
default value rather than an autodetected one. Preserve and document this behavior to avoid any compatibility issues. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 32 -- drivers/usb/dwc2/gadget.c | 93 +++- drivers/usb/dwc2/params.c

[PATCH v2 13/13] usb: dwc2: Add PCI properties

2016-11-03 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Add device parameters handling in dwc2-pci similar what is done in dwc3. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/pci.c | 19 +++

[PATCH v2 00/13] usb: dwc2: Fix up, consolidate, and simplify driver parameters

2016-11-03 Thread John Youn
ved params->host_dma from being set statically. * Reverted descriptor dma params renaming (to be addressed in the future). * Simplified and removed unused code. Regards, John John Youn (12): usb: dwc2: Remove unnecessary kfree usb: dwc2: Remove unused hardware parameter usb: dwc2: Add params

[PATCH v2 01/13] usb: dwc2: Remove unnecessary kfree

2016-11-03 Thread John Youn
This shouldn't be freed by the HCD as it is owned by the core and allocated with devm_kzalloc. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/hcd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index df5a065..1

[PATCH v2 02/13] usb: dwc2: Remove unused hardware parameter

2016-11-03 Thread John Youn
The dma_desc_fs_enable does not correspond to any hardware parameter and is unused. Remove it. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index 2a21a04..0

[PATCH v2 03/13] usb: dwc2: Add params.c file

2016-11-03 Thread John Youn
Add a params.c file and move all driver parameter code there, including all the static parameter definitions. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/Makefile |1 + drivers/usb/dwc2/core.c | 918 +-- drivers/usb/dwc2/

[PATCH v2 04/13] usb: dwc2: Declare the core params struct statically

2016-11-03 Thread John Youn
This makes it consistent with the hw_params struct and simplifies the memory management for future refactoring. Fix up usage in all files. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 12 +-- drivers/usb/dwc2/core.h | 2 +- drivers/us

Re: [RFC][PATCH] usb: dwc2: Make sure we disconnect the gadget state on reset

2016-10-31 Thread John Youn
t; >> Cc: Guodong Xu <guodong...@linaro.org> >> Cc: Chen Yu <cheny...@huawei.com> >> Cc: Amit Pundir <amit.pun...@linaro.org> >> Cc: Rob Herring <robh...@kernel.org> >> Cc: Mark Rutland <mark.rutl...@arm.com> >> Cc: John Youn <johny...@synopsys

[PATCH] usb: dwc2: gadget: Update for new usb_endpoint_maxp()

2016-10-31 Thread John Youn
<mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 38 -- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 8a7fd73..a505bbf 100644

Re: [PATCH 3/6] Documentation: devicetree: dwc3: Add interrupt moderation

2016-10-31 Thread John Youn
On 10/28/2016 3:09 AM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >> On 10/27/2016 3:47 AM, Felipe Balbi wrote: >>> >>> Hi, >>> >>> John Youn <johny...@synopsys.com> writes: >>>> Add

Re: [PATCH 3/6] Documentation: devicetree: dwc3: Add interrupt moderation

2016-10-31 Thread John Youn
On 10/28/2016 3:39 AM, Mark Rutland wrote: > On Fri, Oct 28, 2016 at 01:30:07PM +0300, Felipe Balbi wrote: >> Mark Rutland <mark.rutl...@arm.com> writes: >>> On Thu, Oct 27, 2016 at 02:08:25PM -0700, John Youn wrote: >>>> On 10/26/2016 3:57 AM, Mark Rutland wro

Re: [PATCH 53/82] usb: dwc3: ep0: simplify dwc3_ep0_handle_feature()

2016-10-31 Thread John Youn
On 10/31/2016 3:51 AM, Felipe Balbi wrote: > By extracting smaller functions from > dwc3_ep0_handle_feature(), it becomes far easier to > understand what's going on. Cleanup only, no > functional changes. > > Signed-off-by: Felipe Balbi > --- >

Re: [PATCH 52/82] usb: dwc3: host: extract dwc3_host_get_irq()

2016-10-31 Thread John Youn
On 10/31/2016 3:51 AM, Felipe Balbi wrote: > Cleanup only, no functional changes. > > Signed-off-by: Felipe Balbi > --- > drivers/usb/dwc3/host.c | 68 > + > 1 file changed, 35 insertions(+), 33 deletions(-) > >

Re: [PATCH 51/82] usb: dwc3: gadget: extract dwc3_gadget_get_irq()

2016-10-31 Thread John Youn
On 10/31/2016 3:51 AM, Felipe Balbi wrote: > Cleanup only, no functional changes. > > Signed-off-by: Felipe Balbi > --- > drivers/usb/dwc3/gadget.c | 62 > +-- > 1 file changed, 38 insertions(+), 24 deletions(-) > >

Re: [PATCH] Revert "usb: dwc2: gadget: fix TX FIFO size and address initialization"

2016-10-28 Thread John Youn
On 10/28/2016 8:52 AM, Leo Yan wrote: > This reverts commit aa381a7259c3f53727bcaa8c5f9359e940a0e3fd. > > Reverting this patch, as it incorrectly assumes TX FIFO size is fixed > and cannot change FIFO size; it removes all related dt binding code > and have no chance to set FIFO size at init

Re: [PATCH 13/15] Documentation: devicetree: dwc2: Add host DMA binding

2016-10-27 Thread John Youn
On 10/26/2016 3:07 PM, Rob Herring wrote: > On Wed, Oct 19, 2016 at 06:22:52PM -0700, John Youn wrote: >> Add the host-dma property to devicetree. This controls whether to use >> DMA in host mode. >> >> Signed-off-by: John Youn <johny...@synopsys.com> >> --

Re: [PATCH 3/6] Documentation: devicetree: dwc3: Add interrupt moderation

2016-10-27 Thread John Youn
On 10/26/2016 3:22 AM, Sergei Shtylyov wrote: > Hello. > > On 10/25/2016 10:42 PM, John Youn wrote: > >> Add interrupt moderation interval binding for dwc3. >> >> Signed-off-by: John Youn <johny...@synopsys.com> >> --- >> Documentation/devicetre

Re: [PATCH 3/6] Documentation: devicetree: dwc3: Add interrupt moderation

2016-10-27 Thread John Youn
On 10/27/2016 3:47 AM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> Add interrupt moderation interval binding for dwc3. >> >> Signed-off-by: John Youn <johny...@synopsys.com> >> --- >> Documentation/device

Re: [PATCH 3/6] Documentation: devicetree: dwc3: Add interrupt moderation

2016-10-27 Thread John Youn
On 10/26/2016 3:57 AM, Mark Rutland wrote: > On Tue, Oct 25, 2016 at 12:42:46PM -0700, John Youn wrote: >> Add interrupt moderation interval binding for dwc3. >> >> Signed-off-by: John Youn <johny...@synopsys.com> >> --- >> Documentation/devicetree/binding

Re: [RFC][PATCH] usb: dwc2: Make sure we disconnect the gadget state on reset

2016-10-25 Thread John Youn
On 10/25/2016 2:56 PM, John Stultz wrote: > On Tue, Oct 25, 2016 at 2:29 PM, John Youn <john.y...@synopsys.com> wrote: >> On 10/19/2016 11:00 PM, John Stultz wrote: >>> I had seen some odd behavior with HiKey's usb-gadget interface >>> that I finally seemed to

Re: [RFC][PATCH] usb: dwc2: Make sure we disconnect the gadget state on reset

2016-10-25 Thread John Youn
y the right fix, but it seems > to work well. Feedback would be greatly appreciated! > > Cc: Wei Xu <xuw...@hisilicon.com> > Cc: Guodong Xu <guodong...@linaro.org> > Cc: Chen Yu <cheny...@huawei.com> > Cc: Amit Pundir <amit.pun...@linaro.org> > Cc

Re: [PATCH] phy: Add reset callback for not generic phy

2016-10-25 Thread John Youn
On 10/25/2016 7:15 AM, Randy Li wrote: > I forget to add a dummy function in case the CONFIG_GENERIC_PHY > is disabled. > > Signed-off-by: Randy Li <ay...@soulik.info> Fixes: cac18ecb6f44 ("phy: Add reset callback") Tested-by: John Youn <johny...@synopsys

[PATCH 6/6] usb: dwc3: Workaround for irq mask issue

2016-10-25 Thread John Youn
is immediately deasserted and won't be asserted again until GEVNTCOUNT.EHB is cleared. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/core.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 6

[PATCH 5/6] usb: dwc3: Implement interrupt moderation

2016-10-25 Thread John Youn
ies for DWC_usb3 version 3.00a and higher and for DWC_usb31 version 1.20a and higher. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/core.c | 18 ++ drivers/usb/dwc3/core.h | 15 +++ drivers/usb/dwc3/gadget.c | 16 3 files ch

<    1   2   3   4   5   6   7   8   9   10   >