1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright 2019 NXP Semiconductors
7 #define ocelot_to_felix(o) container_of((o), struct felix, ocelot)
9 /* Platform-specific information */
11 struct resource *target_io_res;
12 struct resource *port_io_res;
13 struct resource *imdio_res;
14 const struct reg_field *regfields;
15 const u32 *const *map;
16 const struct ocelot_ops *ops;
18 const struct ocelot_stat_layout *stats_layout;
19 unsigned int num_stats;
23 int (*mdio_bus_alloc)(struct ocelot *ocelot);
24 void (*mdio_bus_free)(struct ocelot *ocelot);
25 void (*pcs_init)(struct ocelot *ocelot, int port,
26 unsigned int link_an_mode,
27 const struct phylink_link_state *state);
28 void (*pcs_an_restart)(struct ocelot *ocelot, int port);
29 void (*pcs_link_state)(struct ocelot *ocelot, int port,
30 struct phylink_link_state *state);
31 int (*prevalidate_phy_mode)(struct ocelot *ocelot, int port,
32 phy_interface_t phy_mode);
35 extern struct felix_info felix_info_vsc9959;
38 FELIX_INSTANCE_VSC9959 = 0,
41 /* DSA glue / front-end for struct ocelot */
43 struct dsa_switch *ds;
45 struct felix_info *info;
47 struct mii_bus *imdio;
48 struct phy_device **pcs;