All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Chen <peter.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: sundeep subbaraya <sundeep.lkml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Nathan Sullivan <nathan.sullivan-acOepvfBmUk@public.gmane.org>,
	Subbaraya Sundeep Bhatta
	<sbhatta-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	pawel.moll-5wv7dgnIgG8@public.gmane.org,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
	galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	Greg Kroah-Hartman
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 1/2] usb: chipidea: add xilinx zynq platform data
Date: Thu, 27 Aug 2015 12:33:40 +0800	[thread overview]
Message-ID: <20150827043339.GA29157@shlinux2> (raw)
In-Reply-To: <CALHRZuqFtaRFNd9D=a+x2rZ2848ZOGYbTkSWCHxNPcW_NvocxA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Thu, Aug 27, 2015 at 10:59:22AM +0530, sundeep subbaraya wrote:
> Hi,
> 
> 
> On Wed, Aug 26, 2015 at 8:57 PM, Nathan Sullivan <nathan.sullivan-acOepvfBmUk@public.gmane.org> wrote:
> > The Xilinx Zynq udc does not need the CI_HDRC_DISABLE_STREAMING flag,
> > unlike the default platform data.  Add platform data specific to the
> > Zynq udc.
> >
> > Based on a patch by the same name from the Xilinx vendor tree.
> 
> I am that Xilinx guy who sent this patch :). It is in Xilinx tree as
> temporary fix and
> I did not debug further why UDC works only when streaming is enabled.
> Probably this is right time to post my question here.
> I was expecting like:
> Streaming disabled - both low bandwidth and high bandwidth systems
> should work fine
> Streaming enabled - only for high bandwidth systems
> but this is not the case, Zynq UDC works only when Streaming is enabled.
> Please correct me if I am wrong.

You are right, stream mode disabled should work at anytime.
It is so strange why zynq UDC only works when stream mode is enabled.

Peter
> 
> Thanks,
> Sundeep
> 
> >
> > Signed-off-by: Nathan Sullivan <nathan.sullivan-acOepvfBmUk@public.gmane.org>
> > ---
> >  drivers/usb/chipidea/ci_hdrc_usb2.c |   25 +++++++++++++++++++------
> >  1 file changed, 19 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c
> > index 9eae1a1..4456d2c 100644
> > --- a/drivers/usb/chipidea/ci_hdrc_usb2.c
> > +++ b/drivers/usb/chipidea/ci_hdrc_usb2.c
> > @@ -12,6 +12,7 @@
> >  #include <linux/dma-mapping.h>
> >  #include <linux/module.h>
> >  #include <linux/of.h>
> > +#include <linux/of_platform.h>
> >  #include <linux/phy/phy.h>
> >  #include <linux/platform_device.h>
> >  #include <linux/usb/chipidea.h>
> > @@ -30,18 +31,36 @@ static const struct ci_hdrc_platform_data ci_default_pdata = {
> >         .flags          = CI_HDRC_DISABLE_STREAMING,
> >  };
> >
> > +static struct ci_hdrc_platform_data ci_zynq_pdata = {
> > +       .capoffset      = DEF_CAPOFFSET,
> > +};
> > +
> > +static const struct of_device_id ci_hdrc_usb2_of_match[] = {
> > +       { .compatible = "chipidea,usb2"},
> > +       { .compatible = "xlnx,zynq-usb-2.20a", .data = &ci_zynq_pdata},
> > +       { }
> > +};
> > +MODULE_DEVICE_TABLE(of, ci_hdrc_usb2_of_match);
> > +
> >  static int ci_hdrc_usb2_probe(struct platform_device *pdev)
> >  {
> >         struct device *dev = &pdev->dev;
> >         struct ci_hdrc_usb2_priv *priv;
> >         struct ci_hdrc_platform_data *ci_pdata = dev_get_platdata(dev);
> >         int ret;
> > +       const struct of_device_id *match;
> >
> >         if (!ci_pdata) {
> >                 ci_pdata = devm_kmalloc(dev, sizeof(*ci_pdata), GFP_KERNEL);
> >                 *ci_pdata = ci_default_pdata;   /* struct copy */
> >         }
> >
> > +       match = of_match_device(ci_hdrc_usb2_of_match, &pdev->dev);
> > +       if (match && match->data) {
> > +               /* struct copy */
> > +               *ci_pdata = *(struct ci_hdrc_platform_data *)match->data;
> > +       }
> > +
> >         priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> >         if (!priv)
> >                 return -ENOMEM;
> > @@ -96,12 +115,6 @@ static int ci_hdrc_usb2_remove(struct platform_device *pdev)
> >         return 0;
> >  }
> >
> > -static const struct of_device_id ci_hdrc_usb2_of_match[] = {
> > -       { .compatible = "chipidea,usb2" },
> > -       { }
> > -};
> > -MODULE_DEVICE_TABLE(of, ci_hdrc_usb2_of_match);
> > -
> >  static struct platform_driver ci_hdrc_usb2_driver = {
> >         .probe  = ci_hdrc_usb2_probe,
> >         .remove = ci_hdrc_usb2_remove,
> > --
> > 1.7.10.4
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/

-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Peter Chen <peter.chen@freescale.com>
To: sundeep subbaraya <sundeep.lkml@gmail.com>
Cc: Nathan Sullivan <nathan.sullivan@ni.com>,
	Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>,
	<robh+dt@kernel.org>, <pawel.moll@arm.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	<ijc+devicetree@hellion.org.uk>, <galak@codeaurora.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH 1/2] usb: chipidea: add xilinx zynq platform data
