Re: [PATCH net-next] net: pcs: pcs-lynx: remove lynx_get_mdio_device() and refactor cleanup

From: Maxime Chevallier
Date: Fri Jan 27 2023 - 09:08:11 EST


Hi Vlad,

On Fri, 27 Jan 2023 15:43:51 +0200
Vladimir Oltean <vladimir.oltean@xxxxxxx> wrote:

> On Fri, Jan 27, 2023 at 02:40:30PM +0100, Maxime Chevallier wrote:
> > One of the main difference is that the TSE pcs is memory-mapped, and
> > the merge into pcs-lynx would first require a conversion of pcs-lynx
> > to regmap.
>
> I suppose sooner or later you'll want to convert stuff like
> phylink_mii_c22_pcs_get_state() to regmap too?

Well that was my next part to tackle indeed...

> Can't you create an MDIO bus for the TSE PCS which translates MDIO
> reads/writes to MMIO accesses?

TBH I haven't considered that, I guess this would definitely make thing
much easier. Since the register layout of the TSE PCS is very very
similar to the C22 layout, that could be indeed justified, as it's
basically a set of standard mdio registers exposed through mmio.

Thanks for the tip.

However this current patch still makes sense though right ?

Maxime