All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] usb: chipidea: hw_phymode_configure moved before ci_usb_phy_init
@ 2013-11-29  2:08 Chris Ruehl
  2013-11-29  2:14 ` Fabio Estevam
  2013-11-29  3:31 ` Peter Chen
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Ruehl @ 2013-11-29  2:08 UTC (permalink / raw)
  To: alexander.shishkin, gregkh; +Cc: linux-usb, linux-kernel, Chris Ruehl

hw_phymode_configure configures the PORTSC registers and allow the
following phy_inits to operate on the right parameters. This fix a problem
where the UPLI (ISP1504) could not detected, because the Viewport was not
available and returns 0's only.

Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
---
 drivers/usb/chipidea/core.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 1a6010e..f915538 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -566,6 +566,8 @@ static int ci_hdrc_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
+	hw_phymode_configure(ci);
+
 	ret = ci_usb_phy_init(ci);
 	if (ret) {
 		dev_err(dev, "unable to init phy: %d\n", ret);
@@ -583,8 +585,6 @@ static int ci_hdrc_probe(struct platform_device *pdev)
 
 	ci_get_otg_capable(ci);
 
-	hw_phymode_configure(ci);
-
 	dr_mode = ci->platdata->dr_mode;
 	/* initialize role(s) before the interrupt is requested */
 	if (dr_mode == USB_DR_MODE_OTG || dr_mode == USB_DR_MODE_HOST) {
-- 
1.7.10.4


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

* Re: [PATCH 3/3] usb: chipidea: hw_phymode_configure moved before ci_usb_phy_init
  2013-11-29  2:08 [PATCH 3/3] usb: chipidea: hw_phymode_configure moved before ci_usb_phy_init Chris Ruehl
@ 2013-11-29  2:14 ` Fabio Estevam
  2013-11-29  2:29   ` Chris Ruehl
  2013-11-29  3:31 ` Peter Chen
  1 sibling, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2013-11-29  2:14 UTC (permalink / raw)
  To: Chris Ruehl
  Cc: Alexander Shishkin, Greg Kroah-Hartman, USB list, linux-kernel

Hi Chris,

On Fri, Nov 29, 2013 at 12:08 AM, Chris Ruehl <chris.ruehl@gtsys.com.hk> wrote:
> hw_phymode_configure configures the PORTSC registers and allow the
> following phy_inits to operate on the right parameters. This fix a problem
> where the UPLI (ISP1504) could not detected, because the Viewport was not
> available and returns 0's only.
>
> Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>

I have already fixed this issue. It is in mainline now:

commit 03779f05be6dfc48de99763f6c845a003e1e40f3
Author: Fabio Estevam <fabio.estevam@freescale.com>
Date:   Wed Aug 14 12:43:56 2013 +0300

    usb: chipidea: move hw_phymode_configure() into probe

    Currently hw_phymode_configure() is located inside hw_device_reset(), which
    only called by chipidea udc driver.

    When operating in host mode, we also need to call hw_phymode_configure() in
    order to properly configure the PHY mode, so move this function into probe.

    After this change, USB Host1 port on mx53qsb board is functional.

    Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
    Tested-by: Arnaud Patard <arnaud.patard@rtp-net.org>
    Reviewed-by: Peter Chen <peter.chen@freescale.com>
    Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Regards,

Fabio Estevam

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

* Re: [PATCH 3/3] usb: chipidea: hw_phymode_configure moved before ci_usb_phy_init
  2013-11-29  2:14 ` Fabio Estevam
@ 2013-11-29  2:29   ` Chris Ruehl
  2013-11-29  2:32     ` Fabio Estevam
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Ruehl @ 2013-11-29  2:29 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Alexander Shishkin, Greg Kroah-Hartman, USB list, linux-kernel

Hi Fabio

On Friday, November 29, 2013 10:14 AM, Fabio Estevam wrote:
> Hi Chris,
>
> On Fri, Nov 29, 2013 at 12:08 AM, Chris Ruehl<chris.ruehl@gtsys.com.hk>  wrote:
>> hw_phymode_configure configures the PORTSC registers and allow the
>> following phy_inits to operate on the right parameters. This fix a problem
>> where the UPLI (ISP1504) could not detected, because the Viewport was not
>> available and returns 0's only.
>>
>> Signed-off-by: Chris Ruehl<chris.ruehl@gtsys.com.hk>
>
> I have already fixed this issue. It is in mainline now:

yeah, the hw_phymode_configure() was in the probe but not called before the
ci_usb_phy_init(ci) which triggers the inits in phy-generic.c (in my case)

My pending patches relay on this.

Did you move the hw_phy before the ci_usb_phy_init too ?

Chris


>
> commit 03779f05be6dfc48de99763f6c845a003e1e40f3
> Author: Fabio Estevam<fabio.estevam@freescale.com>
> Date:   Wed Aug 14 12:43:56 2013 +0300
>
>      usb: chipidea: move hw_phymode_configure() into probe
>
>      Currently hw_phymode_configure() is located inside hw_device_reset(), which
>      only called by chipidea udc driver.
>
>      When operating in host mode, we also need to call hw_phymode_configure() in
>      order to properly configure the PHY mode, so move this function into probe.
>
>      After this change, USB Host1 port on mx53qsb board is functional.
>
>      Signed-off-by: Fabio Estevam<fabio.estevam@freescale.com>
>      Tested-by: Arnaud Patard<arnaud.patard@rtp-net.org>
>      Reviewed-by: Peter Chen<peter.chen@freescale.com>
>      Signed-off-by: Alexander Shishkin<alexander.shishkin@linux.intel.com>
>      Signed-off-by: Greg Kroah-Hartman<gregkh@linuxfoundation.org>
>
> Regards,
>
> Fabio Estevam

-- 
GTSYS Limited RFID Technology
A01 24/F Gold King Industrial Bld
35-41 Tai Lin Pai Road, Kwai Chung, Hong Kong
Fax (852) 8167 4060 - Tel (852) 3598 9488

Disclaimer: http://www.gtsys.com.hk/email/classified.html

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

* Re: [PATCH 3/3] usb: chipidea: hw_phymode_configure moved before ci_usb_phy_init
  2013-11-29  2:29   ` Chris Ruehl
@ 2013-11-29  2:32     ` Fabio Estevam
  0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2013-11-29  2:32 UTC (permalink / raw)
  To: Chris Ruehl
  Cc: Alexander Shishkin, Greg Kroah-Hartman, USB list, linux-kernel

On Fri, Nov 29, 2013 at 12:29 AM, Chris Ruehl <chris.ruehl@gtsys.com.hk> wrote:

> yeah, the hw_phymode_configure() was in the probe but not called before the
> ci_usb_phy_init(ci) which triggers the inits in phy-generic.c (in my case)
>
> My pending patches relay on this.
>
> Did you move the hw_phy before the ci_usb_phy_init too ?

Ah, ok. It is a different issue then. Sorry for the noise.

Regards,

Fabio Estevam

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

* RE: [PATCH 3/3] usb: chipidea: hw_phymode_configure moved before ci_usb_phy_init
  2013-11-29  2:08 [PATCH 3/3] usb: chipidea: hw_phymode_configure moved before ci_usb_phy_init Chris Ruehl
  2013-11-29  2:14 ` Fabio Estevam
@ 2013-11-29  3:31 ` Peter Chen
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Chen @ 2013-11-29  3:31 UTC (permalink / raw)
  To: Chris Ruehl, alexander.shishkin@linux.intel.com,
	gregkh@linuxfoundation.org
  Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org

 
> 
> hw_phymode_configure configures the PORTSC registers and allow the
> following phy_inits to operate on the right parameters. This fix a
> problem
> where the UPLI (ISP1504) could not detected, because the Viewport was not
> available and returns 0's only.
> 
> Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
> ---
>  drivers/usb/chipidea/core.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> index 1a6010e..f915538 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
> @@ -566,6 +566,8 @@ static int ci_hdrc_probe(struct platform_device *pdev)
>  		return -ENODEV;
>  	}
> 
> +	hw_phymode_configure(ci);
> +
>  	ret = ci_usb_phy_init(ci);
>  	if (ret) {
>  		dev_err(dev, "unable to init phy: %d\n", ret);
> @@ -583,8 +585,6 @@ static int ci_hdrc_probe(struct platform_device *pdev)
> 
>  	ci_get_otg_capable(ci);
> 
> -	hw_phymode_configure(ci);
> -
>  	dr_mode = ci->platdata->dr_mode;
>  	/* initialize role(s) before the interrupt is requested */
>  	if (dr_mode == USB_DR_MODE_OTG || dr_mode == USB_DR_MODE_HOST) {
> --
> 1.7.10.4
> 
> --

Acked-by: Peter Chen <peter.chen@freescale.com>

Peter



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

end of thread, other threads:[~2013-11-29  3:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-29  2:08 [PATCH 3/3] usb: chipidea: hw_phymode_configure moved before ci_usb_phy_init Chris Ruehl
2013-11-29  2:14 ` Fabio Estevam
2013-11-29  2:29   ` Chris Ruehl
2013-11-29  2:32     ` Fabio Estevam
2013-11-29  3:31 ` Peter Chen

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.