From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Subject: Re: [PATCH 10/14] tegra: usb: Add support for USB peripheral Date: Mon, 12 Dec 2011 11:18:50 -0700 Message-ID: <4EE6458A.5090203@nvidia.com> References: <1322106896-23054-2-git-send-email-sjg@chromium.org> <1322106896-23054-11-git-send-email-sjg@chromium.org> <4ED3DF1D.6080009@nvidia.com> <4EDD38AC.30908@nvidia.com> <4EDD429E.8010507@nvidia.com> <4EDD5F1B.5060205@nvidia.com> <4EDE7E1C.2090203@nvidia.com> <4EDFFAC5.5070002@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Simon Glass Cc: Remy Bohmer , U-Boot Mailing List , devicetree-discuss , Tom Warren , Albert ARIBAUD List-Id: devicetree@vger.kernel.org On 12/08/2011 02:24 PM, Simon Glass wrote: > On Wed, Dec 7, 2011 at 3:46 PM, Stephen Warren wrote: >> On 12/06/2011 02:23 PM, Simon Glass wrote: ... >> I think the best implementation would be to enumerate everything solely >> based on compatible flags, and allowing "usb start" to accept either an >> alias name (which would be fixed) or a DT unit address or node name >> (which would be fixed) or a controller index (which might vary based on >> enumeration order) to select the controller. >> >> The next best implementation would be to enumerate solely based on >> compatible flags, then sort the list based on alias, thus allowing alias >> to cause a static order. >> >> However, enumerating based on alias, then enumerating based on >> compatible flags and adding any missing nodes would be fine. > > Well ok. Since this is basically a small *addition* to the code > (scanning things that don't have an alias), and will have no effect > with the device tree as included in this series, I would like to do > this as a follow-on patch after the series. I hope you can live with > that also? I suppose it'll have to do. It's totally the wrong way to go about it though, and will provide a bad example that'll probably end up proliferating itself through the code since it's the first example. In other words rather than: Now: Scan /aliases for USB, add then all. Later: Scan device nodes for any that weren't in /aliases, add them all I'd prefer to see: Now: Scan /aliases for USB, add then all. Later: Remove all the /aliases scanning code, fix the code to scan all child nodes of the SoC node, find all nodes matching the USB compatible flag, add them all. While adding a USB controller, check the /alias node and honor any alias there if there is one. -- nvpublic From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Mon, 12 Dec 2011 11:18:50 -0700 Subject: [U-Boot] [PATCH 10/14] tegra: usb: Add support for USB peripheral In-Reply-To: References: <1322106896-23054-2-git-send-email-sjg@chromium.org> <1322106896-23054-11-git-send-email-sjg@chromium.org> <4ED3DF1D.6080009@nvidia.com> <4EDD38AC.30908@nvidia.com> <4EDD429E.8010507@nvidia.com> <4EDD5F1B.5060205@nvidia.com> <4EDE7E1C.2090203@nvidia.com> <4EDFFAC5.5070002@nvidia.com> Message-ID: <4EE6458A.5090203@nvidia.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 12/08/2011 02:24 PM, Simon Glass wrote: > On Wed, Dec 7, 2011 at 3:46 PM, Stephen Warren wrote: >> On 12/06/2011 02:23 PM, Simon Glass wrote: ... >> I think the best implementation would be to enumerate everything solely >> based on compatible flags, and allowing "usb start" to accept either an >> alias name (which would be fixed) or a DT unit address or node name >> (which would be fixed) or a controller index (which might vary based on >> enumeration order) to select the controller. >> >> The next best implementation would be to enumerate solely based on >> compatible flags, then sort the list based on alias, thus allowing alias >> to cause a static order. >> >> However, enumerating based on alias, then enumerating based on >> compatible flags and adding any missing nodes would be fine. > > Well ok. Since this is basically a small *addition* to the code > (scanning things that don't have an alias), and will have no effect > with the device tree as included in this series, I would like to do > this as a follow-on patch after the series. I hope you can live with > that also? I suppose it'll have to do. It's totally the wrong way to go about it though, and will provide a bad example that'll probably end up proliferating itself through the code since it's the first example. In other words rather than: Now: Scan /aliases for USB, add then all. Later: Scan device nodes for any that weren't in /aliases, add them all I'd prefer to see: Now: Scan /aliases for USB, add then all. Later: Remove all the /aliases scanning code, fix the code to scan all child nodes of the SoC node, find all nodes matching the USB compatible flag, add them all. While adding a USB controller, check the /alias node and honor any alias there if there is one. -- nvpublic