From: Stephen Warren <swarren@nvidia.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 10/14] tegra: usb: Add support for USB peripheral
Date: Tue, 06 Dec 2011 13:42:04 -0700 [thread overview]
Message-ID: <4EDE7E1C.2090203@nvidia.com> (raw)
In-Reply-To: <CAPnjgZ2h7F228q=pXuf7M9vTASurY3R5an_QV-mrETLf8nzA1A@mail.gmail.com>
On 12/05/2011 06:14 PM, Simon Glass wrote:
> Hi Stephen,
>
> On Mon, Dec 5, 2011 at 4:17 PM, Stephen Warren <swarren@nvidia.com> wrote:
>> On 12/05/2011 04:35 PM, Simon Glass wrote:
...
>> I'd really like to avoid adding stuff to the .dts file when we know we
>> going to rip it out again ASAP. I'd prefer to incrementally enhance the
>> .dts bindings always moving forward, and never removing/breaking stuff
>> if possible.
>>
>> Now you did point out that the .dts files are currently in U-Boot, so
>> this is slightly moot since the binding documentation, .dts file and
>> driver can all be rev'd in sync. However, I hope this will change soon.
>> Otherwise, every addition to them means changing U-Boot, the Linux
>> kernel, U-Boot v2, fastboot, quick boot, .....
>
> OK well I can remove the USB params and put in the C file with an
> #ifdef for T30. Ick.
There's no T30 support in mainline U-Boot, so I think you can avoid any
ifdefs.
>>> Also the only way I can see it being hard-coded is by the kernel
>>> looking at the peripheral address and converting this to an ID. That
>>> seems really ugly to me. Or am I missing something?
>>
>> Well, the Tegra SD/MMC driver works exactly that way (well, mapping an
>> instance ID to both base address and periph ID), so there's certainly
>> precedent for this. And that driver is not unique.
>
> I don't know if I can NAK a comment but I would like to NAK this one.
I don't know what that means; that you believe my statement is
incorrect, or you don't like the argument I'm basing on it or ...?
>>>>> At present we do:
>>>>>
>>>>> 'usb start 0'
>>>>> 'usb start 1'
>>>>>
>>>>> to select between the ports. There is a patch in the works to change
>>>>> that but it hasn't gone upstream yet, or at least wasn't accepted.
>>>> Can you point out the patch that changes this, and what exactly it
>>>> changes. Hopefully it removes the parameter from the "usb start" command.
>>>
>>> Yes, they are in the Chromium tree:
>>>
>>> https://gerrit.chromium.org/gerrit/#change,4951
>>> https://gerrit.chromium.org/gerrit/#change,4981
>>
>> OK, those look interesting, at least from the commit descriptions. I'd
>> assert they really should be upstreamed before or as part of the Tegra
>> USB driver addition, since it makes the whole /aliases thing completely
>> irrelevant for USB.
>
> No, that needs to be decoupled from this in my view. That is a large
> and invasive change which is AFAIK only useful for Tegra. It's not at
> all clear it will be accepted.
Surely it's useful for any SoC that has multiple USB controllers, and
where the user may plug peripherals into more than 1 of them. I assume
that's common. Or am I misunderstanding what those patches do?
>>>> I'm still not convinced why U-Boot cares about this (as opposed to the
>>>> user using U-Boot).
>>>
>>> Well if U-Boot presents the ports in the wrong order, the user's
>>> scripts will fail.
>>>
>>> Also, what about the console UART problem? Surely the kernel provides
>>> a way to select the ordering of those? How do I know what UART I am
>>> getting on /dev/ttyS0?
>>
>> That's a question my subconscious has been asking me for a while to. The
>> answer is that it's all very accidental...
>>
>> The kernel serial driver needs a clock-frequency property. If it isn't
>> present, the driver won't initialize. The .dts files in the kernel only
>> have this property for serial ports that are hooked up on the given
>> board. In the case (Paz00 a/k/a Toshiba AC100) where multiple serial
>> ports have this property, the useful one just happens to be the one the
>> kernel processes first. So, it all just happens to work out. I have
>> since at least posted patches to add explicit status = "disabled" for
>> the ports that aren't hooked up, but we should start thinking about how
>> to use /aliases to force a particular enumeration order rather than
>> relying on whatever is making it work accidentally.
>
> Ickity ick. I think I'll keep my aliases if it's ok with you?
Having aliases is fine.
Using aliases to name the devices which get instantiated through
standardized enumeration mechanisms is fine.
To the best of my knowledge, restricting device enumeration based on the
aliases is non-standard, hence wrong.
As I mentioned elsewhere, the patches only allow one to actually use usb
controller 0; ehci-tegra.c's ehci_hcd_init() hard-codes port 0 when
calling tegrausb_start_port(). Rather than relying on non-standard
aliases usage to restrict the set of USB devices that get instantiated,
why not just add status = "disabled" to all but one USB host's node in
each board's .dts file; that's the standard way to disable devices.
--
nvpublic
next prev parent reply other threads:[~2011-12-06 20:42 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-24 3:54 [PATCH 01/14] fdt: Tidy up a few fdtdec problems Simon Glass
2011-11-24 3:54 ` [U-Boot] " Simon Glass
2011-11-24 3:54 ` [PATCH 03/14] arm: fdt: Ensure that an embedded fdt is word-aligned Simon Glass
2011-11-24 3:54 ` [U-Boot] " Simon Glass
[not found] ` <1322106896-23054-2-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2011-11-24 3:54 ` [PATCH 02/14] fdt: Add functions to access phandles, arrays and bools Simon Glass
2011-11-24 3:54 ` [U-Boot] " Simon Glass
[not found] ` <1322106896-23054-3-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2011-11-28 18:41 ` Stephen Warren
2011-11-28 18:41 ` [U-Boot] " Stephen Warren
[not found] ` <4ED3D5DC.10502-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-11-29 5:12 ` David Gibson
2011-11-29 5:12 ` [U-Boot] " David Gibson
2011-12-02 1:01 ` Simon Glass
2011-12-02 1:01 ` [U-Boot] " Simon Glass
[not found] ` <CAPnjgZ29tsNXd1+1eXdTHRjgh_MQJrXoc23_oqO9UPJ73mu7ZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-02 15:55 ` Stephen Warren
2011-12-02 15:55 ` [U-Boot] " Stephen Warren
2011-12-02 16:38 ` Simon Glass
2011-12-02 16:38 ` [U-Boot] " Simon Glass
2011-12-02 3:33 ` Jerry Van Baren
2011-12-02 3:33 ` [U-Boot] " Jerry Van Baren
2011-12-02 4:58 ` Simon Glass
2011-12-02 4:58 ` [U-Boot] " Simon Glass
2011-12-02 17:22 ` Jerry Van Baren
2011-12-02 17:22 ` [U-Boot] " Jerry Van Baren
2011-12-02 18:12 ` Simon Glass
2011-12-02 18:12 ` [U-Boot] " Simon Glass
2011-11-24 3:54 ` [PATCH 04/14] arm: fdt: Add skeleton device tree file Simon Glass
2011-11-24 3:54 ` [U-Boot] " Simon Glass
2011-11-24 3:54 ` [PATCH 05/14] tegra: fdt: Add Tegra2x " Simon Glass
2011-11-24 3:54 ` [U-Boot] " Simon Glass
[not found] ` <1322106896-23054-6-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2011-11-28 18:56 ` Stephen Warren
2011-11-28 18:56 ` [U-Boot] " Stephen Warren
2011-12-02 1:24 ` Simon Glass
2011-12-02 1:24 ` [U-Boot] " Simon Glass
[not found] ` <CAPnjgZ11cFm15E9MHXno_YGp0NxdOHhGBavYbQBP5Nu_TOtx7A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-02 15:58 ` Stephen Warren
2011-12-02 15:58 ` [U-Boot] " Stephen Warren
2011-12-02 16:47 ` Simon Glass
2011-12-02 16:47 ` [U-Boot] " Simon Glass
2011-11-24 3:54 ` [PATCH 07/14] tegra: fdt: Add initial device tree definitions for USB ports Simon Glass
2011-11-24 3:54 ` [U-Boot] " Simon Glass
2011-11-24 3:54 ` [PATCH 14/14] tegra: fdt: Enable FDT support for Seaboard Simon Glass
2011-11-24 3:54 ` [U-Boot] " Simon Glass
2011-11-28 18:33 ` [PATCH 01/14] fdt: Tidy up a few fdtdec problems Stephen Warren
2011-11-28 18:33 ` [U-Boot] " Stephen Warren
[not found] ` <4ED3D3F2.8070302-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-11-29 1:10 ` David Gibson
2011-11-29 1:10 ` [U-Boot] " David Gibson
2011-12-01 20:59 ` Simon Glass
2011-12-01 20:59 ` [U-Boot] " Simon Glass
2011-11-24 3:54 ` [PATCH 06/14] tegra: fdt: Add device tree file for Tegra2 Seaboard Simon Glass
2011-11-24 3:54 ` [U-Boot] " Simon Glass
2011-11-24 3:54 ` [U-Boot] [PATCH 08/14] tegra: usb: Add USB definitions " Simon Glass
2011-11-24 3:54 ` [U-Boot] [PATCH 09/14] tegra: usb: Add support for data alignment and txfifo threshold Simon Glass
2011-11-28 19:05 ` Stephen Warren
2011-12-02 1:42 ` Simon Glass
2011-11-24 3:54 ` [U-Boot] [PATCH 10/14] tegra: usb: Add support for USB peripheral Simon Glass
2011-11-28 19:21 ` Stephen Warren
2011-12-02 1:51 ` Simon Glass
2011-12-02 16:10 ` Stephen Warren
2011-12-02 17:00 ` Simon Glass
2011-12-02 20:40 ` Stephen Warren
2011-12-02 23:07 ` Simon Glass
2011-12-03 0:59 ` Simon Glass
2011-12-05 21:33 ` Stephen Warren
2011-12-05 21:46 ` Simon Glass
2011-12-05 22:15 ` Stephen Warren
2011-12-05 23:35 ` Simon Glass
2011-12-06 0:17 ` Stephen Warren
2011-12-06 1:14 ` Simon Glass
2011-12-06 20:42 ` Stephen Warren [this message]
2011-12-06 21:23 ` Simon Glass
[not found] ` <CAPnjgZ1G+mv6uv8SrdMm7DoqFjeeyVHYv6nbQxn9qixfbQMGvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-07 23:46 ` Stephen Warren
2011-12-07 23:46 ` [U-Boot] " Stephen Warren
2011-12-08 21:24 ` Simon Glass
2011-12-08 21:24 ` [U-Boot] " Simon Glass
[not found] ` <CAPnjgZ0AuBNkYKN0JHQyc7DdzwUSZivR+Dv2BkiFsKQBNMeP8A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-12 18:18 ` Stephen Warren
2011-12-12 18:18 ` [U-Boot] " Stephen Warren
2011-12-12 18:42 ` Simon Glass
2011-12-12 18:42 ` [U-Boot] " Simon Glass
2011-11-24 3:54 ` [U-Boot] [PATCH 11/14] tegra: usb: Add USB support to nvidia boards Simon Glass
2011-11-24 3:54 ` [U-Boot] [PATCH 12/14] tegra: usb: Add common USB defines for tegra2 boards Simon Glass
2011-11-24 3:54 ` [U-Boot] [PATCH 13/14] tegra: usb: Enable USB on Seaboard Simon Glass
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=4EDE7E1C.2090203@nvidia.com \
--to=swarren@nvidia.com \
--cc=u-boot@lists.denx.de \
/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.