Date: Thu, 27 Aug 2015 12:33:40 +0800	[thread overview]
Message-ID: <20150827043339.GA29157@shlinux2> (raw)
In-Reply-To: <CALHRZuqFtaRFNd9D=a+x2rZ2848ZOGYbTkSWCHxNPcW_NvocxA@mail.gmail.com>

On Thu, Aug 27, 2015 at 10:59:22AM +0530, sundeep subbaraya wrote:
> Hi,
> 
> 
> On Wed, Aug 26, 2015 at 8:57 PM, Nathan Sullivan <nathan.sullivan@ni.com> wrote:
> > The Xilinx Zynq udc does not need the CI_HDRC_DISABLE_STREAMING flag,
> > unlike the default platform data.  Add platform data specific to the
> > Zynq udc.
> >
> > Based on a patch by the same name from the Xilinx vendor tree.
> 
> I am that Xilinx guy who sent this patch :). It is in Xilinx tree as
> temporary fix and
> I did not debug further why UDC works only when streaming is enabled.
> Probably this is right time to post my question here.
> I was expecting like:
> Streaming disabled - both low bandwidth and high bandwidth systems
> should work fine
> Streaming enabled - only for high bandwidth systems
> but this is not the case, Zynq UDC works only when Streaming is enabled.
> Please correct me if I am wrong.

You are right, stream mode disabled should work at anytime.
It is so strange why zynq UDC only works when stream mode is enabled.

