[U-Boot] [PATCH v2 1/1] USB: EHCI: Initialize multiple USB controllers at once

Stephen Warren swarren at wwwdotorg.org
Fri Aug 10 18:07:56 CEST 2012


On 08/10/2012 03:36 AM, Jim Lin wrote:
> Add support for command line "usb reset" or "usb start" to initialize
> , "usb stop" to stop multiple USB controllers at once.
> Other command like "usb tree" also supports multiple controllers.

I assume these were reposted because you rebased on the latest
u-boot-tegra/master branch. It's usual to includes details of why you're
reposting.

I applied these two patches, without changing the Seaboard config file,
and built. I got the following warnings:

ehci-hcd.c: In function 'ehci_submit_async':
ehci-hcd.c:250:6: warning: assignment from incompatible pointer type
ehci-hcd.c: In function 'usb_lowlevel_multi_init':
ehci-hcd.c:800:20: warning: assignment discards qualifiers from pointer
target type

I tested the patches in this case and found no regressions on a regular
Seaboard.

I get slightly different warnings if I do enable the feature in the
Seaboard config file:

ehci-hcd.c: In function 'ehci_submit_async':
ehci-hcd.c:250:6: warning: assignment from incompatible pointer type
ehci-hcd.c: In function 'usb_lowlevel_multi_init':
ehci-hcd.c:800:20: warning: assignment discards qualifiers from pointer
target type
ehci-tegra.c: In function 'ehci_hcd_init':
ehci-tegra.c:56:2: warning: passing argument 2 of 'tegrausb_start_port'
from incompatible pointer type
/home/swarren/shared/git_wa/u-boot/include/asm/arch/usb.h:243:5: note:
expected 'u32 *' but argument is of type 'struct ehci_hccr **'
ehci-tegra.c:56:2: warning: passing argument 3 of 'tegrausb_start_port'
from incompatible pointer type
/home/swarren/shared/git_wa/u-boot/include/asm/arch/usb.h:243:5: note:
expected 'u32 *' but argument is of type 'struct ehci_hcor **'

I tested the patches on a regular Seaboard, and found that both USB
ports now work (great!).

However, this patch breaks the "enterrcm" command if "usb start" has
been run, I assume since the VBUS GPIO is asserted to USB port 1. Can we
add some hook into that command to shut down the USB1 VBUS GPIO? I can
live with this patch being applied before that's fixed though.

I also tested Springbank, and found that this also enables the USB port
there, but strangely "enterrcm" following "usb start" does still seem to
work on that board!

So overall, once the warnings are fixed, I'm OK with these patches,
assuming some followup work on "enterrcm" will happen.


More information about the U-Boot mailing list