From: Vignesh Raghavendra Date: Fri, 25 Oct 2019 08:18:05 +0000 (+0530) Subject: dwc3-generic: Don't fail probe if clk/reset entries are absent X-Git-Tag: v2025.01-rc5-pxa1908~2709^2~19 X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=d624434f5ebc5e3eb5f5609f06200f477cf8d8b5;p=u-boot.git dwc3-generic: Don't fail probe if clk/reset entries are absent Some boards don't populate clk/reset entries as these are are optional as per binding documentation. Therefore, don't fail driver probe if clk/reset entries are absent in DT. This fixes fastboot failures seen due to enabling of CONFIG_CLK on AM57xx Fixes: e8e683d33b0c ("board: ti: am57xx-idk: Configure the CDCE913 clock synthesizer") Reported-by: Sam Protsenko Signed-off-by: Vignesh Raghavendra --- diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c index 023e95395b..24b320bbce 100644 --- a/drivers/usb/dwc3/dwc3-generic.c +++ b/drivers/usb/dwc3/dwc3-generic.c @@ -338,7 +338,7 @@ static int dwc3_glue_reset_init(struct udevice *dev, int ret; ret = reset_get_bulk(dev, &glue->resets); - if (ret == -ENOTSUPP) + if (ret == -ENOTSUPP || ret == -ENOENT) return 0; else if (ret) return ret; @@ -358,7 +358,7 @@ static int dwc3_glue_clk_init(struct udevice *dev, int ret; ret = clk_get_bulk(dev, &glue->clks); - if (ret == -ENOSYS) + if (ret == -ENOSYS || ret == -ENOENT) return 0; if (ret) return ret;