Re: [PATCH v3 10/10] usb: chipidea: imx: Enable CI_HDRC_IMX_EHCI_QUIRK

2013-12-04 Thread Peter Chen
On Wed, Dec 04, 2013 at 09:33:26AM +0100, Marc Kleine-Budde wrote:
> On 12/04/2013 02:40 AM, Peter Chen wrote:
> > There are some re-work for this serial, I will do it.
> > But I don't get your mean why it needs to squash into another patch?
> 
> Let's look at the code again:
> 
> > -   if (imx_platform_flag->flags & CI_HDRC_IMX_SUPPORT_RUNTIME_PM)
> > +   if (imx_platform_flag->flags & CI_HDRC_IMX_SUPPORT_RUNTIME_PM) {
> > pdata.flags |= CI_HDRC_SUPPORTS_RUNTIME_PM;
> > data->supports_runtime_pm = true;
> > }
> 
> Without that patch, the driver will not compile.
> 
> before:
> 
> if ()
>   /* code */
> }
> 
> after:
> 
> if () {
>   /* code */
> }
> 
> Marc
> 
> -- 

Oh, thanks. I need to sqhash [7/10] and [10/10]

-- 

Best Regards,
Peter Chen

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 10/10] usb: chipidea: imx: Enable CI_HDRC_IMX_EHCI_QUIRK

2013-12-04 Thread Marc Kleine-Budde
On 12/04/2013 02:40 AM, Peter Chen wrote:
> There are some re-work for this serial, I will do it.
> But I don't get your mean why it needs to squash into another patch?

Let's look at the code again:

> - if (imx_platform_flag->flags & CI_HDRC_IMX_SUPPORT_RUNTIME_PM)
> + if (imx_platform_flag->flags & CI_HDRC_IMX_SUPPORT_RUNTIME_PM) {
>   pdata.flags |= CI_HDRC_SUPPORTS_RUNTIME_PM;
>   data->supports_runtime_pm = true;
>   }

Without that patch, the driver will not compile.

before:

if ()
/* code */
}

after:

if () {
/* code */
}

Marc

-- 
Pengutronix e.K.  | Marc Kleine-Budde   |
Industrial Linux Solutions| Phone: +49-231-2826-924 |
Vertretung West/Dortmund  | Fax:   +49-5121-206917- |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |



signature.asc
Description: OpenPGP digital signature


RE: [PATCH v3 10/10] usb: chipidea: imx: Enable CI_HDRC_IMX_EHCI_QUIRK

