From: Peter Chen <hzpeterchen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Felipe Balbi <balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>,
Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Peter Chen <peter.chen-3arQi8VN3Tc@public.gmane.org>,
Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>,
stephen.boyd-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
frank.li-3arQi8VN3Tc@public.gmane.org,
Linux Kernel Mailing List
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
gary.bisson-Q5RJGjKts06CY9SHAMCTRUEOCMrvLtNR@public.gmane.org,
Vivek Gautam
<vivek.gautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Sriram Dash <sriram.dash-3arQi8VN3Tc@public.gmane.org>,
festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
stillcompiling-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
vaibhav.hiremath-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
Krzysztof Kozlowski
<krzk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
mka-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
mail-APzI5cXaD1zVlRWJc41N0YvC60bnQu0Y@public.gmane.org,
pawel.moll-5wv7dgnIgG8@public.gmane.org,
linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
troy.kisky-Q5RJGjKts06CY9SHAMCTRUEOCMrvLtNR@public.gmane.org,
Rob
Subject: Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration
Date: Thu, 16 Feb 2017 09:23:07 +0800 [thread overview]
Message-ID: <20170216012307.GA30290@b29397-desktop> (raw)
In-Reply-To: <87mvdnoenw.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
On Wed, Feb 15, 2017 at 01:51:31PM +0200, Felipe Balbi wrote:
>
> Hi,
>
> Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org> writes:
> >>>>>>>> Why are we using sysdev to read DT property? We should be using the
> >>>>>>>> XHCI device (&pdev->dev) here, no?
> >>>>>>>
> >>>>>>> If I remember correctly, this is one of the cases where pdev does not
> >>>>>>> have a device node attached to it because it was created by the driver
> >>>>>>> of the parent device on the fly in case of dwc3. When you have a pure xhci
> >>>>>>> device in DT, the two pointers are the same.
> >>>>>>
> >>>>>> From drivers/usb/dwc3/host.c
> >>>>>>
> >>>>>>> if (dwc->usb3_lpm_capable) {
> >>>>>>> props[0].name = "usb3-lpm-capable";
> >>>>>>> ret = platform_device_add_properties(xhci, props);
> >>>>>>> if (ret) {
> >>>>>>> dev_err(dwc->dev, "failed to add properties to xHCI\n");
> >>>>>>> goto err1;
> >>>>>>> }
> >>>>>>> }
> >>>>>>
> >>>>>> So it is setting the usb3-lpm-capable property into the xhci platform device
> >>>>>> and we should be reading the property from there.
> >>>>
> >>>> Why dwc3 needs another "snps,usb3_lpm_capable"? Why not using
> >>>> "usb3-lpm-capable" at firmware directly?
> >>>
> >>> dwc3 is not setting "snps,usb3_lpm_capable" but "usb3-lpm-capable" for the
> >>> xhci platform device.
> >>>
> >>> What did you mean by firmware? Did you mean something like BIOS?
> >>> At least TI platforms don't use any firmware like BIOS. So dwc3 driver
> >>> needs to create a platform device for xhci on the fly and set the DT properties.
> >>>
> >>
> >> By readying code, the dwc3 calls dwc3_get_properties to set
> >> dwc->usb3_lpm_capable, and at dwc3/host.c, it sets property
> >> "usb3-lpm-capable" according to this flag, why not let common
> >> code xhci-plat.c to get this property from sysdev which is DT
> >> nodes for dwc3?
> >>
> >
> > Felipe, any comments?
>
> Won't work. We have quirk flags which are based on DWC3's revision which
> is not accessible by xhci-plat. Also, we can't call
> device_add_property() because it's not really *adding*. It's *setting*,
> meaning that we would loose all other properties.
>
Sorry, I am not clear by reading the code, here we just discuss
"usb3-lpm-capable" property from DT or other firmwares.
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-02-16 1:23 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-11 1:27 [PATCH v13 00/12] power: add power sequence library Peter Chen
2017-02-11 1:27 ` [PATCH v13 01/12] binding-doc: power: pwrseq-generic: add binding doc for generic " Peter Chen
2017-02-11 1:27 ` [PATCH v13 02/12] power: add " Peter Chen
2017-02-11 1:27 ` [PATCH v13 03/12] usb: separate out sysdev pointer from usb_bus Peter Chen
2017-02-11 1:27 ` [PATCH v13 04/12] usb: chipidea: use bus->sysdev for DMA configuration Peter Chen
[not found] ` <1486776443-2280-1-git-send-email-peter.chen-3arQi8VN3Tc@public.gmane.org>
2017-02-11 1:27 ` [PATCH v13 05/12] usb: ehci: fsl: " Peter Chen
2017-02-13 12:22 ` [PATCH v13 00/12] power: add power sequence library Rafael J. Wysocki
2017-02-11 1:27 ` [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration Peter Chen
2017-02-13 8:25 ` Alexander Sverdlin
2017-02-14 5:33 ` Vivek Gautam
2017-02-14 10:36 ` Roger Quadros
2017-02-14 11:44 ` Arnd Bergmann
2017-02-14 12:26 ` Roger Quadros
2017-02-14 12:58 ` Arnd Bergmann
2017-02-15 1:35 ` Peter Chen
2017-02-15 8:18 ` Roger Quadros
[not found] ` <cb3ee971-6d97-fff1-64f7-1b527559b047-l0cyMroinI0@public.gmane.org>
2017-02-15 8:51 ` Peter Chen
2017-02-15 10:10 ` Roger Quadros
2017-02-15 11:51 ` Felipe Balbi
[not found] ` <87mvdnoenw.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-02-16 1:23 ` Peter Chen [this message]
2017-02-11 1:27 ` [PATCH v13 07/12] usb: ehci: " Peter Chen
2017-02-11 1:27 ` [PATCH v13 08/12] binding-doc: usb: usb-device: add optional properties for power sequence Peter Chen
2017-02-11 1:27 ` [PATCH v13 09/12] usb: core: add power sequence handling for USB devices Peter Chen
2017-02-11 1:27 ` [PATCH v13 10/12] ARM: dts: imx6qdl: Enable usb node children with <reg> Peter Chen
2017-02-11 1:27 ` [PATCH v13 11/12] ARM: dts: imx6qdl-udoo.dtsi: fix onboard USB HUB property Peter Chen
2017-02-11 1:27 ` [PATCH v13 12/12] ARM: dts: imx6q-evi: Fix onboard hub reset line Peter Chen
2017-02-14 10:21 ` [PATCH v13 00/12] power: add power sequence library Roger Quadros
2017-02-15 1:38 ` Peter Chen
2017-05-16 17:28 ` Krzysztof Kozlowski
2017-05-17 1:18 ` 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=20170216012307.GA30290@b29397-desktop \
--to=hzpeterchen-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=frank.li-3arQi8VN3Tc@public.gmane.org \
--cc=gary.bisson-Q5RJGjKts06CY9SHAMCTRUEOCMrvLtNR@public.gmane.org \
--cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
--cc=krzk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mail-APzI5cXaD1zVlRWJc41N0YvC60bnQu0Y@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=mka-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=peter.chen-3arQi8VN3Tc@public.gmane.org \
--cc=rogerq-l0cyMroinI0@public.gmane.org \
--cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=sriram.dash-3arQi8VN3Tc@public.gmane.org \
--cc=stephen.boyd-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org \
--cc=stillcompiling-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=troy.kisky-Q5RJGjKts06CY9SHAMCTRUEOCMrvLtNR@public.gmane.org \
--cc=ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=vaibhav.hiremath-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=vivek.gautam-sgV2jX0FEOL9JmXXK+q4OQ@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).