All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Chen <hzpeterchen@gmail.com>
To: Vivek Gautam <vivek.gautam@codeaurora.org>
Cc: "Mark Rutland" <mark.rutland@arm.com>,
	"Peter Chen" <peter.chen@nxp.com>,
	"Ulf Hansson" <ulf.hansson@linaro.org>,
	"Heiko Stübner" <heiko@sntech.de>,
	"Ming Lei" <tom.leiming@gmail.com>,
	"Stephen Boyd" <stephen.boyd@linaro.org>,
	"Bjorn Andersson" <bjorn.andersson@linaro.org>,
	"Gary Bisson" <gary.bisson@boundarydevices.com>,
	"Leo Li" <pku.leo@gmail.com>,
	"Sinjan Kumar" <sinjank@codeaurora.org>,
	"Sriram Dash" <sriram.dash@nxp.com>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Joshua Clayton" <stillcompiling@gmail.com>,
	"Felipe Balbi" <felipe.balbi@linux.intel.com>,
	"Dmitry Eremin-Solenikov" <dbaryshkov@gmail.com>,
	"Dann Frazier" <dann.frazier@canonical.com>,
	"Vaibhav Hiremath" <vaibhav.hiremath@linaro.org>,
	krzk@kernel.org, "David Fisher" <david.fisher1@synopsys.com>,
	mka@chromium.org, "Alan Stern" <stern@rowland.harvard.edu>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v12 3/9] usb: separate out sysdev pointer from usb_bus
Date: Fri, 10 Feb 2017 10:42:36 +0800	[thread overview]
Message-ID: <20170210024231.GC1334@b29397-desktop> (raw)
In-Reply-To: <CAFp+6iGJxWqyingm0oszWCfyw1fkhCMFKHwe5uhRGpcYWX-XOA@mail.gmail.com>

On Thu, Feb 09, 2017 at 11:50:32AM +0530, Vivek Gautam wrote:
> Hi,
> 
> On Mon, Feb 6, 2017 at 2:43 PM, Peter Chen <peter.chen@nxp.com> wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > For xhci-hcd platform device, all the DMA parameters are not
> > configured properly, notably dma ops for dwc3 devices.
> >
> > The idea here is that you pass in the parent of_node along with
> > the child device pointer, so it would behave exactly like the
> > parent already does. The difference is that it also handles all
> > the other attributes besides the mask.
> >
> > sysdev will represent the physical device, as seen from firmware
> > or bus.Splitting the usb_bus->controller field into the
> > Linux-internal device (used for the sysfs hierarchy, for printks
> > and for power management) and a new pointer (used for DMA,
> > DT enumeration and phy lookup) probably covers all that we really
> > need.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
> > Tested-by: Baolin Wang <baolin.wang@linaro.org>
> > Tested-by: Brian Norris <briannorris@chromium.org>
> > Tested-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
> > Tested-by: Vivek Gautam <vivek.gautam@codeaurora.org>
> > Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> > Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
> > Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> > Cc: Sinjan Kumar <sinjank@codeaurora.org>
> > Cc: David Fisher <david.fisher1@synopsys.com>
> > Cc: Catalin Marinas <catalin.marinas@arm.com>
> > Cc: "Thang Q. Nguyen" <tqnguyen@apm.com>
> > Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> > Cc: Stephen Boyd <sboyd@codeaurora.org>
> > Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> > Cc: Ming Lei <tom.leiming@gmail.com>
> > Cc: Jon Masters <jcm@redhat.com>
> > Cc: Dann Frazier <dann.frazier@canonical.com>
> > Cc: Peter Chen <peter.chen@nxp.com>
> > Cc: Leo Li <pku.leo@gmail.com>
> > ---
> >  drivers/usb/core/buffer.c | 12 ++++++------
> >  drivers/usb/core/hcd.c    | 48 ++++++++++++++++++++++++++++-------------------
> >  drivers/usb/core/usb.c    | 18 +++++++++---------
> >  include/linux/usb.h       |  1 +
> >  include/linux/usb/hcd.h   |  3 +++
> >  5 files changed, 48 insertions(+), 34 deletions(-)
> 
> [snip]
> 
> > @@ -2511,8 +2512,8 @@ static void init_giveback_urb_bh(struct giveback_urb_bh *bh)
> >   * Return: On success, a pointer to the created and initialized HCD structure.
> >   * On failure (e.g. if memory is unavailable), %NULL.
> >   */
> 
> sorry for the noise, but a minor nit here.
> The comments section above explains usb_create_shared_hcd() method
> and so should be moved down to its place.

