[U-Boot] [PATCH 2/6] usb: ohci-generic: don't probe fail if there is no clk_enable() ops

Patrice CHOTARD patrice.chotard at st.com
Wed Aug 28 08:41:49 UTC 2019


Hi Kever

On 8/28/19 10:23 AM, Kever Yang wrote:
> Some clock driver do not have a clk_enable() call back, and we should not
> treat this as fail in ehci probe like other modules, eg. clk_enabl_bulk()
> do not return fail if ret value is '-ENOSYS'
>
> Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
> ---
>
>  drivers/usb/host/ohci-generic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/host/ohci-generic.c b/drivers/usb/host/ohci-generic.c
> index 24b5c3156f..916ea0b955 100644
> --- a/drivers/usb/host/ohci-generic.c
> +++ b/drivers/usb/host/ohci-generic.c
> @@ -95,7 +95,7 @@ static int ohci_usb_probe(struct udevice *dev)
>  				break;
>  
>  			err = clk_enable(&priv->clocks[i]);
> -			if (err) {
> +			if (err && err != -ENOSYS) {
>  				dev_err(dev, "failed to enable clock %d\n", i);
>  				clk_free(&priv->clocks[i]);
>  				goto clk_err;

Reviewed-by: Patrice Chotard <patrice.chotard at st.com>

Thanks


More information about the U-Boot mailing list