From: Florian Fainelli <f.fainelli@gmail.com>
To: Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
Russell King - ARM Linux <linux@armlinux.org.uk>,
Jakub Kicinski <kuba@kernel.org>,
David Miller <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 2/4] net: phy: smsc: remove getting reference clock
Date: Fri, 24 Mar 2023 12:09:43 -0700 [thread overview]
Message-ID: <e703abb1-e92e-5ad3-f3d9-5c4d22c8125c@gmail.com> (raw)
In-Reply-To: <efe84928-e4fc-aca3-d6ac-7ba08fe4a705@gmail.com>
On 3/24/23 12:07, Florian Fainelli wrote:
> On 3/24/23 11:03, Heiner Kallweit wrote:
>> Now that getting the reference clock has been moved to phylib,
>> we can remove it here.
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>> ---
>> drivers/net/phy/smsc.c | 9 +--------
>> 1 file changed, 1 insertion(+), 8 deletions(-)
>>
>> diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
>> index 730964b85..48654c684 100644
>> --- a/drivers/net/phy/smsc.c
>> +++ b/drivers/net/phy/smsc.c
>> @@ -278,7 +278,6 @@ int smsc_phy_probe(struct phy_device *phydev)
>> {
>> struct device *dev = &phydev->mdio.dev;
>> struct smsc_phy_priv *priv;
>> - struct clk *refclk;
>> priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
>> if (!priv)
>> @@ -291,13 +290,7 @@ int smsc_phy_probe(struct phy_device *phydev)
>> phydev->priv = priv;
>> - /* Make clk optional to keep DTB backward compatibility. */
>> - refclk = devm_clk_get_optional_enabled(dev, NULL);
>> - if (IS_ERR(refclk))
>> - return dev_err_probe(dev, PTR_ERR(refclk),
>> - "Failed to request clock\n");
>> -
>> - return clk_set_rate(refclk, 50 * 1000 * 1000);
>> + return clk_set_rate(phydev->refclk, 50 * 1000 * 1000);
>
> AFAIR one should be calling clk_prepare_enable() before clk_set_rate(),
> which neither smsc.c nor micrel.c do.
Which is implied by the devm_clk_get_optional_enabled().
--
Florian
next prev parent reply other threads:[~2023-03-24 19:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 18:01 [PATCH net-next 0/4] net: phy: move getting (R)MII refclock to phylib Heiner Kallweit
2023-03-24 18:03 ` [PATCH net-next 1/4] net: phylib: add getting reference clock Heiner Kallweit
2023-03-24 19:10 ` Florian Fainelli
2023-03-24 18:03 ` [PATCH net-next 2/4] net: phy: smsc: remove " Heiner Kallweit
2023-03-24 19:07 ` Florian Fainelli
2023-03-24 19:07 ` Florian Fainelli
2023-03-24 19:09 ` Florian Fainelli [this message]
2023-03-24 18:04 ` [PATCH net-next 3/4] net: phy: micrel: " Heiner Kallweit
2023-03-24 18:05 ` [PATCH net-next 4/4] net: phy: bcm7xxx: " Heiner Kallweit
2023-03-24 19:03 ` Florian Fainelli
2023-03-24 19:50 ` Heiner Kallweit
2023-03-24 20:11 ` Florian Fainelli
2023-03-24 21:16 ` Heiner Kallweit
2023-03-24 21:19 ` Florian Fainelli
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=e703abb1-e92e-5ad3-f3d9-5c4d22c8125c@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).