All of lore.kernel.org
 help / color / mirror / Atom feed
* [2/2] usb: dwc2: gadget: Accept LPM token when TxFIFO is not empty
@ 2018-10-31 11:41 Artur Petrosyan
  0 siblings, 0 replies; 5+ messages in thread
From: Artur Petrosyan @ 2018-10-31 11:41 UTC (permalink / raw)
  To: Sergei Shtylyov, Artur Petrosyan, Felipe Balbi,
	Greg Kroah-Hartman, Minas Harutyunyan, linux-usb
  Cc: John Youn

Hi Sergei,

On 10/30/2018 19:02, Sergei Shtylyov wrote:
> Hello!
> 
> On 10/30/2018 03:26 PM, Artur Petrosyan wrote:
> 
>> To accept LPM token during ISOC transfers when TxFIFO
>> is not empty.
>>
>> Signed-off-by: Artur Petrosyan <arturp@synopsys.com>
>> Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
>> ---
>>   drivers/usb/dwc2/gadget.c | 1 +
>>   drivers/usb/dwc2/hw.h     | 3 +++
>>   2 files changed, 4 insertions(+)
>>
>> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
>> index 6bd4054e894d..63d53619fd21 100644
>> --- a/drivers/usb/dwc2/gadget.c
>> +++ b/drivers/usb/dwc2/gadget.c
>> @@ -5026,6 +5026,7 @@ void dwc2_gadget_init_lpm(struct dwc2_hsotg *hsotg)
>>   	val |= hsotg->params.lpm_clock_gating ? GLPMCFG_ENBLSLPM : 0;
>>   	val |= hsotg->params.hird_threshold << GLPMCFG_HIRD_THRES_SHIFT;
>>   	val |= hsotg->params.besl ? GLPMCFG_ENBESL : 0;
>> +	val |= GLPMCFG_RETRY_CNT_1;
>>   	dwc2_writel(hsotg, val, GLPMCFG);
>>   	dev_dbg(hsotg->dev, "GLPMCFG=0x%08x\n", dwc2_readl(hsotg, GLPMCFG));
>>   
>> diff --git a/drivers/usb/dwc2/hw.h b/drivers/usb/dwc2/hw.h
>> index 2b1ea441b7d4..84d2b32f4831 100644
>> --- a/drivers/usb/dwc2/hw.h
>> +++ b/drivers/usb/dwc2/hw.h
>> @@ -333,6 +333,9 @@
>>   #define GLPMCFG_SNDLPM			BIT(24)
>>   #define GLPMCFG_RETRY_CNT_MASK		(0x7 << 21)
>>   #define GLPMCFG_RETRY_CNT_SHIFT		21
>> +#define GLPMCFG_RETRY_CNT_0		21
>> +#define GLPMCFG_RETRY_CNT_1		22
>> +#define GLPMCFG_RETRY_CNT_2		23
> 
>     Not '(0|1|2 << 21)'?
> 
> [...]
> 
> MBR, Sergei
> 

Thank you very much for your review. I will submit V2 patches to fix bit 
definitions,and also add Reviewed-by tag.

Regards,
Artur

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [2/2] usb: dwc2: gadget: Accept LPM token when TxFIFO is not empty
@ 2018-10-30 15:01 Sergei Shtylyov
  0 siblings, 0 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2018-10-30 15:01 UTC (permalink / raw)
  To: Artur Petrosyan, Felipe Balbi, Greg Kroah-Hartman,
	Minas Harutyunyan, linux-usb
  Cc: John Youn

Hello!

On 10/30/2018 03:26 PM, Artur Petrosyan wrote:

> To accept LPM token during ISOC transfers when TxFIFO
> is not empty.
> 
> Signed-off-by: Artur Petrosyan <arturp@synopsys.com>
> Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
> ---
>  drivers/usb/dwc2/gadget.c | 1 +
>  drivers/usb/dwc2/hw.h     | 3 +++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> index 6bd4054e894d..63d53619fd21 100644
> --- a/drivers/usb/dwc2/gadget.c
> +++ b/drivers/usb/dwc2/gadget.c
> @@ -5026,6 +5026,7 @@ void dwc2_gadget_init_lpm(struct dwc2_hsotg *hsotg)
>  	val |= hsotg->params.lpm_clock_gating ? GLPMCFG_ENBLSLPM : 0;
>  	val |= hsotg->params.hird_threshold << GLPMCFG_HIRD_THRES_SHIFT;
>  	val |= hsotg->params.besl ? GLPMCFG_ENBESL : 0;
> +	val |= GLPMCFG_RETRY_CNT_1;
>  	dwc2_writel(hsotg, val, GLPMCFG);
>  	dev_dbg(hsotg->dev, "GLPMCFG=0x%08x\n", dwc2_readl(hsotg, GLPMCFG));
>  
> diff --git a/drivers/usb/dwc2/hw.h b/drivers/usb/dwc2/hw.h
> index 2b1ea441b7d4..84d2b32f4831 100644
> --- a/drivers/usb/dwc2/hw.h
> +++ b/drivers/usb/dwc2/hw.h
> @@ -333,6 +333,9 @@
>  #define GLPMCFG_SNDLPM			BIT(24)
>  #define GLPMCFG_RETRY_CNT_MASK		(0x7 << 21)
>  #define GLPMCFG_RETRY_CNT_SHIFT		21
> +#define GLPMCFG_RETRY_CNT_0		21
> +#define GLPMCFG_RETRY_CNT_1		22
> +#define GLPMCFG_RETRY_CNT_2		23

   Not '(0|1|2 << 21)'?

