Lines Matching full:sparx5
2 /* Microchip Sparx5 Switch driver
100 struct sparx5;
169 struct sparx5 *sparx5; member
209 struct sparx5 *sparx5; member
234 struct sparx5 { struct
303 int sparx5_register_notifier_blocks(struct sparx5 *sparx5); argument
304 void sparx5_unregister_notifier_blocks(struct sparx5 *sparx5);
312 void sparx5_xtr_flush(struct sparx5 *sparx5, u8 grp);
316 int sparx5_manual_injection_mode(struct sparx5 *sparx5);
320 int sparx5_fdma_start(struct sparx5 *sparx5);
321 int sparx5_fdma_stop(struct sparx5 *sparx5);
322 int sparx5_fdma_xmit(struct sparx5 *sparx5, u32 *ifh, struct sk_buff *skb);
327 int sparx5_mact_learn(struct sparx5 *sparx5, int port,
329 bool sparx5_mact_getnext(struct sparx5 *sparx5,
331 int sparx5_mact_find(struct sparx5 *sparx5,
333 int sparx5_mact_forget(struct sparx5 *sparx5,
335 int sparx5_add_mact_entry(struct sparx5 *sparx5,
339 int sparx5_del_mact_entry(struct sparx5 *sparx5,
344 void sparx5_set_ageing(struct sparx5 *sparx5, int msecs);
345 void sparx5_mact_init(struct sparx5 *sparx5);
349 void sparx5_pgid_clear(struct sparx5 *spx5, int pgid);
350 void sparx5_pgid_read_mask(struct sparx5 *sparx5, int pgid, u32 portmask[3]);
351 void sparx5_update_fwd(struct sparx5 *sparx5);
352 void sparx5_vlan_init(struct sparx5 *sparx5);
353 void sparx5_vlan_port_setup(struct sparx5 *sparx5, int portno);
357 void sparx5_vlan_port_apply(struct sparx5 *sparx5, struct sparx5_port *port);
360 int sparx5_config_auto_calendar(struct sparx5 *sparx5);
361 int sparx5_config_dsm_calendar(struct sparx5 *sparx5);
365 int sparx_stats_init(struct sparx5 *sparx5);
369 int sparx5_dcb_init(struct sparx5 *sparx5);
371 static inline int sparx5_dcb_init(struct sparx5 *sparx5) in sparx5_dcb_init() argument
384 struct net_device *sparx5_create_netdev(struct sparx5 *sparx5, u32 portno);
385 int sparx5_register_netdevs(struct sparx5 *sparx5);
386 void sparx5_destroy_netdevs(struct sparx5 *sparx5);
387 void sparx5_unregister_netdevs(struct sparx5 *sparx5);
390 int sparx5_ptp_init(struct sparx5 *sparx5);
391 void sparx5_ptp_deinit(struct sparx5 *sparx5);
397 void sparx5_ptp_rxtstamp(struct sparx5 *sparx5, struct sk_buff *skb,
407 int sparx5_vcap_init(struct sparx5 *sparx5);
408 void sparx5_vcap_destroy(struct sparx5 *sparx5);
417 void sparx5_pgid_init(struct sparx5 *spx5);
418 int sparx5_pgid_alloc_mcast(struct sparx5 *spx5, u16 *idx);
419 int sparx5_pgid_free(struct sparx5 *spx5, u16 idx);
451 int sparx5_sdlb_pup_token_get(struct sparx5 *sparx5, u32 pup_interval,
454 int sparx5_sdlb_clk_hz_get(struct sparx5 *sparx5);
455 int sparx5_sdlb_group_get_by_rate(struct sparx5 *sparx5, u32 rate, u32 burst);
456 int sparx5_sdlb_group_get_by_index(struct sparx5 *sparx5, u32 idx, u32 *group);
458 int sparx5_sdlb_group_add(struct sparx5 *sparx5, u32 group, u32 idx);
459 int sparx5_sdlb_group_del(struct sparx5 *sparx5, u32 group, u32 idx);
461 void sparx5_sdlb_group_init(struct sparx5 *sparx5, u64 max_rate, u32 min_burst,
479 int sparx5_policer_conf_set(struct sparx5 *sparx5, struct sparx5_policer *pol);
521 int sparx5_psfp_fm_add(struct sparx5 *sparx5, u32 uidx,
523 int sparx5_psfp_fm_del(struct sparx5 *sparx5, u32 id);
525 int sparx5_psfp_sg_add(struct sparx5 *sparx5, u32 uidx,
527 int sparx5_psfp_sg_del(struct sparx5 *sparx5, u32 id);
529 int sparx5_psfp_sf_add(struct sparx5 *sparx5, const struct sparx5_psfp_sf *sf,
531 int sparx5_psfp_sf_del(struct sparx5 *sparx5, u32 id);
533 u32 sparx5_psfp_isdx_get_sf(struct sparx5 *sparx5, u32 isdx);
534 u32 sparx5_psfp_isdx_get_fm(struct sparx5 *sparx5, u32 isdx);
535 u32 sparx5_psfp_sf_get_sg(struct sparx5 *sparx5, u32 sfid);
536 void sparx5_isdx_conf_set(struct sparx5 *sparx5, u32 isdx, u32 sfid, u32 fmid);
538 void sparx5_psfp_init(struct sparx5 *sparx5);
541 void sparx5_new_base_time(struct sparx5 *sparx5, const u32 cycle_time,
615 static inline u32 spx5_rd(struct sparx5 *sparx5, int id, int tinst, int tcnt, in spx5_rd() argument
619 return readl(spx5_addr(sparx5->regs, id, tinst, tcnt, gbase, ginst, in spx5_rd()
631 static inline void spx5_wr(u32 val, struct sparx5 *sparx5, in spx5_wr() argument
636 writel(val, spx5_addr(sparx5->regs, id, tinst, tcnt, in spx5_wr()
651 static inline void spx5_rmw(u32 val, u32 mask, struct sparx5 *sparx5, in spx5_rmw() argument
658 nval = readl(spx5_addr(sparx5->regs, id, tinst, tcnt, gbase, ginst, in spx5_rmw()
661 writel(nval, spx5_addr(sparx5->regs, id, tinst, tcnt, gbase, ginst, in spx5_rmw()
679 static inline void __iomem *spx5_inst_get(struct sparx5 *sparx5, int id, int tinst) in spx5_inst_get() argument
681 return sparx5->regs[id + tinst]; in spx5_inst_get()
684 static inline void __iomem *spx5_reg_get(struct sparx5 *sparx5, in spx5_reg_get() argument
689 return spx5_addr(sparx5->regs, id, tinst, tcnt, in spx5_reg_get()