All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: u-boot-amlogic@groups.io, glaroque@baylibre.com,
	neil.armstrong@linaro.org
Cc: u-boot-amlogic@groups.io, u-boot@lists.denx.de,
	avromanov@salutedevices.com
Subject: Re: [PATCH] phy: meson-g12a-usb2: fix ret check on power_domain_get
Date: Wed, 18 Oct 2023 08:57:37 +0200	[thread overview]
Message-ID: <87v8b4xvry.fsf@baylibre.com> (raw)
In-Reply-To: <20231017185725.809524-1-glaroque@baylibre.com>

On mar., oct. 17, 2023 at 20:57, "Guillaume La Roque" <glaroque@baylibre.com> 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 <glaroque@baylibre.com>

Tested on vim3 with:

=> fastboot usb 0

Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on vim3

> ---
>  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");
> -- 
> 2.34.1
>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#1773): https://groups.io/g/u-boot-amlogic/message/1773
> Mute This Topic: https://groups.io/mt/102024645/1991006
> Group Owner: u-boot-amlogic+owner@groups.io
> Unsubscribe: https://groups.io/g/u-boot-amlogic/unsub [mkorpershoek@baylibre.com]
> -=-=-=-=-=-=-=-=-=-=-=-


  reply	other threads:[~2023-10-18  6:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17 18:57 [PATCH] phy: meson-g12a-usb2: fix ret check on power_domain_get Guillaume La Roque
2023-10-18  6:57 ` Mattijs Korpershoek [this message]
2023-10-18  7:44 ` neil.armstrong
2023-10-18  7:46 ` Neil Armstrong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v8b4xvry.fsf@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=avromanov@salutedevices.com \
    --cc=glaroque@baylibre.com \
    --cc=neil.armstrong@linaro.org \
    --cc=u-boot-amlogic@groups.io \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.