Peter
> 
> Thanks,
> Sundeep
> 
> >
> > Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com>
> > ---
> >  drivers/usb/chipidea/ci_hdrc_usb2.c |   25 +++++++++++++++++++------
> >  1 file changed, 19 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c
> > index 9eae1a1..4456d2c 100644
> > --- a/drivers/usb/chipidea/ci_hdrc_usb2.c
> > +++ b/drivers/usb/chipidea/ci_hdrc_usb2.c
> > @@ -12,6 +12,7 @@
> >  #include <linux/dma-mapping.h>
> >  #include <linux/module.h>
> >  #include <linux/of.h>
> > +#include <linux/of_platform.h>
> >  #include <linux/phy/phy.h>
> >  #include <linux/platform_device.h>
> >  #include <linux/usb/chipidea.h>
> > @@ -30,18 +31,36 @@ static const struct ci_hdrc_platform_data ci_default_pdata = {
> >         .flags          = CI_HDRC_DISABLE_STREAMING,
> >  };
> >
> > +static struct ci_hdrc_platform_data ci_zynq_pdata = {
> > +       .capoffset      = DEF_CAPOFFSET,
> > +};
> > +
> > +static const struct of_device_id ci_hdrc_usb2_of_match[] = {
> > +       { .compatible = "chipidea,usb2"},
> > +       { .compatible = "xlnx,zynq-usb-2.20a", .data = &ci_zynq_pdata},
> > +       { }
> > +};
> > +MODULE_DEVICE_TABLE(of, ci_hdrc_usb2_of_match);
> > +
> >  static int ci_hdrc_usb2_probe(struct platform_device *pdev)
> >  {
> >         struct device *dev = &pdev->dev;
> >         struct ci_hdrc_usb2_priv *priv;
> >         struct ci_hdrc_platform_data *ci_pdata = dev_get_platdata(dev);
> >         int ret;
> > +       const struct of_device_id *match;
> >
> >         if (!ci_pdata) {
> >                 ci_pdata = devm_kmalloc(dev, sizeof(*ci_pdata), GFP_KERNEL);
> >                 *ci_pdata = ci_default_pdata;   /* struct copy */
> >         }
> >
> > +       match = of_match_device(ci_hdrc_usb2_of_match, &pdev->dev);
> > +       if (match && match->data) {
> > +               /* struct copy */
> > +               *ci_pdata = *(struct ci_hdrc_platform_data *)match->data;
> > +       }
> > +
> >         priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> >         if (!priv)
> >                 return -ENOMEM;
> > @@ -96,12 +115,6 @@ static int ci_hdrc_usb2_remove(struct platform_device *pdev)
> >         return 0;
> >  }
> >
> > -static const struct of_device_id ci_hdrc_usb2_of_match[] = {
> > -       { .compatible = "chipidea,usb2" },
> > -       { }
> > -};
> > -MODULE_DEVICE_TABLE(of, ci_hdrc_usb2_of_match);
> > -
> >  static struct platform_driver ci_hdrc_usb2_driver = {
> >         .probe  = ci_hdrc_usb2_probe,
> >         .remove = ci_hdrc_usb2_remove,
> > --
> > 1.7.10.4
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/

-- 

Best Regards,
Peter Chen

  parent reply	other threads:[~2015-08-27  4:33 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 15:27 [PATCH 1/2] usb: chipidea: add xilinx zynq platform data Nathan Sullivan
2015-08-26 15:27 ` [PATCH 2/2] Documentation: bindings: add doc for zynq USB Nathan Sullivan
     [not found] ` <1440602865-30468-1-git-send-email-nathan.sullivan-acOepvfBmUk@public.gmane.org>
2015-08-27  5:29   ` [PATCH 1/2] usb: chipidea: add xilinx zynq platform data sundeep subbaraya
2015-08-27  5:29     ` sundeep subbaraya
     [not found]     ` <CALHRZuqFtaRFNd9D=a+x2rZ2848ZOGYbTkSWCHxNPcW_NvocxA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-27  4:33       ` Peter Chen [this message]
2015-08-27  4:33         ` Peter Chen
2015-08-27  7:41         ` punnaiah choudary kalluri
     [not found]           ` <CAGnW=BYMnOFTaMQJtLXZ9ckCEHs+gCOCQR0VQFfO4HP=SMHBDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-27 14:33             ` Nathan Sullivan
2015-08-27 14:33               ` Nathan Sullivan
2015-08-28  1:30               ` Peter Chen
2015-08-28  1:30                 ` Peter Chen
2015-08-28 14:42                 ` Nathan Sullivan
2015-08-28 14:42                   ` Nathan Sullivan
2015-08-31  0:40                   ` Peter Chen
2015-08-31  0:40                     ` Peter Chen
2015-08-31  3:31                     ` punnaiah choudary kalluri
2015-08-31  3:31                       ` punnaiah choudary kalluri
2015-08-31  2:28                       ` Peter Chen
2015-09-01  6:51                         ` Subbaraya Sundeep Bhatta
2015-09-23  6:58                         ` Subbaraya Sundeep Bhatta
2015-09-23  6:58                           ` Subbaraya Sundeep Bhatta
2015-09-23  7:01                         ` Subbaraya Sundeep Bhatta
2015-08-31  2:36 ` Peter Chen
2015-08-31  2:36   ` Peter Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150827043339.GA29157@shlinux2 \
    --to=peter.chen-kzfg59tc24xl57midrcfdg@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=nathan.sullivan-acOepvfBmUk@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sbhatta-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
    --cc=sundeep.lkml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.