Lines Matching refs:ocelot
71 #define for_each_unicast_dest_pgid(ocelot, pgid) \ argument
73 (pgid) < (ocelot)->num_phys_ports; \
76 #define for_each_nonreserved_multicast_dest_pgid(ocelot, pgid) \ argument
77 for ((pgid) = (ocelot)->num_phys_ports + 1; \
81 #define for_each_aggr_pgid(ocelot, pgid) \ argument
821 struct ocelot;
824 struct net_device *(*port_to_netdev)(struct ocelot *ocelot, int port);
826 int (*reset)(struct ocelot *ocelot);
830 void (*psfp_init)(struct ocelot *ocelot);
831 int (*psfp_filter_add)(struct ocelot *ocelot, int port,
833 int (*psfp_filter_del)(struct ocelot *ocelot, struct flow_cls_offload *f);
834 int (*psfp_stats_get)(struct ocelot *ocelot, struct flow_cls_offload *f,
836 void (*cut_through_fwd)(struct ocelot *ocelot);
837 void (*tas_clock_adjust)(struct ocelot *ocelot);
838 void (*update_stats)(struct ocelot *ocelot);
923 struct ocelot *ocelot; member
961 struct ocelot { struct
1053 #define ocelot_bulk_read(ocelot, reg, buf, count) \ argument
1054 __ocelot_bulk_read_ix(ocelot, reg, 0, buf, count)
1056 #define ocelot_read_ix(ocelot, reg, gi, ri) \ argument
1057 __ocelot_read_ix(ocelot, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri))
1058 #define ocelot_read_gix(ocelot, reg, gi) \ argument
1059 __ocelot_read_ix(ocelot, reg, reg##_GSZ * (gi))
1060 #define ocelot_read_rix(ocelot, reg, ri) \ argument
1061 __ocelot_read_ix(ocelot, reg, reg##_RSZ * (ri))
1062 #define ocelot_read(ocelot, reg) \ argument
1063 __ocelot_read_ix(ocelot, reg, 0)
1065 #define ocelot_write_ix(ocelot, val, reg, gi, ri) \ argument
1066 __ocelot_write_ix(ocelot, val, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri))
1067 #define ocelot_write_gix(ocelot, val, reg, gi) \ argument
1068 __ocelot_write_ix(ocelot, val, reg, reg##_GSZ * (gi))
1069 #define ocelot_write_rix(ocelot, val, reg, ri) \ argument
1070 __ocelot_write_ix(ocelot, val, reg, reg##_RSZ * (ri))
1071 #define ocelot_write(ocelot, val, reg) __ocelot_write_ix(ocelot, val, reg, 0) argument
1073 #define ocelot_rmw_ix(ocelot, val, m, reg, gi, ri) \ argument
1074 __ocelot_rmw_ix(ocelot, val, m, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri))
1075 #define ocelot_rmw_gix(ocelot, val, m, reg, gi) \ argument
1076 __ocelot_rmw_ix(ocelot, val, m, reg, reg##_GSZ * (gi))
1077 #define ocelot_rmw_rix(ocelot, val, m, reg, ri) \ argument
1078 __ocelot_rmw_ix(ocelot, val, m, reg, reg##_RSZ * (ri))
1079 #define ocelot_rmw(ocelot, val, m, reg) __ocelot_rmw_ix(ocelot, val, m, reg, 0) argument
1081 #define ocelot_field_write(ocelot, reg, val) \ argument
1082 regmap_field_write((ocelot)->regfields[(reg)], (val))
1083 #define ocelot_field_read(ocelot, reg, val) \ argument
1084 regmap_field_read((ocelot)->regfields[(reg)], (val))
1085 #define ocelot_fields_write(ocelot, id, reg, val) \ argument
1086 regmap_fields_write((ocelot)->regfields[(reg)], (id), (val))
1087 #define ocelot_fields_read(ocelot, id, reg, val) \ argument
1088 regmap_fields_read((ocelot)->regfields[(reg)], (id), (val))
1090 #define ocelot_target_read_ix(ocelot, target, reg, gi, ri) \ argument
1091 __ocelot_target_read_ix(ocelot, target, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri))
1092 #define ocelot_target_read_gix(ocelot, target, reg, gi) \ argument
1093 __ocelot_target_read_ix(ocelot, target, reg, reg##_GSZ * (gi))
1094 #define ocelot_target_read_rix(ocelot, target, reg, ri) \ argument
1095 __ocelot_target_read_ix(ocelot, target, reg, reg##_RSZ * (ri))
1096 #define ocelot_target_read(ocelot, target, reg) \ argument
1097 __ocelot_target_read_ix(ocelot, target, reg, 0)
1099 #define ocelot_target_write_ix(ocelot, target, val, reg, gi, ri) \ argument
1100 __ocelot_target_write_ix(ocelot, target, val, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri))
1101 #define ocelot_target_write_gix(ocelot, target, val, reg, gi) \ argument
1102 __ocelot_target_write_ix(ocelot, target, val, reg, reg##_GSZ * (gi))
1103 #define ocelot_target_write_rix(ocelot, target, val, reg, ri) \ argument
1104 __ocelot_target_write_ix(ocelot, target, val, reg, reg##_RSZ * (ri))
1105 #define ocelot_target_write(ocelot, target, val, reg) \ argument
1106 __ocelot_target_write_ix(ocelot, target, val, reg, 0)
1112 int __ocelot_bulk_read_ix(struct ocelot *ocelot, u32 reg, u32 offset, void *buf,
1114 u32 __ocelot_read_ix(struct ocelot *ocelot, u32 reg, u32 offset);
1115 void __ocelot_write_ix(struct ocelot *ocelot, u32 val, u32 reg, u32 offset);
1116 void __ocelot_rmw_ix(struct ocelot *ocelot, u32 val, u32 mask, u32 reg,
1118 u32 __ocelot_target_read_ix(struct ocelot *ocelot, enum ocelot_target target,
1120 void __ocelot_target_write_ix(struct ocelot *ocelot, enum ocelot_target target,
1124 bool ocelot_can_inject(struct ocelot *ocelot, int grp);
1125 void ocelot_port_inject_frame(struct ocelot *ocelot, int port, int grp,
1128 int ocelot_xtr_poll_frame(struct ocelot *ocelot, int grp, struct sk_buff **skb);
1129 void ocelot_drain_cpu_queue(struct ocelot *ocelot, int grp);
1130 void ocelot_ptp_rx_timestamp(struct ocelot *ocelot, struct sk_buff *skb,
1134 int ocelot_regfields_init(struct ocelot *ocelot,
1136 struct regmap *ocelot_regmap_init(struct ocelot *ocelot, struct resource *res);
1137 int ocelot_init(struct ocelot *ocelot);
1138 void ocelot_deinit(struct ocelot *ocelot);
1139 void ocelot_init_port(struct ocelot *ocelot, int port);
1140 void ocelot_deinit_port(struct ocelot *ocelot, int port);
1142 void ocelot_port_setup_dsa_8021q_cpu(struct ocelot *ocelot, int cpu);
1143 void ocelot_port_teardown_dsa_8021q_cpu(struct ocelot *ocelot, int cpu);
1144 void ocelot_port_assign_dsa_8021q_cpu(struct ocelot *ocelot, int port, int cpu);
1145 void ocelot_port_unassign_dsa_8021q_cpu(struct ocelot *ocelot, int port);
1146 u32 ocelot_port_assigned_dsa_8021q_cpu_mask(struct ocelot *ocelot, int port);
1149 void ocelot_get_strings(struct ocelot *ocelot, int port, u32 sset, u8 *data);
1150 void ocelot_get_ethtool_stats(struct ocelot *ocelot, int port, u64 *data);
1151 int ocelot_get_sset_count(struct ocelot *ocelot, int port, int sset);
1152 void ocelot_port_get_stats64(struct ocelot *ocelot, int port,
1154 void ocelot_port_get_pause_stats(struct ocelot *ocelot, int port,
1156 void ocelot_port_get_rmon_stats(struct ocelot *ocelot, int port,
1159 void ocelot_port_get_eth_ctrl_stats(struct ocelot *ocelot, int port,
1161 void ocelot_port_get_eth_mac_stats(struct ocelot *ocelot, int port,
1163 void ocelot_port_get_eth_phy_stats(struct ocelot *ocelot, int port,
1165 int ocelot_get_ts_info(struct ocelot *ocelot, int port,
1167 void ocelot_set_ageing_time(struct ocelot *ocelot, unsigned int msecs);
1168 int ocelot_port_vlan_filtering(struct ocelot *ocelot, int port, bool enabled,
1170 void ocelot_bridge_stp_state_set(struct ocelot *ocelot, int port, u8 state);
1171 u32 ocelot_get_bridge_fwd_mask(struct ocelot *ocelot, int src_port);
1172 int ocelot_port_pre_bridge_flags(struct ocelot *ocelot, int port,
1174 void ocelot_port_bridge_flags(struct ocelot *ocelot, int port,
1176 int ocelot_port_get_default_prio(struct ocelot *ocelot, int port);
1177 int ocelot_port_set_default_prio(struct ocelot *ocelot, int port, u8 prio);
1178 int ocelot_port_get_dscp_prio(struct ocelot *ocelot, int port, u8 dscp);
1179 int ocelot_port_add_dscp_prio(struct ocelot *ocelot, int port, u8 dscp, u8 prio);
1180 int ocelot_port_del_dscp_prio(struct ocelot *ocelot, int port, u8 dscp, u8 prio);
1181 int ocelot_port_bridge_join(struct ocelot *ocelot, int port,
1184 void ocelot_port_bridge_leave(struct ocelot *ocelot, int port,
1186 int ocelot_mact_flush(struct ocelot *ocelot, int port);
1187 int ocelot_fdb_dump(struct ocelot *ocelot, int port,
1189 int ocelot_fdb_add(struct ocelot *ocelot, int port, const unsigned char *addr,
1191 int ocelot_fdb_del(struct ocelot *ocelot, int port, const unsigned char *addr,
1193 int ocelot_lag_fdb_add(struct ocelot *ocelot, struct net_device *bond,
1196 int ocelot_lag_fdb_del(struct ocelot *ocelot, struct net_device *bond,
1199 int ocelot_vlan_prepare(struct ocelot *ocelot, int port, u16 vid, bool pvid,
1201 int ocelot_vlan_add(struct ocelot *ocelot, int port, u16 vid, bool pvid,
1203 int ocelot_vlan_del(struct ocelot *ocelot, int port, u16 vid);
1204 int ocelot_hwstamp_get(struct ocelot *ocelot, int port, struct ifreq *ifr);
1205 int ocelot_hwstamp_set(struct ocelot *ocelot, int port, struct ifreq *ifr);
1206 int ocelot_port_txtstamp_request(struct ocelot *ocelot, int port,
1209 void ocelot_get_txtstamp(struct ocelot *ocelot);
1210 void ocelot_port_set_maxlen(struct ocelot *ocelot, int port, size_t sdu);
1211 int ocelot_get_max_mtu(struct ocelot *ocelot, int port);
1212 int ocelot_port_policer_add(struct ocelot *ocelot, int port,
1214 int ocelot_port_policer_del(struct ocelot *ocelot, int port);
1215 int ocelot_port_mirror_add(struct ocelot *ocelot, int from, int to,
1217 void ocelot_port_mirror_del(struct ocelot *ocelot, int from, bool ingress);
1218 int ocelot_cls_flower_replace(struct ocelot *ocelot, int port,
1220 int ocelot_cls_flower_destroy(struct ocelot *ocelot, int port,
1222 int ocelot_cls_flower_stats(struct ocelot *ocelot, int port,
1224 int ocelot_port_mdb_add(struct ocelot *ocelot, int port,
1227 int ocelot_port_mdb_del(struct ocelot *ocelot, int port,
1230 int ocelot_port_lag_join(struct ocelot *ocelot, int port,
1234 void ocelot_port_lag_leave(struct ocelot *ocelot, int port,
1236 void ocelot_port_lag_change(struct ocelot *ocelot, int port, bool lag_tx_active);
1237 int ocelot_bond_get_id(struct ocelot *ocelot, struct net_device *bond);
1239 int ocelot_devlink_sb_register(struct ocelot *ocelot);
1240 void ocelot_devlink_sb_unregister(struct ocelot *ocelot);
1241 int ocelot_sb_pool_get(struct ocelot *ocelot, unsigned int sb_index,
1244 int ocelot_sb_pool_set(struct ocelot *ocelot, unsigned int sb_index,
1248 int ocelot_sb_port_pool_get(struct ocelot *ocelot, int port,
1251 int ocelot_sb_port_pool_set(struct ocelot *ocelot, int port,
1254 int ocelot_sb_tc_pool_bind_get(struct ocelot *ocelot, int port,
1258 int ocelot_sb_tc_pool_bind_set(struct ocelot *ocelot, int port,
1263 int ocelot_sb_occ_snapshot(struct ocelot *ocelot, unsigned int sb_index);
1264 int ocelot_sb_occ_max_clear(struct ocelot *ocelot, unsigned int sb_index);
1265 int ocelot_sb_occ_port_pool_get(struct ocelot *ocelot, int port,
1268 int ocelot_sb_occ_tc_port_bind_get(struct ocelot *ocelot, int port,
1273 void ocelot_phylink_mac_link_down(struct ocelot *ocelot, int port,
1277 void ocelot_phylink_mac_link_up(struct ocelot *ocelot, int port,
1285 int ocelot_mact_lookup(struct ocelot *ocelot, int *dst_idx,
1288 int ocelot_mact_learn_streamdata(struct ocelot *ocelot, int dst_idx,
1294 int ocelot_migrate_mdbs(struct ocelot *ocelot, unsigned long from_mask,
1297 int ocelot_vcap_policer_add(struct ocelot *ocelot, u32 pol_ix,
1299 int ocelot_vcap_policer_del(struct ocelot *ocelot, u32 pol_ix);
1302 int ocelot_mrp_add(struct ocelot *ocelot, int port,
1304 int ocelot_mrp_del(struct ocelot *ocelot, int port,
1306 int ocelot_mrp_add_ring_role(struct ocelot *ocelot, int port,
1308 int ocelot_mrp_del_ring_role(struct ocelot *ocelot, int port,
1311 static inline int ocelot_mrp_add(struct ocelot *ocelot, int port, in ocelot_mrp_add() argument
1317 static inline int ocelot_mrp_del(struct ocelot *ocelot, int port, in ocelot_mrp_del() argument
1324 ocelot_mrp_add_ring_role(struct ocelot *ocelot, int port, in ocelot_mrp_add_ring_role() argument
1331 ocelot_mrp_del_ring_role(struct ocelot *ocelot, int port, in ocelot_mrp_del_ring_role() argument