On 17/10/2023 20:57, Guillaume La Roque wrote:
Patch which add A1 SoC support create a regression on khadas vim3/vim3l
boards when we try to use fastboot command:

   => fastboot usb 0
   failed to get power domain
   failed to get power domain
   No USB device found
   USB init failed: -19

Add ENOENT check on ret in probe function.

Fixes: 5533c883ce10 ("phy: support Amlogic A1 family")

Signed-off-by: Guillaume La Roque <glaro...@baylibre.com>
---
  drivers/phy/meson-g12a-usb2.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/meson-g12a-usb2.c b/drivers/phy/meson-g12a-usb2.c
index 4ba3992bda70..3958d2404b85 100644
--- a/drivers/phy/meson-g12a-usb2.c
+++ b/drivers/phy/meson-g12a-usb2.c
@@ -328,12 +328,12 @@ int meson_g12a_usb2_phy_probe(struct udevice *dev)
#if CONFIG_IS_ENABLED(POWER_DOMAIN)
        ret = power_domain_get(dev, &priv->pwrdm);
-       if (ret < 0 && ret != -ENODEV) {
-               pr_err("failed to get power domain\n");
+       if (ret < 0 && ret != -ENODEV && ret != -ENOENT) {
+               pr_err("failed to get power domain : %d\n", ret);
                return ret;
        }
- if (ret != -ENODEV) {
+       if (ret != -ENODEV && ret != -ENOENT) {
                ret = power_domain_on(&priv->pwrdm);
                if (ret < 0) {
                        pr_err("failed to enable power domain\n");

Reviewed-by: Neil Armstrong <neil.armstr...@linaro.org>

Reply via email to