ocelot.h (8c1c6c7588b2faf9dd45fb3cfb7497fd09bbfe7c) | ocelot.h (2d44b097bbb9d0af0f3b94304fee4b639ab14171) |
---|---|
1/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ 2/* Copyright (c) 2017 Microsemi Corporation 3 */ 4 5#ifndef _SOC_MSCC_OCELOT_H 6#define _SOC_MSCC_OCELOT_H 7 8#include <linux/ptp_clock_kernel.h> --- 658 unchanged lines hidden (view full) --- 667void __ocelot_write_ix(struct ocelot *ocelot, u32 val, u32 reg, u32 offset); 668void __ocelot_rmw_ix(struct ocelot *ocelot, u32 val, u32 mask, u32 reg, 669 u32 offset); 670 671/* Hardware initialization */ 672int ocelot_regfields_init(struct ocelot *ocelot, 673 const struct reg_field *const regfields); 674struct regmap *ocelot_regmap_init(struct ocelot *ocelot, struct resource *res); | 1/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ 2/* Copyright (c) 2017 Microsemi Corporation 3 */ 4 5#ifndef _SOC_MSCC_OCELOT_H 6#define _SOC_MSCC_OCELOT_H 7 8#include <linux/ptp_clock_kernel.h> --- 658 unchanged lines hidden (view full) --- 667void __ocelot_write_ix(struct ocelot *ocelot, u32 val, u32 reg, u32 offset); 668void __ocelot_rmw_ix(struct ocelot *ocelot, u32 val, u32 mask, u32 reg, 669 u32 offset); 670 671/* Hardware initialization */ 672int ocelot_regfields_init(struct ocelot *ocelot, 673 const struct reg_field *const regfields); 674struct regmap *ocelot_regmap_init(struct ocelot *ocelot, struct resource *res); |
675void ocelot_configure_cpu(struct ocelot *ocelot, int npi, 676 enum ocelot_tag_prefix injection, 677 enum ocelot_tag_prefix extraction); | |
678int ocelot_init(struct ocelot *ocelot); 679void ocelot_deinit(struct ocelot *ocelot); 680void ocelot_init_port(struct ocelot *ocelot, int port); 681void ocelot_deinit_port(struct ocelot *ocelot, int port); 682 683/* DSA callbacks */ 684void ocelot_port_enable(struct ocelot *ocelot, int port, 685 struct phy_device *phy); --- 19 unchanged lines hidden (view full) --- 705 const unsigned char *addr, u16 vid); 706int ocelot_fdb_del(struct ocelot *ocelot, int port, 707 const unsigned char *addr, u16 vid); 708int ocelot_vlan_add(struct ocelot *ocelot, int port, u16 vid, bool pvid, 709 bool untagged); 710int ocelot_vlan_del(struct ocelot *ocelot, int port, u16 vid); 711int ocelot_hwstamp_get(struct ocelot *ocelot, int port, struct ifreq *ifr); 712int ocelot_hwstamp_set(struct ocelot *ocelot, int port, struct ifreq *ifr); | 675int ocelot_init(struct ocelot *ocelot); 676void ocelot_deinit(struct ocelot *ocelot); 677void ocelot_init_port(struct ocelot *ocelot, int port); 678void ocelot_deinit_port(struct ocelot *ocelot, int port); 679 680/* DSA callbacks */ 681void ocelot_port_enable(struct ocelot *ocelot, int port, 682 struct phy_device *phy); --- 19 unchanged lines hidden (view full) --- 702 const unsigned char *addr, u16 vid); 703int ocelot_fdb_del(struct ocelot *ocelot, int port, 704 const unsigned char *addr, u16 vid); 705int ocelot_vlan_add(struct ocelot *ocelot, int port, u16 vid, bool pvid, 706 bool untagged); 707int ocelot_vlan_del(struct ocelot *ocelot, int port, u16 vid); 708int ocelot_hwstamp_get(struct ocelot *ocelot, int port, struct ifreq *ifr); 709int ocelot_hwstamp_set(struct ocelot *ocelot, int port, struct ifreq *ifr); |
713int ocelot_port_add_txtstamp_skb(struct ocelot_port *ocelot_port, 714 struct sk_buff *skb); | 710void ocelot_port_add_txtstamp_skb(struct ocelot *ocelot, int port, 711 struct sk_buff *clone); |
715void ocelot_get_txtstamp(struct ocelot *ocelot); 716void ocelot_port_set_maxlen(struct ocelot *ocelot, int port, size_t sdu); 717int ocelot_get_max_mtu(struct ocelot *ocelot, int port); 718int ocelot_port_policer_add(struct ocelot *ocelot, int port, 719 struct ocelot_policer *pol); 720int ocelot_port_policer_del(struct ocelot *ocelot, int port); 721int ocelot_cls_flower_replace(struct ocelot *ocelot, int port, 722 struct flow_cls_offload *f, bool ingress); 723int ocelot_cls_flower_destroy(struct ocelot *ocelot, int port, 724 struct flow_cls_offload *f, bool ingress); 725int ocelot_cls_flower_stats(struct ocelot *ocelot, int port, 726 struct flow_cls_offload *f, bool ingress); 727int ocelot_port_mdb_add(struct ocelot *ocelot, int port, 728 const struct switchdev_obj_port_mdb *mdb); 729int ocelot_port_mdb_del(struct ocelot *ocelot, int port, 730 const struct switchdev_obj_port_mdb *mdb); 731 732#endif | 712void ocelot_get_txtstamp(struct ocelot *ocelot); 713void ocelot_port_set_maxlen(struct ocelot *ocelot, int port, size_t sdu); 714int ocelot_get_max_mtu(struct ocelot *ocelot, int port); 715int ocelot_port_policer_add(struct ocelot *ocelot, int port, 716 struct ocelot_policer *pol); 717int ocelot_port_policer_del(struct ocelot *ocelot, int port); 718int ocelot_cls_flower_replace(struct ocelot *ocelot, int port, 719 struct flow_cls_offload *f, bool ingress); 720int ocelot_cls_flower_destroy(struct ocelot *ocelot, int port, 721 struct flow_cls_offload *f, bool ingress); 722int ocelot_cls_flower_stats(struct ocelot *ocelot, int port, 723 struct flow_cls_offload *f, bool ingress); 724int ocelot_port_mdb_add(struct ocelot *ocelot, int port, 725 const struct switchdev_obj_port_mdb *mdb); 726int ocelot_port_mdb_del(struct ocelot *ocelot, int port, 727 const struct switchdev_obj_port_mdb *mdb); 728 729#endif |