Lines Matching full:ocelot
2 /* Microsemi Ocelot Switch driver
7 #include <soc/mscc/ocelot.h>
21 #define POL_ORDER 0x1d3 /* Ocelot policer order: Serial (QoS -> Port -> VCAP) */
23 int qos_policer_conf_set(struct ocelot *ocelot, int port, u32 pol_ix, in qos_policer_conf_set() argument
105 dev_err(ocelot->dev, "Invalid pir for port %d: %u (max %lu)\n", in qos_policer_conf_set()
111 dev_err(ocelot->dev, "Invalid cir for port %d: %u (max %lu)\n", in qos_policer_conf_set()
117 dev_err(ocelot->dev, "Invalid pbs for port %d: %u (max %u)\n", in qos_policer_conf_set()
123 dev_err(ocelot->dev, "Invalid cbs for port %d: %u (max %u)\n", in qos_policer_conf_set()
134 ocelot_write_gix(ocelot, value, ANA_POL_MODE_CFG, pol_ix); in qos_policer_conf_set()
136 ocelot_write_gix(ocelot, in qos_policer_conf_set()
141 ocelot_write_gix(ocelot, in qos_policer_conf_set()
145 ocelot_write_gix(ocelot, in qos_policer_conf_set()
150 ocelot_write_gix(ocelot, in qos_policer_conf_set()
157 int ocelot_port_policer_add(struct ocelot *ocelot, int port, in ocelot_port_policer_add() argument
170 dev_dbg(ocelot->dev, "%s: port %u pir %u kbps, pbs %u bytes\n", in ocelot_port_policer_add()
173 err = qos_policer_conf_set(ocelot, port, POL_IX_PORT + port, &pp); in ocelot_port_policer_add()
177 ocelot_rmw_gix(ocelot, in ocelot_port_policer_add()
188 int ocelot_port_policer_del(struct ocelot *ocelot, int port) in ocelot_port_policer_del() argument
193 dev_dbg(ocelot->dev, "%s: port %u\n", __func__, port); in ocelot_port_policer_del()
197 err = qos_policer_conf_set(ocelot, port, POL_IX_PORT + port, &pp); in ocelot_port_policer_del()
201 ocelot_rmw_gix(ocelot, in ocelot_port_policer_del()