[...]

MBR, Sergei

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [2/2] usb: dwc2: gadget: Accept LPM token when TxFIFO is not empty
@ 2018-10-30 14:14 Artur Petrosyan
  0 siblings, 0 replies; 5+ messages in thread
From: Artur Petrosyan @ 2018-10-30 14:14 UTC (permalink / raw)
  To: Felipe Balbi, Artur Petrosyan, Greg Kroah-Hartman,
	Minas Harutyunyan, linux-usb
  Cc: John Youn

Hi Balbi,

On 10/30/2018 16:35, Felipe Balbi wrote:
> 
> Hi,
> 
> Artur Petrosyan <arthur.petrosyan@synopsys.com> writes:
>> To accept LPM token during ISOC transfers when TxFIFO
>> is not empty.
> 
> this commit log tells me nothing. Why do you need this patch? Why CNT1
> and not CNT0 or CNT2?
> 

Thanks for the quick reply and the review.
I will accordingly add descriptive information about the importance of 
the patch and the use of the CNT0, CNT1 and CNT2 (from the data book). 
Will create a version 2 for this patch.

Regards,
Artur

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [2/2] usb: dwc2: gadget: Accept LPM token when TxFIFO is not empty
@ 2018-10-30 12:35 Felipe Balbi
  0 siblings, 0 replies; 5+ messages in thread
From: Felipe Balbi @ 2018-10-30 12:35 UTC (permalink / raw)
  To: Artur Petrosyan, Greg Kroah-Hartman, Minas Harutyunyan, linux-usb
  Cc: John Youn

Hi,

Artur Petrosyan <arthur.petrosyan@synopsys.com> writes:
> To accept LPM token during ISOC transfers when TxFIFO
> is not empty.

this commit log tells me nothing. Why do you need this patch? Why CNT1
and not CNT0 or CNT2?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [2/2] usb: dwc2: gadget: Accept LPM token when TxFIFO is not empty
@ 2018-10-30 12:26 Artur Petrosyan
  0 siblings, 0 replies; 5+ messages in thread
From: Artur Petrosyan @ 2018-10-30 12:26 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Minas Harutyunyan, linux-usb
  Cc: John Youn, Artur Petrosyan

To accept LPM token during ISOC transfers when TxFIFO
is not empty.

Signed-off-by: Artur Petrosyan <arturp@synopsys.com>
Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
---
 drivers/usb/dwc2/gadget.c | 1 +
 drivers/usb/dwc2/hw.h     | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 6bd4054e894d..63d53619fd21 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -5026,6 +5026,7 @@ void dwc2_gadget_init_lpm(struct dwc2_hsotg *hsotg)
 	val |= hsotg->params.lpm_clock_gating ? GLPMCFG_ENBLSLPM : 0;
 	val |= hsotg->params.hird_threshold << GLPMCFG_HIRD_THRES_SHIFT;
 	val |= hsotg->params.besl ? GLPMCFG_ENBESL : 0;
+	val |= GLPMCFG_RETRY_CNT_1;
 	dwc2_writel(hsotg, val, GLPMCFG);
 	dev_dbg(hsotg->dev, "GLPMCFG=0x%08x\n", dwc2_readl(hsotg, GLPMCFG));
 
diff --git a/drivers/usb/dwc2/hw.h b/drivers/usb/dwc2/hw.h
index 2b1ea441b7d4..84d2b32f4831 100644
--- a/drivers/usb/dwc2/hw.h
+++ b/drivers/usb/dwc2/hw.h
@@ -333,6 +333,9 @@
 #define GLPMCFG_SNDLPM			BIT(24)
 #define GLPMCFG_RETRY_CNT_MASK		(0x7 << 21)
 #define GLPMCFG_RETRY_CNT_SHIFT		21
+#define GLPMCFG_RETRY_CNT_0		21
+#define GLPMCFG_RETRY_CNT_1		22
+#define GLPMCFG_RETRY_CNT_2		23
 #define GLPMCFG_LPM_CHNL_INDX_MASK	(0xf << 17)
 #define GLPMCFG_LPM_CHNL_INDX_SHIFT	17
 #define GLPMCFG_L1RESUMEOK		BIT(16)

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-10-31 11:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-31 11:41 [2/2] usb: dwc2: gadget: Accept LPM token when TxFIFO is not empty Artur Petrosyan
  -- strict thread matches above, loose matches on Subject: below --
2018-10-30 15:01 Sergei Shtylyov
2018-10-30 14:14 Artur Petrosyan
2018-10-30 12:35 Felipe Balbi
2018-10-30 12:26 Artur Petrosyan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.