2013-12-03 Thread Peter Chen

 
> 
> On 11/05/2013 02:55 AM, Peter Chen wrote:
> > Enable CI_HDRC_IMX_EHCI_QUIRK for controllers who use mxs-phy.
> >
> > Signed-off-by: Peter Chen 
> > ---
> >  drivers/usb/chipidea/ci_hdrc_imx.c |   17 ++---
> >  1 files changed, 14 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c
> b/drivers/usb/chipidea/ci_hdrc_imx.c
> > index fd26c38..78ccde1 100644
> > --- a/drivers/usb/chipidea/ci_hdrc_imx.c
> > +++ b/drivers/usb/chipidea/ci_hdrc_imx.c
> > @@ -25,6 +25,7 @@
> >
> >  #define CI_HDRC_IMX_IMX28_WRITE_FIXBIT(0)
> >  #define CI_HDRC_IMX_SUPPORT_RUNTIME_PM BIT(1)
> > +#define CI_HDRC_IMX_MXS_PHY_EHCI_QUIRK BIT(2)
> >
> >  struct ci_hdrc_imx_platform_flag {
> > unsigned int flags;
> > @@ -33,17 +34,24 @@ struct ci_hdrc_imx_platform_flag {
> >  static const struct ci_hdrc_imx_platform_flag imx27_usb_data = {
> >  };
> >
> > +static const struct ci_hdrc_imx_platform_flag imx23_usb_data = {
> > +   .flags = CI_HDRC_IMX_MXS_PHY_EHCI_QUIRK,
> > +};
> > +
> >  static const struct ci_hdrc_imx_platform_flag imx28_usb_data = {
> > -   .flags = CI_HDRC_IMX_IMX28_WRITE_FIX,
> > +   .flags = CI_HDRC_IMX_IMX28_WRITE_FIX |
> > +   CI_HDRC_IMX_MXS_PHY_EHCI_QUIRK,
> >  };
> >
> >  static const struct ci_hdrc_imx_platform_flag imx6q_usb_data = {
> > -   .flags = CI_HDRC_IMX_SUPPORT_RUNTIME_PM,
> > +   .flags = CI_HDRC_IMX_SUPPORT_RUNTIME_PM |
> > +   CI_HDRC_IMX_MXS_PHY_EHCI_QUIRK,
> >  };
> >
> >  static const struct of_device_id ci_hdrc_imx_dt_ids[] = {
> > { .compatible = "fsl,imx6q-usb", .data = &imx6q_usb_data},
> > { .compatible = "fsl,imx28-usb", .data = &imx28_usb_data},
> > +   { .compatible = "fsl,imx23-usb", .data = &imx23_usb_data},
> > { .compatible = "fsl,imx27-usb", .data = &imx27_usb_data},
> > { /* sentinel */ }
> >  };
> > @@ -153,11 +161,14 @@ static int ci_hdrc_imx_probe(struct
> platform_device *pdev)
> > if (imx_platform_flag->flags & CI_HDRC_IMX_IMX28_WRITE_FIX)
> > pdata.flags |= CI_HDRC_IMX28_WRITE_FIX;
> >
> > -   if (imx_platform_flag->flags & CI_HDRC_IMX_SUPPORT_RUNTIME_PM)
> > +   if (imx_platform_flag->flags & CI_HDRC_IMX_SUPPORT_RUNTIME_PM) {
> 
> 
> Please squash into the correct patch.
> 
 
There are some re-work for this serial, I will do it.
But I don't get your mean why it needs to squash into another patch?

Peter



Re: [PATCH v3 10/10] usb: chipidea: imx: Enable CI_HDRC_IMX_EHCI_QUIRK

2013-12-03 Thread Marc Kleine-Budde
On 11/05/2013 02:55 AM, Peter Chen wrote:
> Enable CI_HDRC_IMX_EHCI_QUIRK for controllers who use mxs-phy.
> 
> Signed-off-by: Peter Chen 
> ---
>  drivers/usb/chipidea/ci_hdrc_imx.c |   17 ++---
>  1 files changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c 
> b/drivers/usb/chipidea/ci_hdrc_imx.c
> index fd26c38..78ccde1 100644
> --- a/drivers/usb/chipidea/ci_hdrc_imx.c
> +++ b/drivers/usb/chipidea/ci_hdrc_imx.c
> @@ -25,6 +25,7 @@
>  
>  #define CI_HDRC_IMX_IMX28_WRITE_FIX  BIT(0)
>  #define CI_HDRC_IMX_SUPPORT_RUNTIME_PM   BIT(1)
> +#define CI_HDRC_IMX_MXS_PHY_EHCI_QUIRK   BIT(2)
>  
>  struct ci_hdrc_imx_platform_flag {
>   unsigned int flags;
> @@ -33,17 +34,24 @@ struct ci_hdrc_imx_platform_flag {
>  static const struct ci_hdrc_imx_platform_flag imx27_usb_data = {
>  };
>  
> +static const struct ci_hdrc_imx_platform_flag imx23_usb_data = {
> + .flags = CI_HDRC_IMX_MXS_PHY_EHCI_QUIRK,
> +};
> +
>  static const struct ci_hdrc_imx_platform_flag imx28_usb_data = {
> - .flags = CI_HDRC_IMX_IMX28_WRITE_FIX,
> + .flags = CI_HDRC_IMX_IMX28_WRITE_FIX |
> + CI_HDRC_IMX_MXS_PHY_EHCI_QUIRK,
>  };
>  
>  static const struct ci_hdrc_imx_platform_flag imx6q_usb_data = {
> - .flags = CI_HDRC_IMX_SUPPORT_RUNTIME_PM,
> + .flags = CI_HDRC_IMX_SUPPORT_RUNTIME_PM |
> + CI_HDRC_IMX_MXS_PHY_EHCI_QUIRK,
>  };
>  
>  static const struct of_device_id ci_hdrc_imx_dt_ids[] = {
>   { .compatible = "fsl,imx6q-usb", .data = &imx6q_usb_data},
>   { .compatible = "fsl,imx28-usb", .data = &imx28_usb_data},
> + { .compatible = "fsl,imx23-usb", .data = &imx23_usb_data},
>   { .compatible = "fsl,imx27-usb", .data = &imx27_usb_data},
>   { /* sentinel */ }
>  };
> @@ -153,11 +161,14 @@ static int ci_hdrc_imx_probe(struct platform_device 
> *pdev)
>   if (imx_platform_flag->flags & CI_HDRC_IMX_IMX28_WRITE_FIX)
>   pdata.flags |= CI_HDRC_IMX28_WRITE_FIX;
>  
> - if (imx_platform_flag->flags & CI_HDRC_IMX_SUPPORT_RUNTIME_PM)
> + if (imx_platform_flag->flags & CI_HDRC_IMX_SUPPORT_RUNTIME_PM) {


Please squash into the correct patch.

>   pdata.flags |= CI_HDRC_SUPPORTS_RUNTIME_PM;
>   data->supports_runtime_pm = true;
>   }

Marc
-- 
Pengutronix e.K.  | Marc Kleine-Budde   |
Industrial Linux Solutions| Phone: +49-231-2826-924 |
Vertretung West/Dortmund  | Fax:   +49-5121-206917- |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |



signature.asc
Description: OpenPGP digital signature


[PATCH v3 10/10] usb: chipidea: imx: Enable CI_HDRC_IMX_EHCI_QUIRK

2013-11-04 Thread Peter Chen
Enable CI_HDRC_IMX_EHCI_QUIRK for controllers who use mxs-phy.

Signed-off-by: Peter Chen 
---
 drivers/usb/chipidea/ci_hdrc_imx.c |   17 ++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c 
b/drivers/usb/chipidea/ci_hdrc_imx.c
index fd26c38..78ccde1 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -25,6 +25,7 @@
 
 #define CI_HDRC_IMX_IMX28_WRITE_FIXBIT(0)
 #define CI_HDRC_IMX_SUPPORT_RUNTIME_PM BIT(1)
+#define CI_HDRC_IMX_MXS_PHY_EHCI_QUIRK BIT(2)
 
 struct ci_hdrc_imx_platform_flag {
unsigned int flags;
@@ -33,17 +34,24 @@ struct ci_hdrc_imx_platform_flag {
 static const struct ci_hdrc_imx_platform_flag imx27_usb_data = {
 };
 
+static const struct ci_hdrc_imx_platform_flag imx23_usb_data = {
+   .flags = CI_HDRC_IMX_MXS_PHY_EHCI_QUIRK,
+};
+
 static const struct ci_hdrc_imx_platform_flag imx28_usb_data = {
-   .flags = CI_HDRC_IMX_IMX28_WRITE_FIX,
+   .flags = CI_HDRC_IMX_IMX28_WRITE_FIX |
+   CI_HDRC_IMX_MXS_PHY_EHCI_QUIRK,
 };
 
 static const struct ci_hdrc_imx_platform_flag imx6q_usb_data = {
-   .flags = CI_HDRC_IMX_SUPPORT_RUNTIME_PM,
+   .flags = CI_HDRC_IMX_SUPPORT_RUNTIME_PM |
+   CI_HDRC_IMX_MXS_PHY_EHCI_QUIRK,
 };
 
 static const struct of_device_id ci_hdrc_imx_dt_ids[] = {
{ .compatible = "fsl,imx6q-usb", .data = &imx6q_usb_data},
{ .compatible = "fsl,imx28-usb", .data = &imx28_usb_data},
+   { .compatible = "fsl,imx23-usb", .data = &imx23_usb_data},
{ .compatible = "fsl,imx27-usb", .data = &imx27_usb_data},
{ /* sentinel */ }
 };
@@ -153,11 +161,14 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
if (imx_platform_flag->flags & CI_HDRC_IMX_IMX28_WRITE_FIX)
pdata.flags |= CI_HDRC_IMX28_WRITE_FIX;
 
-   if (imx_platform_flag->flags & CI_HDRC_IMX_SUPPORT_RUNTIME_PM)
+   if (imx_platform_flag->flags & CI_HDRC_IMX_SUPPORT_RUNTIME_PM) {
pdata.flags |= CI_HDRC_SUPPORTS_RUNTIME_PM;
data->supports_runtime_pm = true;
}
 
+   if (imx_platform_flag->flags & CI_HDRC_IMX_MXS_PHY_EHCI_QUIRK)
+   pdata.flags |= CI_HDRC_IMX_EHCI_QUIRK;
+
if (data->usbmisc_data) {
ret = imx_usbmisc_init(data->usbmisc_data);
if (ret) {
-- 
1.7.1


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html