From 423c8b04007c85907f8f514de459ebc8541f0a54 Mon Sep 17 00:00:00 2001 From: Vladimir Oltean Date: Fri, 22 Nov 2019 13:46:34 +0200 Subject: net: mscc: ocelot: introduce more focused PCS ops for PHYLINK The reason for doing this is that the 2 mainline Ocelot switches so far, VSC7514 and VSC9959, have radically different SoC/SerDes integration. So although the PHYLINK callbacks are common, the implementations will actually lie in device-specific function pointers. Also, there was a duplicated and unused function pointer for pcs_init in struct ocelot, remove that. Signed-off-by: Vladimir Oltean --- include/soc/mscc/ocelot.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include/soc') diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h index 75d80df851e7..308293ec538a 100644 --- a/include/soc/mscc/ocelot.h +++ b/include/soc/mscc/ocelot.h @@ -412,7 +412,15 @@ enum { struct ocelot; struct ocelot_ops { - void (*pcs_init)(struct ocelot *ocelot, int port); + void (*pcs_init)(struct ocelot *ocelot, int port, + unsigned int link_an_mode, + const struct phylink_link_state *state); + void (*pcs_an_restart)(struct ocelot *ocelot, int port); + void (*pcs_link_state)(struct ocelot *ocelot, int port, + struct phylink_link_state *state); + void (*pcs_validate)(struct ocelot *ocelot, int port, + unsigned long *supported, + struct phylink_link_state *state); int (*reset)(struct ocelot *ocelot); }; @@ -479,8 +487,6 @@ struct ocelot { struct mutex ptp_lock; /* Protects the PTP clock */ spinlock_t ptp_clock_lock; - - void (*port_pcs_init)(struct ocelot_port *port); }; #define ocelot_read_ix(ocelot, reg, gi, ri) __ocelot_read_ix(ocelot, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri)) -- cgit v1.2.3