netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: netdev@vger.kernel.org, adam.rudzinski@arf.net.pl,
	m.felsch@pengutronix.de, hkallweit1@gmail.com,
	richard.leitner@skidata.com, zhengdejin5@gmail.com,
	devicetree@vger.kernel.org, kernel@pengutronix.de,
	kuba@kernel.org, robh+dt@kernel.org
Subject: Re: [RFC net-next 1/2] net: phy: Support enabling clocks prior to bus probe
Date: Thu, 3 Sep 2020 00:11:52 +0200	[thread overview]
Message-ID: <20200902221152.GI3050651@lunn.ch> (raw)
In-Reply-To: <20200902213347.3177881-2-f.fainelli@gmail.com>

Hi Florian

> Some Ethernet PHYs may require that their clock, which typically drives
> their logic to respond to reads on the MDIO bus be enabled before
> issusing a MDIO bus scan.

issuing

> 
> We have a chicken and egg problem though which is that we cannot enable
> a given Ethernet PHY's device clock until we have a phy_device instance
> create and called the driver's probe function. This will not happen
> unless we are successful in probing the PHY device, which requires its
> clock(s) to be turned on.
> 
> For DT based systems we can solve this by using of_clk_get() which
> operates on a device_node reference, and make sure that all clocks
> associaed with the node are enabled prior to doing any reads towards the

associated

Not fully looked at the code yet.

    Andrew

  parent reply	other threads:[~2020-09-02 22:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 21:33 [RFC net-next 0/2] net: phy: Support enabling clocks prior to bus probe Florian Fainelli
2020-09-02 21:33 ` [RFC net-next 1/2] " Florian Fainelli
2020-09-02 21:38   ` Florian Fainelli
2020-09-02 22:11   ` Andrew Lunn [this message]
2020-09-02 21:33 ` [RFC net-next 2/2] net: phy: bcm7xxx: request and manage GPHY clock Florian Fainelli
2020-09-02 22:20   ` Andrew Lunn
2020-09-03  2:13     ` Florian Fainelli
2020-09-03  6:00       ` Adam Rudziński
2020-09-03 15:21         ` Florian Fainelli
2020-09-03 17:13           ` Adam Rudziński
2020-09-03 17:17             ` Florian Fainelli
2020-09-03 19:21               ` Adam Rudziński
2020-09-03 19:35                 ` Florian Fainelli
2020-09-03 20:09                   ` Adam Rudziński
2020-09-03 20:17                     ` 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=20200902221152.GI3050651@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=adam.rudzinski@arf.net.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=m.felsch@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=richard.leitner@skidata.com \
    --cc=robh+dt@kernel.org \
    --cc=zhengdejin5@gmail.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).