Will update it at v13

> 
> > -struct usb_hcd *usb_create_shared_hcd(const struct hc_driver *driver,
> > -               struct device *dev, const char *bus_name,
> > +struct usb_hcd *__usb_create_hcd(const struct hc_driver *driver,
> > +               struct device *sysdev, struct device *dev, const char *bus_name,
> >                 struct usb_hcd *primary_hcd)
> >  {
> >         struct usb_hcd *hcd;
> > @@ -2553,8 +2554,9 @@ struct usb_hcd *usb_create_shared_hcd(const struct hc_driver *driver,
> >
> >         usb_bus_init(&hcd->self);
> >         hcd->self.controller = dev;
> > +       hcd->self.sysdev = sysdev;
> >         hcd->self.bus_name = bus_name;
> > -       hcd->self.uses_dma = (dev->dma_mask != NULL);
> > +       hcd->self.uses_dma = (sysdev->dma_mask != NULL);
> >
> >         init_timer(&hcd->rh_timer);
> >         hcd->rh_timer.function = rh_timer_func;
> > @@ -2569,6 +2571,14 @@ struct usb_hcd *usb_create_shared_hcd(const struct hc_driver *driver,
> >                         "USB Host Controller";
> >         return hcd;
> >  }
> > +EXPORT_SYMBOL_GPL(__usb_create_hcd);
> > +
> > +struct usb_hcd *usb_create_shared_hcd(const struct hc_driver *driver,
> > +               struct device *dev, const char *bus_name,
> > +               struct usb_hcd *primary_hcd)
> > +{
> > +       return __usb_create_hcd(driver, dev, dev, bus_name, primary_hcd);
> > +}
> >  EXPORT_SYMBOL_GPL(usb_create_shared_hcd);
> 
> 
> Regards
> Vivek
> 
> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 

Best Regards,
Peter Chen

WARNING: multiple messages have this Message-ID (diff)
From: hzpeterchen@gmail.com (Peter Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v12 3/9] usb: separate out sysdev pointer from usb_bus
Date: Fri, 10 Feb 2017 10:42:36 +0800	[thread overview]
Message-ID: <20170210024231.GC1334@b29397-desktop> (raw)
In-Reply-To: <CAFp+6iGJxWqyingm0oszWCfyw1fkhCMFKHwe5uhRGpcYWX-XOA@mail.gmail.com>

On Thu, Feb 09, 2017 at 11:50:32AM +0530, Vivek Gautam wrote:
> Hi,
> 
> On Mon, Feb 6, 2017 at 2:43 PM, Peter Chen <peter.chen@nxp.com> wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > For xhci-hcd platform device, all the DMA parameters are not
> > configured properly, notably dma ops for dwc3 devices.
> >
> > The idea here is that you pass in the parent of_node along with
> > the child device pointer, so it would behave exactly like the
> > parent already does. The difference is that it also handles all
> > the other attributes besides the mask.
> >
> > sysdev will represent the physical device, as seen from firmware
> > or bus.Splitting the usb_bus->controller field into the
> > Linux-internal device (used for the sysfs hierarchy, for printks
> > and for power management) and a new pointer (used for DMA,
> > DT enumeration and phy lookup) probably covers all that we really
> > need.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
> > Tested-by: Baolin Wang <baolin.wang@linaro.org>
> > Tested-by: Brian Norris <briannorris@chromium.org>
> > Tested-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
> > Tested-by: Vivek Gautam <vivek.gautam@codeaurora.org>
> > Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> > Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
> > Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> > Cc: Sinjan Kumar <sinjank@codeaurora.org>
> > Cc: David Fisher <david.fisher1@synopsys.com>
> > Cc: Catalin Marinas <catalin.marinas@arm.com>
> > Cc: "Thang Q. Nguyen" <tqnguyen@apm.com>
> > Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> > Cc: Stephen Boyd <sboyd@codeaurora.org>
> > Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> > Cc: Ming Lei <tom.leiming@gmail.com>
> > Cc: Jon Masters <jcm@redhat.com>
> > Cc: Dann Frazier <dann.frazier@canonical.com>
> > Cc: Peter Chen <peter.chen@nxp.com>
> > Cc: Leo Li <pku.leo@gmail.com>
> > ---
> >  drivers/usb/core/buffer.c | 12 ++++++------
> >  drivers/usb/core/hcd.c    | 48 ++++++++++++++++++++++++++++-------------------
> >  drivers/usb/core/usb.c    | 18 +++++++++---------
> >  include/linux/usb.h       |  1 +
> >  include/linux/usb/hcd.h   |  3 +++
> >  5 files changed, 48 insertions(+), 34 deletions(-)
> 
> [snip]
> 
> > @@ -2511,8 +2512,8 @@ static void init_giveback_urb_bh(struct giveback_urb_bh *bh)
> >   * Return: On success, a pointer to the created and initialized HCD structure.
> >   * On failure (e.g. if memory is unavailable), %NULL.
> >   */
> 
> sorry for the noise, but a minor nit here.
> The comments section above explains usb_create_shared_hcd() method
> and so should be moved down to its place.

Will update it at v13

> 
> > -struct usb_hcd *usb_create_shared_hcd(const struct hc_driver *driver,
> > -               struct device *dev, const char *bus_name,
> > +struct usb_hcd *__usb_create_hcd(const struct hc_driver *driver,
> > +               struct device *sysdev, struct device *dev, const char *bus_name,
> >                 struct usb_hcd *primary_hcd)
> >  {
> >         struct usb_hcd *hcd;
> > @@ -2553,8 +2554,9 @@ struct usb_hcd *usb_create_shared_hcd(const struct hc_driver *driver,
> >
> >         usb_bus_init(&hcd->self);
> >         hcd->self.controller = dev;
> > +       hcd->self.sysdev = sysdev;
> >         hcd->self.bus_name = bus_name;
> > -       hcd->self.uses_dma = (dev->dma_mask != NULL);
> > +       hcd->self.uses_dma = (sysdev->dma_mask != NULL);
> >
> >         init_timer(&hcd->rh_timer);
> >         hcd->rh_timer.function = rh_timer_func;
> > @@ -2569,6 +2571,14 @@ struct usb_hcd *usb_create_shared_hcd(const struct hc_driver *driver,
> >                         "USB Host Controller";
> >         return hcd;
> >  }
> > +EXPORT_SYMBOL_GPL(__usb_create_hcd);
> > +
> > +struct usb_hcd *usb_create_shared_hcd(const struct hc_driver *driver,
> > +               struct device *dev, const char *bus_name,
> > +               struct usb_hcd *primary_hcd)
> > +{
> > +       return __usb_create_hcd(driver, dev, dev, bus_name, primary_hcd);
> > +}
> >  EXPORT_SYMBOL_GPL(usb_create_shared_hcd);
> 
> 
> Regards
> Vivek
> 
> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 

Best Regards,
Peter Chen

  reply	other threads:[~2017-02-10  2:42 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-06  9:13 [PATCH v12 0/9] power: add power sequence library Peter Chen
2017-02-06  9:13 ` Peter Chen
2017-02-06  9:13 ` Peter Chen
2017-02-06  9:13 ` [PATCH v12 1/9] binding-doc: power: pwrseq-generic: add binding doc for generic " Peter Chen
2017-02-06  9:13   ` Peter Chen
2017-02-06  9:13   ` Peter Chen
2017-02-06  9:13 ` [PATCH v12 2/9] power: add " Peter Chen
2017-02-06  9:13   ` Peter Chen
2017-02-06  9:13   ` Peter Chen
2017-02-06  9:13 ` [PATCH v12 3/9] usb: separate out sysdev pointer from usb_bus Peter Chen
2017-02-06  9:13   ` Peter Chen
2017-02-06  9:13   ` Peter Chen
2017-02-09  6:20   ` Vivek Gautam
2017-02-09  6:20     ` Vivek Gautam
2017-02-09  6:20     ` Vivek Gautam
2017-02-10  2:42     ` Peter Chen [this message]
2017-02-10  2:42       ` Peter Chen
2017-02-06  9:13 ` [PATCH v12 4/9] usb: chipidea: use bus->sysdev for DMA configuration Peter Chen
2017-02-06  9:13   ` Peter Chen
2017-02-06  9:13   ` Peter Chen
2017-02-06  9:13 ` [PATCH v12 5/9] usb: ehci: fsl: " Peter Chen
2017-02-06  9:13   ` Peter Chen
2017-02-06  9:13   ` Peter Chen
2017-02-06  9:13 ` [PATCH v12 6/9] usb: xhci: " Peter Chen
2017-02-06  9:13   ` Peter Chen
2017-02-06  9:13   ` Peter Chen
2017-02-08 11:57   ` Vivek Gautam
2017-02-08 11:57     ` Vivek Gautam
2017-02-08 11:57     ` Vivek Gautam
2017-02-09  1:45     ` Peter Chen
2017-02-09  1:45       ` Peter Chen
2017-02-09  1:45       ` Peter Chen
2017-02-08 20:43   ` Jack Pham
2017-02-08 20:43     ` Jack Pham
2017-02-08 20:43     ` Jack Pham
2017-02-09  1:41     ` Peter Chen
2017-02-09  1:41       ` Peter Chen
2017-02-09  1:41       ` Peter Chen
2017-02-09  6:15       ` Vivek Gautam
2017-02-09  6:15         ` Vivek Gautam
2017-02-09  6:15         ` Vivek Gautam
2017-02-09 11:53     ` Roger Quadros
2017-02-09 11:53       ` Roger Quadros
2017-02-09 11:53       ` Roger Quadros
2017-02-09 11:54       ` Roger Quadros
2017-02-09 11:54         ` Roger Quadros
2017-02-09 11:54         ` Roger Quadros
2017-02-09 12:10         ` Vivek Gautam
2017-02-09 12:10           ` Vivek Gautam
2017-02-09 12:10           ` Vivek Gautam
2017-02-10  1:40           ` Peter Chen
2017-02-10  1:40             ` Peter Chen
2017-02-10  1:40             ` Peter Chen
2017-02-09 12:08       ` Vivek Gautam
2017-02-09 12:08         ` Vivek Gautam
2017-02-09 12:08         ` Vivek Gautam
2017-02-06  9:13 ` [PATCH v12 7/9] usb: ehci: " Peter Chen
2017-02-06  9:13   ` Peter Chen
2017-02-06  9:13   ` Peter Chen
2017-02-06  9:13 ` [PATCH v12 8/9] binding-doc: usb: usb-device: add optional properties for power sequence Peter Chen
2017-02-06  9:13   ` Peter Chen
2017-02-06  9:13   ` Peter Chen
2017-02-06  9:13 ` [PATCH v12 9/9] usb: core: add power sequence handling for USB devices Peter Chen
2017-02-06  9:13   ` Peter Chen
2017-02-06  9:13   ` 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=20170210024231.GC1334@b29397-desktop \
    --to=hzpeterchen@gmail.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=dann.frazier@canonical.com \
    --cc=david.fisher1@synopsys.com \
    --cc=dbaryshkov@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=felipe.balbi@linux.intel.com \
    --cc=festevam@gmail.com \
    --cc=gary.bisson@boundarydevices.com \
    --cc=heiko@sntech.de \
    --cc=krzk@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mka@chromium.org \
    --cc=peter.chen@nxp.com \
    --cc=pku.leo@gmail.com \
    --cc=sinjank@codeaurora.org \
    --cc=sriram.dash@nxp.com \
    --cc=stephen.boyd@linaro.org \
    --cc=stern@rowland.harvard.edu \
    --cc=stillcompiling@gmail.com \
    --cc=tom.leiming@gmail.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vaibhav.hiremath@linaro.org \
    --cc=vivek.gautam@codeaurora.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.