[U-Boot] [PATCH 8/8] tegra: usb: move [start|stop]_port into ehci_hcd_[init|stop]

Simon Glass sjg at chromium.org
Tue Oct 30 14:39:31 CET 2012


Hi,

On Tue, Oct 30, 2012 at 2:22 AM, Lucas Stach <dev at lynxeye.de> wrote:
> The ehci_hcd entry points were just calling into the Tegra USB functions. Now
> that they are in the same file we can just move over the implementation.
>

Seems reasonable - the original approach was to put SOC-specific code
into arch/arm/cpu/armv7/tegra.., but I don't see any particular
benefit to that, and it could in fact get quite unwieldy. Since Tegra2
and Tegra3 both use the same USB it doesn't really matter anwyay.

> Signed-off-by: Lucas Stach <dev at lynxeye.de>
> ---
>  arch/arm/include/asm/arch-tegra20/usb.h | 19 -------
>  drivers/usb/host/ehci-tegra.c           | 93 +++++++++++++--------------------
>  2 Dateien geändert, 35 Zeilen hinzugefügt(+), 77 Zeilen entfernt(-)
>
> diff --git a/arch/arm/include/asm/arch-tegra20/usb.h b/arch/arm/include/asm/arch-tegra20/usb.h
> index b18c850..ef6c089 100644
> --- a/arch/arm/include/asm/arch-tegra20/usb.h
> +++ b/arch/arm/include/asm/arch-tegra20/usb.h
> @@ -246,23 +246,4 @@ struct usb_ctlr {
>  /* Setup USB on the board */
>  int board_usb_init(const void *blob);
>
> -/**
> - * Start up the given port number (ports are numbered from 0 on each board).
> - * This returns values for the appropriate hccr and hcor addresses to use for
> - * USB EHCI operations.
> - *
> - * @param portnum      port number to start
> - * @param hccr         returns start address of EHCI HCCR registers
> - * @param hcor         returns start address of EHCI HCOR registers
> - * @return 0 if ok, -1 on error (generally invalid port number)
> - */

But please can we keep this nice comment? I really don't like
uncommented functions.

[snip]

Regards,
Simon


More information about the U-Boot mailing list