devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hui-Ping Chen <hpchen0nvt@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
	vkoul@kernel.org, kishon@kernel.org, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] phy: nuvoton: add new driver for the Nuvoton MA35 SoC USB 2.0 PHY
Date: Fri, 2 Aug 2024 13:01:08 +0800	[thread overview]
Message-ID: <ea046ad5-ee78-44a5-803c-a09669cb8a82@gmail.com> (raw)
In-Reply-To: <85bd5da2-312e-4d25-a4e9-afae4fedbd50@kernel.org>

Dear Krzysztof,

Thank you for your reply.



On 2024/8/1 下午 10:43, Krzysztof Kozlowski wrote:
> On 01/08/2024 07:37, Hui-Ping Chen wrote:
>> +	struct regmap *sysreg;
> Look here - iomem? No.

Yes, this is my mistake.



>> +};
>> +
>> +static int ma35_usb_phy_power_on(struct phy *phy)
>> +{
>> +	struct ma35_usb_phy *p_phy = phy_get_drvdata(phy);
>> +	unsigned int val;
>> +	int ret;
>> +
>> +	ret = clk_prepare_enable(p_phy->clk);
>> +	if (ret < 0) {
>> +		dev_err(p_phy->dev, "Failed to enable PHY clock: %d\n", ret);
>> +		return ret;
>> +	}
>> +
>> +	regmap_read(p_phy->sysreg, MA35_SYS_REG_USBPMISCR, &val);
>> +	if (val & PHY0SUSPEND) {
>> +		/*
>> +		 * USB PHY0 is in operation mode already
>> +		 * make sure USB PHY 60 MHz UTMI Interface Clock ready
>> +		 */
>> +		ret = readl_poll_timeout((void __iomem *)p_phy->sysreg + MA35_SYS_REG_USBPMISCR,
> Eh, I responded to v2, not here, so repeating:
>
> sysreg is a regmap, not io address. How could it possibly work and be
> tested?!? This cannot work. Test your code *before* sending it.
>
Yes, this is my mistake. I won't reply to v2. I will reply here.


I would change 'readl_poll_timeout' to 'regmap_read_poll_timeout'.

And it has been tested OK on our platform.



> Best regards,
> Krzysztof


Best regards,

Hui-Ping Chen



      reply	other threads:[~2024-08-02  5:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-01  5:37 [PATCH v3 0/2] Add support for nuvoton ma35 usb2 phy Hui-Ping Chen
2024-08-01  5:37 ` [PATCH v3 1/2] dt-bindings: phy: nuvoton,ma35-usb2-phy: add new bindings Hui-Ping Chen
2024-08-01 14:40   ` Krzysztof Kozlowski
2024-08-01  5:37 ` [PATCH v3 2/2] phy: nuvoton: add new driver for the Nuvoton MA35 SoC USB 2.0 PHY Hui-Ping Chen
2024-08-01  9:50   ` Markus Elfring
2024-08-02  4:57     ` Hui-Ping Chen
2024-08-01 14:43   ` Krzysztof Kozlowski
2024-08-02  5:01     ` Hui-Ping Chen [this message]

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=ea046ad5-ee78-44a5-803c-a09669cb8a82@gmail.com \
    --to=hpchen0nvt@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kishon@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=robh@kernel.org \
    --cc=vkoul@kernel.org \
    /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).