Home
last modified time | relevance | path

Searched refs:ocelot (Results 1 – 25 of 34) sorted by relevance

12

/linux/drivers/net/ethernet/mscc/
H A Docelot.c31 static inline u32 ocelot_mact_read_macaccess(struct ocelot *ocelot) in ocelot_mact_read_macaccess() argument
33 return ocelot_read(ocelot, ANA_TABLES_MACACCESS); in ocelot_mact_read_macaccess()
37 static inline int ocelot_mact_wait_for_completion(struct ocelot *ocelot) in ocelot_mact_wait_for_completion() argument
42 ocelot, val, in ocelot_mact_wait_for_completion()
49 static void ocelot_mact_select(struct ocelot *ocelot, in ocelot_mact_select() argument
66 ocelot_write(ocelot, macl, ANA_TABLES_MACLDATA); in ocelot_mact_select()
67 ocelot_write(ocelot, mach, ANA_TABLES_MACHDATA); in ocelot_mact_select()
71 static int __ocelot_mact_learn(struct ocelot *ocelot, int port, in __ocelot_mact_learn() argument
90 if (mc_ports & BIT(ocelot->num_phys_ports)) in __ocelot_mact_learn()
93 ocelot_mact_select(ocelot, mac, vid); in __ocelot_mact_learn()
[all …]
H A Docelot_devlink.c221 static u32 ocelot_wm_read(struct ocelot *ocelot, int index) in ocelot_wm_read() argument
223 int wm = ocelot_read_gix(ocelot, QSYS_RES_CFG, index); in ocelot_wm_read()
225 return ocelot->ops->wm_dec(wm); in ocelot_wm_read()
228 static void ocelot_wm_write(struct ocelot *ocelot, int index, u32 val) in ocelot_wm_write() argument
230 u32 wm = ocelot->ops->wm_enc(val); in ocelot_wm_write()
232 ocelot_write_gix(ocelot, wm, QSYS_RES_CFG, index); in ocelot_wm_write()
235 static void ocelot_wm_status(struct ocelot *ocelot, int index, u32 *inuse, in ocelot_wm_status() argument
238 int res_stat = ocelot_read_gix(ocelot, QSYS_RES_STAT, index); in ocelot_wm_status()
240 return ocelot->ops->wm_stat(res_stat, inuse, maxuse); in ocelot_wm_status()
252 static void ocelot_disable_reservation_watermarks(struct ocelot *ocelot, in ocelot_disable_reservation_watermarks() argument
[all …]
H A Docelot_fdma.c22 static void ocelot_fdma_writel(struct ocelot *ocelot, u32 reg, u32 data) in ocelot_fdma_writel() argument
24 regmap_write(ocelot->targets[FDMA], reg, data); in ocelot_fdma_writel()
27 static u32 ocelot_fdma_readl(struct ocelot *ocelot, u32 reg) in ocelot_fdma_readl() argument
31 regmap_read(ocelot->targets[FDMA], reg, &retval); in ocelot_fdma_readl()
85 static void ocelot_fdma_activate_chan(struct ocelot *ocelot, dma_addr_t dma, in ocelot_fdma_activate_chan() argument
88 ocelot_fdma_writel(ocelot, MSCC_FDMA_DCB_LLP(chan), dma); in ocelot_fdma_activate_chan()
93 ocelot_fdma_writel(ocelot, MSCC_FDMA_CH_ACTIVATE, BIT(chan)); in ocelot_fdma_activate_chan()
96 static u32 ocelot_fdma_read_ch_safe(struct ocelot *ocelot) in ocelot_fdma_read_ch_safe() argument
98 return ocelot_fdma_readl(ocelot, MSCC_FDMA_CH_SAFE); in ocelot_fdma_read_ch_safe()
101 static int ocelot_fdma_wait_chan_safe(struct ocelot *ocelot, int chan) in ocelot_fdma_wait_chan_safe() argument
[all …]
H A Docelot_mrp.c18 static int ocelot_mrp_find_partner_port(struct ocelot *ocelot, in ocelot_mrp_find_partner_port() argument
23 for (i = 0; i < ocelot->num_phys_ports; ++i) { in ocelot_mrp_find_partner_port()
24 struct ocelot_port *ocelot_port = ocelot->ports[i]; in ocelot_mrp_find_partner_port()
36 static int ocelot_mrp_del_vcap(struct ocelot *ocelot, int id) in ocelot_mrp_del_vcap() argument
41 block_vcap_is2 = &ocelot->block[VCAP_IS2]; in ocelot_mrp_del_vcap()
47 return ocelot_vcap_filter_del(ocelot, filter); in ocelot_mrp_del_vcap()
50 static int ocelot_mrp_redirect_add_vcap(struct ocelot *ocelot, int src_port, in ocelot_mrp_redirect_add_vcap() argument
63 filter->id.cookie = OCELOT_VCAP_IS2_MRP_REDIRECT(ocelot, src_port); in ocelot_mrp_redirect_add_vcap()
73 err = ocelot_vcap_filter_add(ocelot, filter, NULL); in ocelot_mrp_redirect_add_vcap()
91 static int ocelot_mrp_trap_add(struct ocelot *ocelot, int port) in ocelot_mrp_trap_add() argument
[all …]
H A Docelot_mm.c52 void ocelot_port_update_active_preemptible_tcs(struct ocelot *ocelot, int port) in ocelot_port_update_active_preemptible_tcs() argument
54 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_port_update_active_preemptible_tcs()
55 struct ocelot_mm_state *mm = &ocelot->mm[port]; in ocelot_port_update_active_preemptible_tcs()
58 lockdep_assert_held(&ocelot->fwd_domain_lock); in ocelot_port_update_active_preemptible_tcs()
76 ocelot->ops->tas_guard_bands_update(ocelot, port); in ocelot_port_update_active_preemptible_tcs()
78 dev_dbg(ocelot->dev, in ocelot_port_update_active_preemptible_tcs()
85 ocelot_rmw_rix(ocelot, QSYS_PREEMPTION_CFG_P_QUEUES(val), in ocelot_port_update_active_preemptible_tcs()
90 void ocelot_port_change_fp(struct ocelot *ocelot, int port, in ocelot_port_change_fp() argument
93 struct ocelot_mm_state *mm = &ocelot->mm[port]; in ocelot_port_change_fp()
95 lockdep_assert_held(&ocelot->fwd_domain_lock); in ocelot_port_change_fp()
[all …]
H A Docelot.h77 static inline void ocelot_reg_to_target_addr(struct ocelot *ocelot, in ocelot_reg_to_target_addr() argument
83 *addr = ocelot->map[*target][reg & REG_MASK]; in ocelot_reg_to_target_addr()
86 int ocelot_bridge_num_find(struct ocelot *ocelot,
89 int ocelot_mact_learn(struct ocelot *ocelot, int port,
92 int ocelot_mact_forget(struct ocelot *ocelot,
94 struct net_device *ocelot_port_to_netdev(struct ocelot *ocelot, int port);
97 int ocelot_probe_port(struct ocelot *ocelot, int port, struct regmap *target,
100 int ocelot_port_devlink_init(struct ocelot *ocelot, int port,
102 void ocelot_port_devlink_teardown(struct ocelot *ocelot, int port);
104 int ocelot_trap_add(struct ocelot *ocelot, int port,
[all …]
H A Docelot_stats.c312 ocelot_get_stats_layout(struct ocelot *ocelot) in ocelot_get_stats_layout() argument
314 if (ocelot->mm_supported) in ocelot_get_stats_layout()
323 static int ocelot_port_update_stats(struct ocelot *ocelot, int port) in ocelot_port_update_stats() argument
329 ocelot_write(ocelot, SYS_STAT_CFG_STAT_VIEW(port), SYS_STAT_CFG); in ocelot_port_update_stats()
331 list_for_each_entry(region, &ocelot->stats_regions, node) { in ocelot_port_update_stats()
332 err = ocelot_bulk_read(ocelot, region->base, region->buf, in ocelot_port_update_stats()
344 static void ocelot_port_transfer_stats(struct ocelot *ocelot, int port) in ocelot_port_transfer_stats() argument
349 list_for_each_entry(region, &ocelot->stats_regions, node) { in ocelot_port_transfer_stats()
353 u64 *stat = &ocelot->stats[idx + j]; in ocelot_port_transfer_stats()
367 struct ocelot *ocelot = container_of(del_work, struct ocelot, in ocelot_check_stats_work() local
[all …]
H A Docelot_io.c13 int __ocelot_bulk_read_ix(struct ocelot *ocelot, enum ocelot_reg reg, in __ocelot_bulk_read_ix() argument
19 ocelot_reg_to_target_addr(ocelot, reg, &target, &addr); in __ocelot_bulk_read_ix()
22 return regmap_bulk_read(ocelot->targets[target], addr + offset, in __ocelot_bulk_read_ix()
27 u32 __ocelot_read_ix(struct ocelot *ocelot, enum ocelot_reg reg, u32 offset) in __ocelot_read_ix() argument
32 ocelot_reg_to_target_addr(ocelot, reg, &target, &addr); in __ocelot_read_ix()
35 regmap_read(ocelot->targets[target], addr + offset, &val); in __ocelot_read_ix()
40 void __ocelot_write_ix(struct ocelot *ocelot, u32 val, enum ocelot_reg reg, in __ocelot_write_ix() argument
46 ocelot_reg_to_target_addr(ocelot, reg, &target, &addr); in __ocelot_write_ix()
49 regmap_write(ocelot->targets[target], addr + offset, val); in __ocelot_write_ix()
53 void __ocelot_rmw_ix(struct ocelot *ocelot, u32 val, u32 mask, in __ocelot_rmw_ix() argument
[all …]
H A Docelot_vcap.c49 static u32 vcap_read_update_ctrl(struct ocelot *ocelot, in vcap_read_update_ctrl() argument
52 return ocelot_target_read(ocelot, vcap->target, VCAP_CORE_UPDATE_CTRL); in vcap_read_update_ctrl()
55 static void vcap_cmd(struct ocelot *ocelot, const struct vcap_props *vcap, in vcap_cmd() argument
74 ocelot_target_write(ocelot, vcap->target, value, VCAP_CORE_UPDATE_CTRL); in vcap_cmd()
78 10, 100000, false, ocelot, vcap); in vcap_cmd()
82 static void vcap_row_cmd(struct ocelot *ocelot, const struct vcap_props *vcap, in vcap_row_cmd() argument
85 vcap_cmd(ocelot, vcap, vcap->entry_count - row - 1, cmd, sel); in vcap_row_cmd()
88 static void vcap_entry2cache(struct ocelot *ocelot, in vcap_entry2cache() argument
97 ocelot_target_write_rix(ocelot, vcap->target, data->entry[i], in vcap_entry2cache()
99 ocelot_target_write_rix(ocelot, vcap->target, ~data->mask[i], in vcap_entry2cache()
[all …]
H A Docelot_police.c23 int qos_policer_conf_set(struct ocelot *ocelot, u32 pol_ix, in qos_policer_conf_set() argument
105 dev_err(ocelot->dev, in qos_policer_conf_set()
112 dev_err(ocelot->dev, in qos_policer_conf_set()
119 dev_err(ocelot->dev, in qos_policer_conf_set()
126 dev_err(ocelot->dev, in qos_policer_conf_set()
138 ocelot_write_gix(ocelot, value, ANA_POL_MODE_CFG, pol_ix); in qos_policer_conf_set()
140 ocelot_write_gix(ocelot, in qos_policer_conf_set()
145 ocelot_write_gix(ocelot, in qos_policer_conf_set()
149 ocelot_write_gix(ocelot, in qos_policer_conf_set()
154 ocelot_write_gix(ocelot, in qos_policer_conf_set()
[all …]
H A Docelot_fdma.h154 struct ocelot *ocelot; member
157 void ocelot_fdma_init(struct platform_device *pdev, struct ocelot *ocelot);
158 void ocelot_fdma_start(struct ocelot *ocelot);
159 void ocelot_fdma_deinit(struct ocelot *ocelot);
160 int ocelot_fdma_inject_frame(struct ocelot *fdma, int port, u32 rew_op,
162 void ocelot_fdma_netdev_init(struct ocelot *ocelot, struct net_device *dev);
163 void ocelot_fdma_netdev_deinit(struct ocelot *ocelot,
H A Docelot_vcap.h15 int ocelot_vcap_filter_stats_update(struct ocelot *ocelot,
18 int ocelot_vcap_init(struct ocelot *ocelot);
H A Docelot_police.h34 int qos_policer_conf_set(struct ocelot *ocelot, u32 pol_ix,
/linux/include/soc/mscc/
H A Docelot.h34 * ocelot->num_phys_ports - 1, or a multicast set: the PGIDs from
35 * ocelot->num_phys_ports to 63. By convention, a unicast PGID corresponds to
73 #define for_each_unicast_dest_pgid(ocelot, pgid) \ argument
75 (pgid) < (ocelot)->num_phys_ports; \
78 #define for_each_nonreserved_multicast_dest_pgid(ocelot, pgid) \ argument
79 for ((pgid) = (ocelot)->num_phys_ports + 1; \
83 #define for_each_aggr_pgid(ocelot, pgid) \ argument
648 struct ocelot;
652 struct net_device *(*port_to_netdev)(struct ocelot *ocelot, in
773 struct ocelot *ocelot; global() member
812 struct ocelot { global() struct
817 opsocelot global() argument
831 portsocelot global() argument
850 npi_inj_prefixocelot global() argument
851 npi_xtr_prefixocelot global() argument
859 blockocelot global() argument
860 vcap_polocelot global() argument
862 mirrorocelot global() argument
864 psfpocelot global() argument
867 stats_workocelot global() argument
868 stats_queueocelot global() argument
870 stats_lockocelot global() argument
871 statsocelot global() argument
896 mmocelot global() argument
898 fdmaocelot global() argument
906 ocelot_bulk_read(ocelot,reg,buf,count) global() argument
909 ocelot_read_ix(ocelot,reg,gi,ri) global() argument
911 ocelot_read_gix(ocelot,reg,gi) global() argument
913 ocelot_read_rix(ocelot,reg,ri) global() argument
915 ocelot_read(ocelot,reg) global() argument
918 ocelot_write_ix(ocelot,val,reg,gi,ri) global() argument
920 ocelot_write_gix(ocelot,val,reg,gi) global() argument
922 ocelot_write_rix(ocelot,val,reg,ri) global() argument
924 ocelot_write(ocelot,val,reg) global() argument
926 ocelot_rmw_ix(ocelot,val,m,reg,gi,ri) global() argument
928 ocelot_rmw_gix(ocelot,val,m,reg,gi) global() argument
930 ocelot_rmw_rix(ocelot,val,m,reg,ri) global() argument
932 ocelot_rmw(ocelot,val,m,reg) global() argument
934 ocelot_field_write(ocelot,reg,val) global() argument
936 ocelot_field_read(ocelot,reg,val) global() argument
938 ocelot_fields_write(ocelot,id,reg,val) global() argument
940 ocelot_fields_read(ocelot,id,reg,val) global() argument
943 ocelot_target_read_ix(ocelot,target,reg,gi,ri) global() argument
945 ocelot_target_read_gix(ocelot,target,reg,gi) global() argument
947 ocelot_target_read_rix(ocelot,target,reg,ri) global() argument
949 ocelot_target_read(ocelot,target,reg) global() argument
952 ocelot_target_write_ix(ocelot,target,val,reg,gi,ri) global() argument
954 ocelot_target_write_gix(ocelot,target,val,reg,gi) global() argument
956 ocelot_target_write_rix(ocelot,target,val,reg,ri) global() argument
958 ocelot_target_write(ocelot,target,val,reg) global() argument
1198 ocelot_mrp_add(struct ocelot * ocelot,int port,const struct switchdev_obj_mrp * mrp) ocelot_mrp_add() argument
1204 ocelot_mrp_del(struct ocelot * ocelot,int port,const struct switchdev_obj_mrp * mrp) ocelot_mrp_del() argument
1211 ocelot_mrp_add_ring_role(struct ocelot * ocelot,int port,const struct switchdev_obj_ring_role_mrp * mrp) ocelot_mrp_add_ring_role() argument
1218 ocelot_mrp_del_ring_role(struct ocelot * ocelot,int port,const struct switchdev_obj_ring_role_mrp * mrp) ocelot_mrp_del_ring_role() argument
[all...]
H A Docelot_vcap.h14 #define OCELOT_VCAP_ES0_TAG_8021Q_RXVLAN(ocelot, port, upstream) ((upstream) << 16 | (port)) argument
15 #define OCELOT_VCAP_IS1_TAG_8021Q_TXVLAN(ocelot, port) (port) argument
16 #define OCELOT_VCAP_IS1_VLAN_RECLASSIFY(ocelot, port) ((ocelot)->num_phys_ports + (port)) argument
17 #define OCELOT_VCAP_IS2_TAG_8021Q_TXVLAN(ocelot, port) (port) argument
18 #define OCELOT_VCAP_IS2_MRP_REDIRECT(ocelot, port) ((ocelot)->num_phys_ports + (port)) argument
19 #define OCELOT_VCAP_IS2_MRP_TRAP(ocelot) ((ocelot)->num_phys_ports * 2) argument
20 #define OCELOT_VCAP_IS2_L2_PTP_TRAP(ocelot) ((ocelot)->num_phys_ports * 2 + 1) argument
21 #define OCELOT_VCAP_IS2_IPV4_GEN_PTP_TRAP(ocelot) ((ocelot)->num_phys_ports * 2 + 2) argument
22 #define OCELOT_VCAP_IS2_IPV4_EV_PTP_TRAP(ocelot) ((ocelot)->num_phys_ports * 2 + 3) argument
23 #define OCELOT_VCAP_IS2_IPV6_GEN_PTP_TRAP(ocelot) ((ocelot)->num_phys_ports * 2 + 4) argument
[all …]
H A Docelot_ptp.h57 int ocelot_init_timestamp(struct ocelot *ocelot,
59 int ocelot_deinit_timestamp(struct ocelot *ocelot);
/linux/arch/mips/boot/dts/mscc/
H A Docelot.dtsi7 compatible = "mscc,ocelot";
55 compatible = "mscc,ocelot-cpu-syscon", "syscon";
60 compatible = "mscc,ocelot-icpu-intr";
82 compatible = "mscc,ocelot-i2c", "snps,designware-i2c";
108 compatible = "mscc,ocelot-spi", "snps,dw-apb-ssi";
200 compatible = "mscc,ocelot-chip-reset";
205 compatible = "mscc,ocelot-pinctrl";
239 compatible = "mscc,ocelot-miim";
261 compatible = "mscc,ocelot-miim";
270 compatible = "mscc,ocelot-hsio", "syscon", "simple-mfd";
H A Docelot_pcb123.dts6 #include "ocelot.dtsi"
9 compatible = "mscc,ocelot-pcb123", "mscc,ocelot";
H A Docelot_pcb120.dts8 #include <dt-bindings/phy/phy-ocelot-serdes.h>
9 #include "ocelot.dtsi"
12 compatible = "mscc,ocelot-pcb120", "mscc,ocelot";
H A Djaguar2.dtsi59 compatible = "mscc,ocelot-cpu-syscon", "syscon";
142 compatible = "mscc,ocelot-i2c", "snps,designware-i2c";
155 compatible = "mscc,ocelot-i2c", "snps,designware-i2c";
H A Dluton.dtsi55 compatible = "mscc,ocelot-cpu-syscon", "syscon";
82 compatible = "mscc,ocelot-i2c", "snps,designware-i2c";
H A Dserval.dtsi58 compatible = "mscc,ocelot-cpu-syscon", "syscon";
141 compatible = "mscc,ocelot-i2c", "snps,designware-i2c";
/linux/Documentation/devicetree/bindings/mips/
H A Dmscc.txt7 - compatible: "mscc,ocelot", "mscc,luton", "mscc,serval" or "mscc,jr2"
19 - compatible: Should be "mscc,ocelot-chip-regs", "simple-mfd", "syscon"
24 compatible = "mscc,ocelot-chip-regs", "simple-mfd", "syscon";
35 - compatible: Should be "mscc,ocelot-hsio", "syscon", "simple-mfd"
40 compatible = "mscc,ocelot-hsio", "syscon", "simple-mfd";
/linux/Documentation/devicetree/bindings/power/reset/
H A Docelot-reset.txt11 - compatible: "mscc,ocelot-chip-reset", "mscc,luton-chip-reset",
16 compatible = "mscc,ocelot-chip-reset";
/linux/drivers/phy/mscc/
H A DMakefile6 obj-$(CONFIG_PHY_OCELOT_SERDES) := phy-ocelot-serdes.o

12