linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: kishon@ti.com, balbi@kernel.org, khilman@baylibre.com,
	linux-amlogic@lists.infradead.org, linux-usb@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 05/13] usb: dwc3: meson-g12a: refactor usb2 phy init
Date: Tue, 24 Mar 2020 15:35:58 +0100	[thread overview]
Message-ID: <5e5a5a25-bd3e-e476-2ed1-635d9c4a7773@baylibre.com> (raw)
In-Reply-To: <CAFBinCDrycKy6sJfpUjoB3_jkHP-ssmwvr-Cab1-fOmz_i_bGQ@mail.gmail.com>

On 24/03/2020 15:33, Martin Blumenstingl wrote:
> Hi Neil,
> 
> On Tue, Mar 24, 2020 at 11:20 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
> [...]
>> @@ -195,23 +239,9 @@ static int dwc3_meson_g12a_usb2_init(struct dwc3_meson_g12a *priv)
>>                 if (!strstr(priv->drvdata->phy_names[i], "usb2"))
>>                         continue;
>>
>> -               regmap_update_bits(priv->u2p_regmap[i], U2P_R0,
>> -                                  U2P_R0_POWER_ON_RESET,
>> -                                  U2P_R0_POWER_ON_RESET);
>> -
>> -               if (priv->drvdata->otg_switch_supported && i == USB2_OTG_PHY) {
>> -                       regmap_update_bits(priv->u2p_regmap[i], U2P_R0,
>> -                               U2P_R0_ID_PULLUP | U2P_R0_DRV_VBUS,
>> -                               U2P_R0_ID_PULLUP | U2P_R0_DRV_VBUS);
>> -
>> -                       dwc3_meson_g12a_usb2_set_mode(priv, i,
>> -                                                     priv->otg_phy_mode);
>> -               } else
>> -                       dwc3_meson_g12a_usb2_set_mode(priv, i,
>> -                                                     PHY_MODE_USB_HOST);
>> -
>> -               regmap_update_bits(priv->u2p_regmap[i], U2P_R0,
>> -                                  U2P_R0_POWER_ON_RESET, 0);
>> +               ret = priv->drvdata->usb2_init_phy(priv, i, mode);
>> +               if (ret)
>> +                       return ret;
>>         }
> this doesn't compile for me, it complains that mode is undefined
> I believe we need something like the attached patch on top.

I'll investigate

> 
> [...]
>> @@ -580,7 +612,9 @@ static int dwc3_meson_g12a_probe(struct platform_device *pdev)
>>         /* Get dr_mode */
>>         priv->otg_mode = usb_get_dr_mode(dev);
>>
>> -       dwc3_meson_g12a_usb_init(priv);
>> +       ret = dwc3_meson_g12a_usb_init(priv);
>> +       if (ret)
>> +               goto err_disable_clks;
> this looks like an unrelated fix, dwc3_meson_g12a_usb_init has always
> returned int (as potential error)
> also the same check is missing in dwc3_meson_g12a_resume
> can you please move this to a separate patch with the appropriate tag:
> Fixes: c99993376f72ca ("usb: dwc3: Add Amlogic G12A DWC3 glue")

Ok

Thanks,
Neil

> 
> 
> Martin
> 


  reply	other threads:[~2020-03-24 14:36 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 10:20 [PATCH 00/13] usb: dwc3: meson: add OTG support for GXL/GXM Neil Armstrong
2020-03-24 10:20 ` [PATCH 01/13] dt-bindings: usb: amlogic,meson-g12a-usb-ctrl: add the Amlogic GXL and GXM Families USB Glue Bindings Neil Armstrong
2020-03-24 14:06   ` Martin Blumenstingl
2020-03-24 14:10     ` Neil Armstrong
2020-03-24 10:20 ` [PATCH 02/13] usb: dwc3: meson-g12a: specify phy names in soc data Neil Armstrong
2020-03-24 14:13   ` Martin Blumenstingl
2020-03-24 14:17     ` Neil Armstrong
2020-03-24 14:19       ` Martin Blumenstingl
2020-03-25 13:36         ` Hanjie Lin
2020-03-24 10:20 ` [PATCH 03/13] usb: dwc3: meson-g12a: handle the phy and glue registers separately Neil Armstrong
2020-03-24 14:17   ` Martin Blumenstingl
2020-03-24 10:20 ` [PATCH 04/13] usb: dwc3: meson-g12a: get the reset as shared Neil Armstrong
2020-03-24 14:23   ` Martin Blumenstingl
2020-03-24 10:20 ` [PATCH 05/13] usb: dwc3: meson-g12a: refactor usb2 phy init Neil Armstrong
2020-03-24 14:33   ` Martin Blumenstingl
2020-03-24 14:35     ` Neil Armstrong [this message]
2020-03-24 10:20 ` [PATCH 06/13] usb: dwc3: meson-g12a: refactor usb init Neil Armstrong
2020-03-24 10:20 ` [PATCH 07/13] usb: dwc3: meson-g12a: support the GXL/GXM DWC3 host phy disconnect Neil Armstrong
2020-03-24 10:20 ` [PATCH 08/13] usb: dwc3: meson-g12a: add support for GXL and GXM SoCs Neil Armstrong
2020-03-24 10:20 ` [PATCH 09/13] arm64: dts: amlogic: use the new USB control driver for GXL and GXM Neil Armstrong
2020-03-24 10:20 ` [PATCH 10/13] phy: amlogic: meson-gxl-usb3: remove code for non-existing PHY Neil Armstrong
2020-03-24 10:20 ` [PATCH 11/13] usb: dwc3: of-simple: remove Amlogic GXL and AXG compatibles Neil Armstrong
2020-03-24 10:20 ` [PATCH 12/13] dt-bindings: usb: dwc3: remove amlogic compatible entries Neil Armstrong
2020-03-31 19:58   ` Rob Herring
2020-03-24 10:20 ` [PATCH 13/13] dt-bindings: usb: amlogic,dwc3: remove old DWC3 wrapper Neil Armstrong
2020-03-31 19:58   ` Rob Herring
2020-03-29 10:30 ` [PATCH 00/13] usb: dwc3: meson: add OTG support for GXL/GXM Felipe Balbi
2020-05-14 10:23   ` Felipe Balbi
2020-05-14 12:42     ` Neil Armstrong
2020-05-14 12:59       ` Felipe Balbi
2020-05-15  8:03         ` 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=5e5a5a25-bd3e-e476-2ed1-635d9c4a7773@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=balbi@kernel.org \
    --cc=khilman@baylibre.com \
    --cc=kishon@ti.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).