[U-Boot] [PATCH v2] ehci: Replace board_prepare_usb with board_usb_init

Marek Vasut marek.vasut at gmail.com
Sun May 20 19:34:16 UTC 2018


On 05/20/2018 09:15 PM, Ramon Fried wrote:
> Use standard board_usb_init() instead of the specific board_prepare_usb.
> 
> Signed-off-by: Ramon Fried <ramon.fried at gmail.com>
> ---
> v2: remove a line that sneaked in by mistake
>  board/qualcomm/dragonboard410c/dragonboard410c.c | 4 ++--
>  drivers/usb/host/ehci-msm.c                      | 9 ++-------
>  2 files changed, 4 insertions(+), 9 deletions(-)
> 
> diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c
> index e7ead57f0d..679eab759a 100644
> --- a/board/qualcomm/dragonboard410c/dragonboard410c.c
> +++ b/board/qualcomm/dragonboard410c/dragonboard410c.c
> @@ -41,7 +41,7 @@ int dram_init_banksize(void)
>  	return 0;
>  }
>  
> -int board_prepare_usb(enum usb_init_type type)
> +int board_usb_init(int index, enum usb_init_type init)
>  {
>  	static struct udevice *pmic_gpio;
>  	static struct gpio_desc hub_reset, usb_sel;
> @@ -90,7 +90,7 @@ int board_prepare_usb(enum usb_init_type type)
>  		}
>  	}
>  
> -	if (type == USB_INIT_HOST) {
> +	if (init == USB_INIT_HOST) {
>  		/* Start USB Hub */
>  		dm_gpio_set_dir_flags(&hub_reset,
>  				      GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);

Obvious question -- can this not be started by some regulator ? Then
this board hook can go away altogether.

[...]

-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list