lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ea046ad5-ee78-44a5-803c-a09669cb8a82@gmail.com>
Date: Fri, 2 Aug 2024 13:01:08 +0800
From: Hui-Ping Chen <hpchen0nvt@...il.com>
To: Krzysztof Kozlowski <krzk@...nel.org>, vkoul@...nel.org,
 kishon@...nel.org, robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org
Cc: linux-arm-kernel@...ts.infradead.org, linux-phy@...ts.infradead.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/2] phy: nuvoton: add new driver for the Nuvoton MA35
 SoC USB 2.0 PHY

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



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