[U-Boot] [PATCH 11/22] musb: Allow musb_platform_enable to return an error code

Simon Glass sjg at chromium.org
Mon Jun 29 05:45:21 CEST 2015


On 17 June 2015 at 13:33, Hans de Goede <hdegoede at redhat.com> wrote:
> Allow musb_platform_enable to return an error code and propagate it up to
> usb_lowlevel_init().
>
> This allows moving the checks for an external vbus being present to be
> moved from platform_init to platform_enable, so that the user can unplug a
> charger, plug in a host adapter with a usb-device, do a "usb reset" and
> have things working.
>
> This also allows adding a check for the id-pin to platform_enable, so that
> it can short circuit the 1s delay in usb_lowlevel_init() when no host cable
> is plugged in and thus waiting for a device to show up is useless.
>
> Note that all the changes to code shared with the kernel are wrapped in
> the kernel.
>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
>  drivers/usb/musb-new/am35x.c      |  7 +++++++
>  drivers/usb/musb-new/musb_core.c  | 20 ++++++++++++++++++++
>  drivers/usb/musb-new/musb_core.h  | 18 ++++++++++++++++++
>  drivers/usb/musb-new/musb_dsps.c  |  6 ++++++
>  drivers/usb/musb-new/musb_uboot.c |  6 +++++-
>  drivers/usb/musb-new/omap2430.c   |  5 +++++
>  drivers/usb/musb-new/sunxi.c      |  5 +++--
>  7 files changed, 64 insertions(+), 3 deletions(-)

Acked-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list