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);
587 struct ocelot *ocelot; member
617 struct ocelot { struct
689 #define ocelot_read_ix(ocelot, reg, gi, ri) __ocelot_read_ix(ocelot, reg, reg##_GSZ * (gi) + reg##_… argument
690 #define ocelot_read_gix(ocelot, reg, gi) __ocelot_read_ix(ocelot, reg, reg##_GSZ * (gi)) argument
691 #define ocelot_read_rix(ocelot, reg, ri) __ocelot_read_ix(ocelot, reg, reg##_RSZ * (ri)) argument
692 #define ocelot_read(ocelot, reg) __ocelot_read_ix(ocelot, reg, 0) argument
694 #define ocelot_write_ix(ocelot, val, reg, gi, ri) __ocelot_write_ix(ocelot, val, reg, reg##_GSZ * (… argument
695 #define ocelot_write_gix(ocelot, val, reg, gi) __ocelot_write_ix(ocelot, val, reg, reg##_GSZ * (gi)) argument
696 #define ocelot_write_rix(ocelot, val, reg, ri) __ocelot_write_ix(ocelot, val, reg, reg##_RSZ * (ri)) argument
697 #define ocelot_write(ocelot, val, reg) __ocelot_write_ix(ocelot, val, reg, 0) argument
699 #define ocelot_rmw_ix(ocelot, val, m, reg, gi, ri) __ocelot_rmw_ix(ocelot, val, m, reg, reg##_GSZ *… argument
700 #define ocelot_rmw_gix(ocelot, val, m, reg, gi) __ocelot_rmw_ix(ocelot, val, m, reg, reg##_GSZ * (g… argument
701 #define ocelot_rmw_rix(ocelot, val, m, reg, ri) __ocelot_rmw_ix(ocelot, val, m, reg, reg##_RSZ * (r… argument
702 #define ocelot_rmw(ocelot, val, m, reg) __ocelot_rmw_ix(ocelot, val, m, reg, 0) argument
704 #define ocelot_field_write(ocelot, reg, val) regmap_field_write((ocelot)->regfields[(reg)], (val)) argument
705 #define ocelot_field_read(ocelot, reg, val) regmap_field_read((ocelot)->regfields[(reg)], (val)) argument
706 #define ocelot_fields_write(ocelot, id, reg, val) regmap_fields_write((ocelot)->regfields[(reg)], (… argument
707 #define ocelot_fields_read(ocelot, id, reg, val) regmap_fields_read((ocelot)->regfields[(reg)], (id… argument
709 #define ocelot_target_read_ix(ocelot, target, reg, gi, ri) \ argument
710 __ocelot_target_read_ix(ocelot, target, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri))
711 #define ocelot_target_read_gix(ocelot, target, reg, gi) \ argument
712 __ocelot_target_read_ix(ocelot, target, reg, reg##_GSZ * (gi))
713 #define ocelot_target_read_rix(ocelot, target, reg, ri) \ argument
714 __ocelot_target_read_ix(ocelot, target, reg, reg##_RSZ * (ri))
715 #define ocelot_target_read(ocelot, target, reg) \ argument
716 __ocelot_target_read_ix(ocelot, target, reg, 0)
718 #define ocelot_target_write_ix(ocelot, target, val, reg, gi, ri) \ argument
719 __ocelot_target_write_ix(ocelot, target, val, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri))
720 #define ocelot_target_write_gix(ocelot, target, val, reg, gi) \ argument
721 __ocelot_target_write_ix(ocelot, target, val, reg, reg##_GSZ * (gi))
722 #define ocelot_target_write_rix(ocelot, target, val, reg, ri) \ argument
723 __ocelot_target_write_ix(ocelot, target, val, reg, reg##_RSZ * (ri))
724 #define ocelot_target_write(ocelot, target, val, reg) \ argument
725 __ocelot_target_write_ix(ocelot, target, val, reg, 0)
731 u32 __ocelot_read_ix(struct ocelot *ocelot, u32 reg, u32 offset);
732 void __ocelot_write_ix(struct ocelot *ocelot, u32 val, u32 reg, u32 offset);
733 void __ocelot_rmw_ix(struct ocelot *ocelot, u32 val, u32 mask, u32 reg,
735 u32 __ocelot_target_read_ix(struct ocelot *ocelot, enum ocelot_target target,
737 void __ocelot_target_write_ix(struct ocelot *ocelot, enum ocelot_target target,
741 bool ocelot_can_inject(struct ocelot *ocelot, int grp);
742 void ocelot_port_inject_frame(struct ocelot *ocelot, int port, int grp,
744 int ocelot_xtr_poll_frame(struct ocelot *ocelot, int grp, struct sk_buff **skb);
745 void ocelot_drain_cpu_queue(struct ocelot *ocelot, int grp);
748 int ocelot_regfields_init(struct ocelot *ocelot,
750 struct regmap *ocelot_regmap_init(struct ocelot *ocelot, struct resource *res);
751 int ocelot_init(struct ocelot *ocelot);
752 void ocelot_deinit(struct ocelot *ocelot);
753 void ocelot_init_port(struct ocelot *ocelot, int port);
754 void ocelot_deinit_port(struct ocelot *ocelot, int port);
757 void ocelot_get_strings(struct ocelot *ocelot, int port, u32 sset, u8 *data);
758 void ocelot_get_ethtool_stats(struct ocelot *ocelot, int port, u64 *data);
759 int ocelot_get_sset_count(struct ocelot *ocelot, int port, int sset);
760 int ocelot_get_ts_info(struct ocelot *ocelot, int port,
762 void ocelot_set_ageing_time(struct ocelot *ocelot, unsigned int msecs);
763 int ocelot_port_vlan_filtering(struct ocelot *ocelot, int port, bool enabled,
765 void ocelot_bridge_stp_state_set(struct ocelot *ocelot, int port, u8 state);
766 void ocelot_apply_bridge_fwd_mask(struct ocelot *ocelot);
767 int ocelot_port_pre_bridge_flags(struct ocelot *ocelot, int port,
769 void ocelot_port_bridge_flags(struct ocelot *ocelot, int port,
771 void ocelot_port_bridge_join(struct ocelot *ocelot, int port,
773 void ocelot_port_bridge_leave(struct ocelot *ocelot, int port,
775 int ocelot_fdb_dump(struct ocelot *ocelot, int port,
777 int ocelot_fdb_add(struct ocelot *ocelot, int port,
779 int ocelot_fdb_del(struct ocelot *ocelot, int port,
781 int ocelot_vlan_prepare(struct ocelot *ocelot, int port, u16 vid, bool pvid,
783 int ocelot_vlan_add(struct ocelot *ocelot, int port, u16 vid, bool pvid,
785 int ocelot_vlan_del(struct ocelot *ocelot, int port, u16 vid);
786 int ocelot_hwstamp_get(struct ocelot *ocelot, int port, struct ifreq *ifr);
787 int ocelot_hwstamp_set(struct ocelot *ocelot, int port, struct ifreq *ifr);
788 int ocelot_port_txtstamp_request(struct ocelot *ocelot, int port,
791 void ocelot_get_txtstamp(struct ocelot *ocelot);
792 void ocelot_port_set_maxlen(struct ocelot *ocelot, int port, size_t sdu);
793 int ocelot_get_max_mtu(struct ocelot *ocelot, int port);
794 int ocelot_port_policer_add(struct ocelot *ocelot, int port,
796 int ocelot_port_policer_del(struct ocelot *ocelot, int port);
797 int ocelot_cls_flower_replace(struct ocelot *ocelot, int port,
799 int ocelot_cls_flower_destroy(struct ocelot *ocelot, int port,
801 int ocelot_cls_flower_stats(struct ocelot *ocelot, int port,
803 int ocelot_port_mdb_add(struct ocelot *ocelot, int port,
805 int ocelot_port_mdb_del(struct ocelot *ocelot, int port,
807 int ocelot_port_lag_join(struct ocelot *ocelot, int port,
810 void ocelot_port_lag_leave(struct ocelot *ocelot, int port,
812 void ocelot_port_lag_change(struct ocelot *ocelot, int port, bool lag_tx_active);
814 int ocelot_devlink_sb_register(struct ocelot *ocelot);
815 void ocelot_devlink_sb_unregister(struct ocelot *ocelot);
816 int ocelot_sb_pool_get(struct ocelot *ocelot, unsigned int sb_index,
819 int ocelot_sb_pool_set(struct ocelot *ocelot, unsigned int sb_index,
823 int ocelot_sb_port_pool_get(struct ocelot *ocelot, int port,
826 int ocelot_sb_port_pool_set(struct ocelot *ocelot, int port,
829 int ocelot_sb_tc_pool_bind_get(struct ocelot *ocelot, int port,
833 int ocelot_sb_tc_pool_bind_set(struct ocelot *ocelot, int port,
838 int ocelot_sb_occ_snapshot(struct ocelot *ocelot, unsigned int sb_index);
839 int ocelot_sb_occ_max_clear(struct ocelot *ocelot, unsigned int sb_index);
840 int ocelot_sb_occ_port_pool_get(struct ocelot *ocelot, int port,
843 int ocelot_sb_occ_tc_port_bind_get(struct ocelot *ocelot, int port,
848 void ocelot_phylink_mac_link_down(struct ocelot *ocelot, int port,
852 void ocelot_phylink_mac_link_up(struct ocelot *ocelot, int port,
861 int ocelot_mrp_add(struct ocelot *ocelot, int port,
863 int ocelot_mrp_del(struct ocelot *ocelot, int port,
865 int ocelot_mrp_add_ring_role(struct ocelot *ocelot, int port,
867 int ocelot_mrp_del_ring_role(struct ocelot *ocelot, int port,
870 static inline int ocelot_mrp_add(struct ocelot *ocelot, int port, in ocelot_mrp_add() argument
876 static inline int ocelot_mrp_del(struct ocelot *ocelot, int port, in ocelot_mrp_del() argument
883 ocelot_mrp_add_ring_role(struct ocelot *ocelot, int port, in ocelot_mrp_add_ring_role() argument
890 ocelot_mrp_del_ring_role(struct ocelot *ocelot, int port, in ocelot_mrp_del_ring_role() argument