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
549 struct ocelot;
552 struct net_device *(*port_to_netdev)(struct ocelot *ocelot, int port);
554 int (*reset)(struct ocelot *ocelot);
600 struct ocelot *ocelot; member
628 struct ocelot { struct
702 #define ocelot_read_ix(ocelot, reg, gi, ri) __ocelot_read_ix(ocelot, reg, reg##_GSZ * (gi) + reg##_… argument
703 #define ocelot_read_gix(ocelot, reg, gi) __ocelot_read_ix(ocelot, reg, reg##_GSZ * (gi)) argument
704 #define ocelot_read_rix(ocelot, reg, ri) __ocelot_read_ix(ocelot, reg, reg##_RSZ * (ri)) argument
705 #define ocelot_read(ocelot, reg) __ocelot_read_ix(ocelot, reg, 0) argument
707 #define ocelot_write_ix(ocelot, val, reg, gi, ri) __ocelot_write_ix(ocelot, val, reg, reg##_GSZ * (… argument
708 #define ocelot_write_gix(ocelot, val, reg, gi) __ocelot_write_ix(ocelot, val, reg, reg##_GSZ * (gi)) argument
709 #define ocelot_write_rix(ocelot, val, reg, ri) __ocelot_write_ix(ocelot, val, reg, reg##_RSZ * (ri)) argument
710 #define ocelot_write(ocelot, val, reg) __ocelot_write_ix(ocelot, val, reg, 0) argument
712 #define ocelot_rmw_ix(ocelot, val, m, reg, gi, ri) __ocelot_rmw_ix(ocelot, val, m, reg, reg##_GSZ *… argument
713 #define ocelot_rmw_gix(ocelot, val, m, reg, gi) __ocelot_rmw_ix(ocelot, val, m, reg, reg##_GSZ * (g… argument
714 #define ocelot_rmw_rix(ocelot, val, m, reg, ri) __ocelot_rmw_ix(ocelot, val, m, reg, reg##_RSZ * (r… argument
715 #define ocelot_rmw(ocelot, val, m, reg) __ocelot_rmw_ix(ocelot, val, m, reg, 0) argument
717 #define ocelot_field_write(ocelot, reg, val) regmap_field_write((ocelot)->regfields[(reg)], (val)) argument
718 #define ocelot_field_read(ocelot, reg, val) regmap_field_read((ocelot)->regfields[(reg)], (val)) argument
719 #define ocelot_fields_write(ocelot, id, reg, val) regmap_fields_write((ocelot)->regfields[(reg)], (… argument
720 #define ocelot_fields_read(ocelot, id, reg, val) regmap_fields_read((ocelot)->regfields[(reg)], (id… argument
722 #define ocelot_target_read_ix(ocelot, target, reg, gi, ri) \ argument
723 __ocelot_target_read_ix(ocelot, target, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri))
724 #define ocelot_target_read_gix(ocelot, target, reg, gi) \ argument
725 __ocelot_target_read_ix(ocelot, target, reg, reg##_GSZ * (gi))
726 #define ocelot_target_read_rix(ocelot, target, reg, ri) \ argument
727 __ocelot_target_read_ix(ocelot, target, reg, reg##_RSZ * (ri))
728 #define ocelot_target_read(ocelot, target, reg) \ argument
729 __ocelot_target_read_ix(ocelot, target, reg, 0)
731 #define ocelot_target_write_ix(ocelot, target, val, reg, gi, ri) \ argument
732 __ocelot_target_write_ix(ocelot, target, val, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri))
733 #define ocelot_target_write_gix(ocelot, target, val, reg, gi) \ argument
734 __ocelot_target_write_ix(ocelot, target, val, reg, reg##_GSZ * (gi))
735 #define ocelot_target_write_rix(ocelot, target, val, reg, ri) \ argument
736 __ocelot_target_write_ix(ocelot, target, val, reg, reg##_RSZ * (ri))
737 #define ocelot_target_write(ocelot, target, val, reg) \ argument
738 __ocelot_target_write_ix(ocelot, target, val, reg, 0)
744 u32 __ocelot_read_ix(struct ocelot *ocelot, u32 reg, u32 offset);
745 void __ocelot_write_ix(struct ocelot *ocelot, u32 val, u32 reg, u32 offset);
746 void __ocelot_rmw_ix(struct ocelot *ocelot, u32 val, u32 mask, u32 reg,
748 u32 __ocelot_target_read_ix(struct ocelot *ocelot, enum ocelot_target target,
750 void __ocelot_target_write_ix(struct ocelot *ocelot, enum ocelot_target target,
754 bool ocelot_can_inject(struct ocelot *ocelot, int grp);
755 void ocelot_port_inject_frame(struct ocelot *ocelot, int port, int grp,
757 int ocelot_xtr_poll_frame(struct ocelot *ocelot, int grp, struct sk_buff **skb);
758 void ocelot_drain_cpu_queue(struct ocelot *ocelot, int grp);
761 int ocelot_regfields_init(struct ocelot *ocelot,
763 struct regmap *ocelot_regmap_init(struct ocelot *ocelot, struct resource *res);
764 int ocelot_init(struct ocelot *ocelot);
765 void ocelot_deinit(struct ocelot *ocelot);
766 void ocelot_init_port(struct ocelot *ocelot, int port);
767 void ocelot_deinit_port(struct ocelot *ocelot, int port);
770 void ocelot_get_strings(struct ocelot *ocelot, int port, u32 sset, u8 *data);
771 void ocelot_get_ethtool_stats(struct ocelot *ocelot, int port, u64 *data);
772 int ocelot_get_sset_count(struct ocelot *ocelot, int port, int sset);
773 int ocelot_get_ts_info(struct ocelot *ocelot, int port,
775 void ocelot_set_ageing_time(struct ocelot *ocelot, unsigned int msecs);
776 int ocelot_port_vlan_filtering(struct ocelot *ocelot, int port, bool enabled,
778 void ocelot_bridge_stp_state_set(struct ocelot *ocelot, int port, u8 state);
779 void ocelot_apply_bridge_fwd_mask(struct ocelot *ocelot);
780 int ocelot_port_pre_bridge_flags(struct ocelot *ocelot, int port,
782 void ocelot_port_bridge_flags(struct ocelot *ocelot, int port,
784 void ocelot_port_bridge_join(struct ocelot *ocelot, int port,
786 void ocelot_port_bridge_leave(struct ocelot *ocelot, int port,
788 int ocelot_fdb_dump(struct ocelot *ocelot, int port,
790 int ocelot_fdb_add(struct ocelot *ocelot, int port,
792 int ocelot_fdb_del(struct ocelot *ocelot, int port,
794 int ocelot_vlan_prepare(struct ocelot *ocelot, int port, u16 vid, bool pvid,
796 int ocelot_vlan_add(struct ocelot *ocelot, int port, u16 vid, bool pvid,
798 int ocelot_vlan_del(struct ocelot *ocelot, int port, u16 vid);
799 int ocelot_hwstamp_get(struct ocelot *ocelot, int port, struct ifreq *ifr);
800 int ocelot_hwstamp_set(struct ocelot *ocelot, int port, struct ifreq *ifr);
801 int ocelot_port_txtstamp_request(struct ocelot *ocelot, int port,
804 void ocelot_get_txtstamp(struct ocelot *ocelot);
805 void ocelot_port_set_maxlen(struct ocelot *ocelot, int port, size_t sdu);
806 int ocelot_get_max_mtu(struct ocelot *ocelot, int port);
807 int ocelot_port_policer_add(struct ocelot *ocelot, int port,
809 int ocelot_port_policer_del(struct ocelot *ocelot, int port);
810 int ocelot_cls_flower_replace(struct ocelot *ocelot, int port,
812 int ocelot_cls_flower_destroy(struct ocelot *ocelot, int port,
814 int ocelot_cls_flower_stats(struct ocelot *ocelot, int port,
816 int ocelot_port_mdb_add(struct ocelot *ocelot, int port,
818 int ocelot_port_mdb_del(struct ocelot *ocelot, int port,
820 int ocelot_port_lag_join(struct ocelot *ocelot, int port,
823 void ocelot_port_lag_leave(struct ocelot *ocelot, int port,
825 void ocelot_port_lag_change(struct ocelot *ocelot, int port, bool lag_tx_active);
827 int ocelot_devlink_sb_register(struct ocelot *ocelot);
828 void ocelot_devlink_sb_unregister(struct ocelot *ocelot);
829 int ocelot_sb_pool_get(struct ocelot *ocelot, unsigned int sb_index,
832 int ocelot_sb_pool_set(struct ocelot *ocelot, unsigned int sb_index,
836 int ocelot_sb_port_pool_get(struct ocelot *ocelot, int port,
839 int ocelot_sb_port_pool_set(struct ocelot *ocelot, int port,
842 int ocelot_sb_tc_pool_bind_get(struct ocelot *ocelot, int port,
846 int ocelot_sb_tc_pool_bind_set(struct ocelot *ocelot, int port,
851 int ocelot_sb_occ_snapshot(struct ocelot *ocelot, unsigned int sb_index);
852 int ocelot_sb_occ_max_clear(struct ocelot *ocelot, unsigned int sb_index);
853 int ocelot_sb_occ_port_pool_get(struct ocelot *ocelot, int port,
856 int ocelot_sb_occ_tc_port_bind_get(struct ocelot *ocelot, int port,
861 void ocelot_phylink_mac_link_down(struct ocelot *ocelot, int port,
865 void ocelot_phylink_mac_link_up(struct ocelot *ocelot, int port,
874 int ocelot_mrp_add(struct ocelot *ocelot, int port,
876 int ocelot_mrp_del(struct ocelot *ocelot, int port,
878 int ocelot_mrp_add_ring_role(struct ocelot *ocelot, int port,
880 int ocelot_mrp_del_ring_role(struct ocelot *ocelot, int port,
883 static inline int ocelot_mrp_add(struct ocelot *ocelot, int port, in ocelot_mrp_add() argument
889 static inline int ocelot_mrp_del(struct ocelot *ocelot, int port, in ocelot_mrp_del() argument
896 ocelot_mrp_add_ring_role(struct ocelot *ocelot, int port, in ocelot_mrp_add_ring_role() argument
903 ocelot_mrp_del_ring_role(struct ocelot *ocelot, int port, in ocelot_mrp_del_ring_role() argument