[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <307b343b-2e8d-cb20-c22f-0e80acdf1dc9@arf.net.pl>
Date: Fri, 4 Sep 2020 08:19:16 +0200
From: Adam Rudziński <adam.rudzinski@....net.pl>
To: Florian Fainelli <f.fainelli@...il.com>, netdev@...r.kernel.org
Cc: andrew@...n.ch, m.felsch@...gutronix.de, hkallweit1@...il.com,
richard.leitner@...data.com, zhengdejin5@...il.com,
devicetree@...r.kernel.org, kernel@...gutronix.de, kuba@...nel.org,
robh+dt@...nel.org
Subject: Re: [PATCH net-next 0/3] net: phy: Support enabling clocks prior to
bus probe
W dniu 2020-09-04 o 06:04, Florian Fainelli pisze:
>
>
> On 9/2/2020 9:39 PM, Florian Fainelli wrote:
>> Hi all,
>>
>> This patch series takes care of enabling the Ethernet PHY clocks in
>> DT-based systems (we have no way to do it for ACPI, and ACPI would
>> likely keep all of this hardware enabled anyway).
>>
>> Please test on your respective platforms, mine still seems to have
>> a race condition that I am tracking down as it looks like we are not
>> waiting long enough post clock enable.
>>
>> The check on the clock reference count is necessary to avoid an
>> artificial bump of the clock reference count and to support the unbind
>> -> bind of the PHY driver. We could solve it in different ways.
>>
>> Comments and test results welcome!
>
> Andrew, while we figure out a proper way to support this with the
> Linux device driver model, would you be opposed in a single patch to
> drivers/net/mdio/mdio-bcm-unimac.c which takes care of enabling the
> PHY's clock during bus->reset just for the sake of getting those
> systems to work, and later on we move over to the pre-probe mechanism?
>
> That would allow me to continue working with upstream kernels on these
> systems without carrying a big pile of patches.
Just a bunch of questions.
Actually, why is it necessary to have a full MDIO bus scan already
during probing peripherals?
If during probing the peripherals enable their resources (like clocks),
what's wrong in having the full MDIO bus scan after probing of all
peripherals is complete (and all peripherals are up)?
Also, what's wrong in letting the MDIO bus scan find only some PHYs in
the first go, and then letting each driver instance (of particular
peripheral) initiate scan only for its specific PHY, if it was not found
yet?
(Is it thatof_mdio.h provides public function of_mdiobus_register, but
not something similar to add only specific devices/phys without
destroying the existing state?)
I'd say that it is not necessary to have a PHY getting found before it
is needed to setup the complete interface.
Best regards,
Adam
Powered by blists - more mailing lists