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
;
19 const struct ocelot_stat_layout
*stats_layout
;
20 unsigned int num_stats
;
22 struct vcap_field
*vcap_is2_keys
;
23 struct vcap_field
*vcap_is2_actions
;
24 const struct vcap_props
*vcap
;
27 int (*mdio_bus_alloc
)(struct ocelot
*ocelot
);
28 void (*mdio_bus_free
)(struct ocelot
*ocelot
);
29 void (*pcs_init
)(struct ocelot
*ocelot
, int port
,
30 unsigned int link_an_mode
,
31 const struct phylink_link_state
*state
);
32 void (*pcs_an_restart
)(struct ocelot
*ocelot
, int port
);
33 void (*pcs_link_state
)(struct ocelot
*ocelot
, int port
,
34 struct phylink_link_state
*state
);
35 int (*prevalidate_phy_mode
)(struct ocelot
*ocelot
, int port
,
36 phy_interface_t phy_mode
);
39 extern struct felix_info felix_info_vsc9959
;
42 FELIX_INSTANCE_VSC9959
= 0,
45 /* DSA glue / front-end for struct ocelot */
47 struct dsa_switch
*ds
;
49 struct felix_info
*info
;
51 struct mii_bus
*imdio
;
52 struct phy_device
**pcs
;