]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: ehci-generic: don't probe fail if there is no clk_enable() ops
authorKever Yang <kever.yang@rock-chips.com>
Wed, 28 Aug 2019 08:23:46 +0000 (16:23 +0800)
committerKever Yang <kever.yang@rock-chips.com>
Wed, 11 Sep 2019 08:16:12 +0000 (16:16 +0800)
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@rock-chips.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
drivers/usb/host/ehci-generic.c

index 0270f3bc95acac5a14c56c46316ed2ac8612ffd9..682a0703060f41d733d01f8ecab2473bd31abb5c 100644 (file)
@@ -96,7 +96,7 @@ static int ehci_usb_probe(struct udevice *dev)
                        if (err < 0)
                                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;