Merge branch 'mv88e6xxx-phylink_pcs'
Russell King says:
====================
Convert mv88e6xxx to phylink_pcs
This series (previously posted with further patches on the 26 June as
RFC) converts mv88e6xxx to phylink_pcs, and thus moves it from being
a pre-March 2020 legacy driver.
The first four patches lay the ground-work for the conversion by
adding four new methods to the phylink_pcs operations structure:
pcs_enable() - called when the PCS is going to start to be used
pcs_disable() - called when the PCS is no longer being used
pcs_pre_config() - called before the MAC configuration method
pcs_post_config() - called after the MAC configuration method
Both of these are necessary for some of the mv88e639x
workarounds.
We also add the ability to inform phylink of a change to the PCS
state without involving the MAC later, by providing
phylink_pcs_change() which takes a phylink_pcs structure rather than
a phylink structure. phylink maintains which instance the PCS is
conencted to, so internally it can do the right thing when the PCS
is in-use.
Then we provide some additional mdiobus and mdiodev accessors that
we will be using in the new PCS drivers.
The changes for mv88e6xxx follow, and the first one needs to be
explicitly pointed out - we (Andrew and myself) have both decided that
all possible approaches to maintaining backwards compatibility with DT
have been exhaused - everyone has some objection to everything that
has been proposed. So, after many years of trying, we have decided
that this is just an impossibility, and with this patch, we are now
intentionally and knowingly breaking any DT that does not specify the
CPU and DSA port fixed-link parameters. Hence why Andrew has recently
been submitting DT update patches. It is regrettable that it has come
to this.
Following this, we start preparing 88e6xxx for phylink_pcs conversion
by padding the mac_select_pcs() DSA method, and the internal hooks to
create and tear-down PCS instances. Rather than bloat the already very
large mv88e6xxx_ops structure, I decided that it would be better that
the new internal chip specific PCS methods are all grouped within their
own structure - and this structure can be declared in the PCS drivers
themselves.
Then we have the actual conversion patches, one for each family of PCS.
Lastly, we clean up the driver after conversion, removing all the now
redundant code.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Please register or sign in to comment