public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Chipidea: TI-NSPIRE USB OTG hardware does not support high speed and must connect at full speed
@ 2015-01-04  2:14 Daniel Tang
  2015-01-04  2:14 ` [PATCH 2/2] Chipidea: Set connect-at-fullspeed bit when entering host mode if CI_HDRC_FORCE_FULLSPEED is set in the platform data Daniel Tang
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Tang @ 2015-01-04  2:14 UTC (permalink / raw)
  To: Peter.Chen; +Cc: linux-kernel, linux-usb, gregkh, Daniel Tang

Signed-off-by: Daniel Tang <dt.tangr@gmail.com>
---
 drivers/usb/chipidea/ci_hdrc_zevio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/chipidea/ci_hdrc_zevio.c b/drivers/usb/chipidea/ci_hdrc_zevio.c
index d976fc1..1264de5 100644
--- a/drivers/usb/chipidea/ci_hdrc_zevio.c
+++ b/drivers/usb/chipidea/ci_hdrc_zevio.c
@@ -18,7 +18,7 @@
 
 static struct ci_hdrc_platform_data ci_hdrc_zevio_platdata = {
 	.name			= "ci_hdrc_zevio",
-	.flags			= CI_HDRC_REGS_SHARED,
+	.flags			= CI_HDRC_REGS_SHARED | CI_HDRC_FORCE_FULLSPEED,
 	.capoffset		= DEF_CAPOFFSET,
 };
 
-- 
2.1.3


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

* [PATCH 2/2] Chipidea: Set connect-at-fullspeed bit when entering host mode if CI_HDRC_FORCE_FULLSPEED is set in the platform data
  2015-01-04  2:14 [PATCH 1/2] Chipidea: TI-NSPIRE USB OTG hardware does not support high speed and must connect at full speed Daniel Tang
@ 2015-01-04  2:14 ` Daniel Tang
  2015-01-09  1:38   ` Peter Chen
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Tang @ 2015-01-04  2:14 UTC (permalink / raw)
  To: Peter.Chen; +Cc: linux-kernel, linux-usb, gregkh, Daniel Tang

PORTSC_PFSC is not set on entering host mode which means the USB OTG
controller will attempt to enumerate USB devices at high speed even when the
CI_HDRC_FORCE_FULLSPEED flag is set in the platform data.

This patch ensures it is set right before host mode operations begin if needed.

Signed-off-by: Daniel Tang <dt.tangr@gmail.com>
---
 drivers/usb/chipidea/host.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index c1694cf..f106d25 100644
--- a/drivers/usb/chipidea/host.c
+++ b/drivers/usb/chipidea/host.c
@@ -132,6 +132,9 @@ static int host_start(struct ci_hdrc *ci)
 	if (ci->platdata->flags & CI_HDRC_DISABLE_STREAMING)
 		hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS);
 
+	if (ci->platdata->flags & CI_HDRC_FORCE_FULLSPEED)
+		hw_write(ci, OP_PORTSC, PORTSC_PFSC, PORTSC_PFSC);
+
 	return ret;
 
 put_hcd:
-- 
2.1.3


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

* Re: [PATCH 2/2] Chipidea: Set connect-at-fullspeed bit when entering host mode if CI_HDRC_FORCE_FULLSPEED is set in the platform data
  2015-01-04  2:14 ` [PATCH 2/2] Chipidea: Set connect-at-fullspeed bit when entering host mode if CI_HDRC_FORCE_FULLSPEED is set in the platform data Daniel Tang
@ 2015-01-09  1:38   ` Peter Chen
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Chen @ 2015-01-09  1:38 UTC (permalink / raw)
  To: Daniel Tang; +Cc: linux-kernel, linux-usb, gregkh

On Sun, Jan 04, 2015 at 01:14:59PM +1100, Daniel Tang wrote:
> PORTSC_PFSC is not set on entering host mode which means the USB OTG
> controller will attempt to enumerate USB devices at high speed even when the
> CI_HDRC_FORCE_FULLSPEED flag is set in the platform data.
> 
> This patch ensures it is set right before host mode operations begin if needed.
> 
> Signed-off-by: Daniel Tang <dt.tangr@gmail.com>
> ---
>  drivers/usb/chipidea/host.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
> index c1694cf..f106d25 100644
> --- a/drivers/usb/chipidea/host.c
> +++ b/drivers/usb/chipidea/host.c
> @@ -132,6 +132,9 @@ static int host_start(struct ci_hdrc *ci)
>  	if (ci->platdata->flags & CI_HDRC_DISABLE_STREAMING)
>  		hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS);
>  
> +	if (ci->platdata->flags & CI_HDRC_FORCE_FULLSPEED)
> +		hw_write(ci, OP_PORTSC, PORTSC_PFSC, PORTSC_PFSC);
> +
>  	return ret;
>  
>  put_hcd:
> -- 
> 2.1.3
> 

looks ok, will push

-- 

Best Regards,
Peter Chen

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

end of thread, other threads:[~2015-01-09  2:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-04  2:14 [PATCH 1/2] Chipidea: TI-NSPIRE USB OTG hardware does not support high speed and must connect at full speed Daniel Tang
2015-01-04  2:14 ` [PATCH 2/2] Chipidea: Set connect-at-fullspeed bit when entering host mode if CI_HDRC_FORCE_FULLSPEED is set in the platform data Daniel Tang
2015-01-09  1:38   ` Peter Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox