Home
last modified time | relevance | path

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

12

/Linux-v5.10/drivers/net/ethernet/mscc/
Docelot.c21 static inline u32 ocelot_mact_read_macaccess(struct ocelot *ocelot) in ocelot_mact_read_macaccess() argument
23 return ocelot_read(ocelot, ANA_TABLES_MACACCESS); in ocelot_mact_read_macaccess()
26 static inline int ocelot_mact_wait_for_completion(struct ocelot *ocelot) in ocelot_mact_wait_for_completion() argument
31 ocelot, val, in ocelot_mact_wait_for_completion()
37 static void ocelot_mact_select(struct ocelot *ocelot, in ocelot_mact_select() argument
54 ocelot_write(ocelot, macl, ANA_TABLES_MACLDATA); in ocelot_mact_select()
55 ocelot_write(ocelot, mach, ANA_TABLES_MACHDATA); in ocelot_mact_select()
59 int ocelot_mact_learn(struct ocelot *ocelot, int port, in ocelot_mact_learn() argument
63 ocelot_mact_select(ocelot, mac, vid); in ocelot_mact_learn()
66 ocelot_write(ocelot, ANA_TABLES_MACACCESS_VALID | in ocelot_mact_learn()
[all …]
Docelot_ptp.c13 struct ocelot *ocelot = container_of(ptp, struct ocelot, ptp_info); in ocelot_ptp_gettime64() local
19 spin_lock_irqsave(&ocelot->ptp_clock_lock, flags); in ocelot_ptp_gettime64()
21 val = ocelot_read_rix(ocelot, PTP_PIN_CFG, TOD_ACC_PIN); in ocelot_ptp_gettime64()
24 ocelot_write_rix(ocelot, val, PTP_PIN_CFG, TOD_ACC_PIN); in ocelot_ptp_gettime64()
26 s = ocelot_read_rix(ocelot, PTP_PIN_TOD_SEC_MSB, TOD_ACC_PIN) & 0xffff; in ocelot_ptp_gettime64()
28 s += ocelot_read_rix(ocelot, PTP_PIN_TOD_SEC_LSB, TOD_ACC_PIN); in ocelot_ptp_gettime64()
29 ns = ocelot_read_rix(ocelot, PTP_PIN_TOD_NSEC, TOD_ACC_PIN); in ocelot_ptp_gettime64()
31 spin_unlock_irqrestore(&ocelot->ptp_clock_lock, flags); in ocelot_ptp_gettime64()
48 struct ocelot *ocelot = container_of(ptp, struct ocelot, ptp_info); in ocelot_ptp_settime64() local
52 spin_lock_irqsave(&ocelot->ptp_clock_lock, flags); in ocelot_ptp_settime64()
[all …]
Docelot_net.c15 struct ocelot *ocelot = priv->port.ocelot; in ocelot_setup_tc_cls_flower() local
23 return ocelot_cls_flower_replace(ocelot, port, f, ingress); in ocelot_setup_tc_cls_flower()
25 return ocelot_cls_flower_destroy(ocelot, port, f, ingress); in ocelot_setup_tc_cls_flower()
27 return ocelot_cls_flower_stats(ocelot, port, f, ingress); in ocelot_setup_tc_cls_flower()
38 struct ocelot *ocelot = priv->port.ocelot; in ocelot_setup_tc_cls_matchall() local
79 err = ocelot_port_policer_add(ocelot, port, &pol); in ocelot_setup_tc_cls_matchall()
92 err = ocelot_port_policer_del(ocelot, port); in ocelot_setup_tc_cls_matchall()
203 struct ocelot *ocelot = priv->port.ocelot; in ocelot_port_adjust_link() local
206 ocelot_adjust_link(ocelot, port, dev->phydev); in ocelot_port_adjust_link()
214 struct ocelot *ocelot = ocelot_port->ocelot; in ocelot_vlan_vid_add() local
[all …]
Docelot_io.c13 u32 __ocelot_read_ix(struct ocelot *ocelot, u32 reg, u32 offset) in __ocelot_read_ix() argument
20 regmap_read(ocelot->targets[target], in __ocelot_read_ix()
21 ocelot->map[target][reg & REG_MASK] + offset, &val); in __ocelot_read_ix()
26 void __ocelot_write_ix(struct ocelot *ocelot, u32 val, u32 reg, u32 offset) in __ocelot_write_ix() argument
32 regmap_write(ocelot->targets[target], in __ocelot_write_ix()
33 ocelot->map[target][reg & REG_MASK] + offset, val); in __ocelot_write_ix()
37 void __ocelot_rmw_ix(struct ocelot *ocelot, u32 val, u32 mask, u32 reg, in __ocelot_rmw_ix() argument
44 regmap_update_bits(ocelot->targets[target], in __ocelot_rmw_ix()
45 ocelot->map[target][reg & REG_MASK] + offset, in __ocelot_rmw_ix()
52 struct ocelot *ocelot = port->ocelot; in ocelot_port_readl() local
[all …]
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 …]
Docelot_vsc7514.c484 static void ocelot_pll5_init(struct ocelot *ocelot) in ocelot_pll5_init() argument
489 regmap_write(ocelot->targets[HSIO], HSIO_PLL5G_CFG4, in ocelot_pll5_init()
492 regmap_write(ocelot->targets[HSIO], HSIO_PLL5G_CFG0, in ocelot_pll5_init()
504 regmap_write(ocelot->targets[HSIO], HSIO_PLL5G_CFG2, in ocelot_pll5_init()
513 static int ocelot_chip_init(struct ocelot *ocelot, const struct ocelot_ops *ops) in ocelot_chip_init() argument
517 ocelot->map = ocelot_regmap; in ocelot_chip_init()
518 ocelot->stats_layout = ocelot_stats_layout; in ocelot_chip_init()
519 ocelot->num_stats = ARRAY_SIZE(ocelot_stats_layout); in ocelot_chip_init()
520 ocelot->shared_queue_sz = 224 * 1024; in ocelot_chip_init()
521 ocelot->num_mact_rows = 1024; in ocelot_chip_init()
[all …]
Docelot_police.c23 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()
[all …]
Docelot.h92 int ocelot_mact_learn(struct ocelot *ocelot, int port,
95 int ocelot_mact_forget(struct ocelot *ocelot,
97 int ocelot_port_lag_join(struct ocelot *ocelot, int port,
99 void ocelot_port_lag_leave(struct ocelot *ocelot, int port,
101 struct net_device *ocelot_port_to_netdev(struct ocelot *ocelot, int port);
107 int ocelot_probe_port(struct ocelot *ocelot, int port, struct regmap *target,
110 void ocelot_set_cpu_port(struct ocelot *ocelot, int cpu,
Docelot_flower.c119 ocelot_find_vcap_filter_that_points_at(struct ocelot *ocelot, int chain) in ocelot_find_vcap_filter_that_points_at() argument
130 block = &ocelot->block[VCAP_IS1]; in ocelot_find_vcap_filter_that_points_at()
138 list_for_each_entry(filter, &ocelot->dummy_rules, list) in ocelot_find_vcap_filter_that_points_at()
145 static int ocelot_flower_parse_action(struct ocelot *ocelot, int port, in ocelot_flower_parse_action() argument
149 struct ocelot_port *ocelot_port = ocelot->ports[port]; in ocelot_flower_parse_action()
240 egress_port = ocelot->ops->netdev_to_port(a->dev); in ocelot_flower_parse_action()
368 static int ocelot_flower_parse_indev(struct ocelot *ocelot, int port, in ocelot_flower_parse_indev() argument
373 const struct vcap_props *vcap = &ocelot->vcap[VCAP_ES0]; in ocelot_flower_parse_indev()
390 dev = ocelot->ops->port_to_netdev(ocelot, port); in ocelot_flower_parse_indev()
401 ingress_port = ocelot->ops->netdev_to_port(indev); in ocelot_flower_parse_indev()
[all …]
Docelot_vcap.h299 int ocelot_vcap_filter_add(struct ocelot *ocelot,
302 int ocelot_vcap_filter_del(struct ocelot *ocelot,
304 int ocelot_vcap_filter_stats_update(struct ocelot *ocelot,
309 void ocelot_detect_vcap_constants(struct ocelot *ocelot);
310 int ocelot_vcap_init(struct ocelot *ocelot);
Docelot_police.h33 int qos_policer_conf_set(struct ocelot *ocelot, int port, u32 pol_ix,
/Linux-v5.10/drivers/net/dsa/ocelot/
Dfelix.c37 struct ocelot *ocelot = ds->priv; in felix_set_ageing_time() local
39 ocelot_set_ageing_time(ocelot, ageing_time); in felix_set_ageing_time()
47 struct ocelot *ocelot = ds->priv; in felix_fdb_dump() local
49 return ocelot_fdb_dump(ocelot, port, cb, data); in felix_fdb_dump()
55 struct ocelot *ocelot = ds->priv; in felix_fdb_add() local
57 return ocelot_fdb_add(ocelot, port, addr, vid); in felix_fdb_add()
63 struct ocelot *ocelot = ds->priv; in felix_fdb_del() local
65 return ocelot_fdb_del(ocelot, port, addr, vid); in felix_fdb_del()
78 struct ocelot *ocelot = ds->priv; in felix_mdb_add() local
80 ocelot_port_mdb_add(ocelot, port, mdb); in felix_mdb_add()
[all …]
Dfelix.h7 #define ocelot_to_felix(o) container_of((o), struct felix, ocelot)
28 int (*mdio_bus_alloc)(struct ocelot *ocelot);
29 void (*mdio_bus_free)(struct ocelot *ocelot);
30 void (*phylink_validate)(struct ocelot *ocelot, int port,
33 int (*prevalidate_phy_mode)(struct ocelot *ocelot, int port,
37 void (*port_sched_speed_set)(struct ocelot *ocelot, int port,
39 void (*xmit_template_populate)(struct ocelot *ocelot, int port);
48 struct ocelot ocelot; member
55 struct net_device *felix_port_to_netdev(struct ocelot *ocelot, int port);
Dfelix_vsc9959.c890 static int vsc9959_gcb_soft_rst_status(struct ocelot *ocelot) in vsc9959_gcb_soft_rst_status() argument
894 ocelot_field_read(ocelot, GCB_SOFT_RST_SWC_RST, &val); in vsc9959_gcb_soft_rst_status()
899 static int vsc9959_sys_ram_init_status(struct ocelot *ocelot) in vsc9959_sys_ram_init_status() argument
901 return ocelot_read(ocelot, SYS_RAM_INIT); in vsc9959_sys_ram_init_status()
907 static int vsc9959_reset(struct ocelot *ocelot) in vsc9959_reset() argument
912 ocelot_field_write(ocelot, GCB_SOFT_RST_SWC_RST, 1); in vsc9959_reset()
914 err = readx_poll_timeout(vsc9959_gcb_soft_rst_status, ocelot, val, !val, in vsc9959_reset()
917 dev_err(ocelot->dev, "timeout: switch core reset\n"); in vsc9959_reset()
922 ocelot_write(ocelot, SYS_RAM_INIT_RAM_INIT, SYS_RAM_INIT); in vsc9959_reset()
923 err = readx_poll_timeout(vsc9959_sys_ram_init_status, ocelot, val, !val, in vsc9959_reset()
[all …]
Dseville_vsc9953.c862 static int vsc9953_gcb_soft_rst_status(struct ocelot *ocelot) in vsc9953_gcb_soft_rst_status() argument
866 ocelot_field_read(ocelot, GCB_SOFT_RST_SWC_RST, &val); in vsc9953_gcb_soft_rst_status()
871 static int vsc9953_sys_ram_init_status(struct ocelot *ocelot) in vsc9953_sys_ram_init_status() argument
875 ocelot_field_read(ocelot, SYS_RESET_CFG_MEM_INIT, &val); in vsc9953_sys_ram_init_status()
880 static int vsc9953_gcb_miim_pending_status(struct ocelot *ocelot) in vsc9953_gcb_miim_pending_status() argument
884 ocelot_field_read(ocelot, GCB_MIIM_MII_STATUS_PENDING, &val); in vsc9953_gcb_miim_pending_status()
889 static int vsc9953_gcb_miim_busy_status(struct ocelot *ocelot) in vsc9953_gcb_miim_busy_status() argument
893 ocelot_field_read(ocelot, GCB_MIIM_MII_STATUS_BUSY, &val); in vsc9953_gcb_miim_busy_status()
901 struct ocelot *ocelot = bus->priv; in vsc9953_mdio_write() local
905 err = readx_poll_timeout(vsc9953_gcb_miim_pending_status, ocelot, in vsc9953_mdio_write()
[all …]
/Linux-v5.10/include/soc/mscc/
Docelot.h68 #define for_each_unicast_dest_pgid(ocelot, pgid) \ argument
70 (pgid) < (ocelot)->num_phys_ports; \
73 #define for_each_nonreserved_multicast_dest_pgid(ocelot, pgid) \ argument
74 for ((pgid) = (ocelot)->num_phys_ports + 1; \
78 #define for_each_aggr_pgid(ocelot, pgid) \ argument
559 struct ocelot;
562 struct net_device *(*port_to_netdev)(struct ocelot *ocelot, int port);
564 int (*reset)(struct ocelot *ocelot);
575 struct ocelot *ocelot; member
597 struct ocelot { struct
[all …]
Docelot_ptp.h56 int ocelot_init_timestamp(struct ocelot *ocelot,
58 int ocelot_deinit_timestamp(struct ocelot *ocelot);
/Linux-v5.10/Documentation/devicetree/bindings/mips/
Dmscc.txt7 - compatible: "mscc,ocelot"
19 - compatible: Should be "mscc,ocelot-chip-regs", "simple-mfd", "syscon"
24 compatible = "mscc,ocelot-chip-regs", "simple-mfd", "syscon";
36 - compatible: Should be "mscc,ocelot-cpu-syscon", "syscon"
41 compatible = "mscc,ocelot-cpu-syscon", "syscon";
52 - compatible: Should be "mscc,ocelot-hsio", "syscon", "simple-mfd"
57 compatible = "mscc,ocelot-hsio", "syscon", "simple-mfd";
/Linux-v5.10/arch/mips/boot/dts/mscc/
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";
188 compatible = "mscc,ocelot-chip-reset";
193 compatible = "mscc,ocelot-pinctrl";
227 compatible = "mscc,ocelot-miim";
249 compatible = "mscc,ocelot-miim";
258 compatible = "mscc,ocelot-hsio", "syscon", "simple-mfd";
Docelot_pcb123.dts6 #include "ocelot.dtsi"
9 compatible = "mscc,ocelot-pcb123", "mscc,ocelot";
Docelot_pcb120.dts8 #include <dt-bindings/phy/phy-ocelot-serdes.h>
9 #include "ocelot.dtsi"
12 compatible = "mscc,ocelot-pcb120", "mscc,ocelot";
/Linux-v5.10/net/dsa/
Dtag_ocelot.c142 struct ocelot *ocelot = ds->priv; in ocelot_xmit() local
154 ocelot_port = ocelot->ports[dp->index]; in ocelot_xmit()
189 struct ocelot *ocelot = ds->priv; in ocelot_rcv() local
255 if (ocelot->ports[src_port]->vlan_aware && in ocelot_rcv()
/Linux-v5.10/Documentation/devicetree/bindings/pinctrl/
Dmscc,ocelot-pinctrl.txt5 - compatible : Should be "mscc,ocelot-pinctrl",
16 The ocelot-pinctrl driver uses the generic pin multiplexing and generic pin
25 compatible = "mscc,ocelot-pinctrl";
/Linux-v5.10/Documentation/devicetree/bindings/power/reset/
Docelot-reset.txt10 - compatible: "mscc,ocelot-chip-reset" or "microchip,sparx5-chip-reset"
14 compatible = "mscc,ocelot-chip-reset";
/Linux-v5.10/Documentation/devicetree/bindings/interrupt-controller/
Dmscc,ocelot-icpu-intr.txt5 - compatible : should be "mscc,ocelot-icpu-intr"
15 compatible = "mscc,ocelot-icpu-intr";

12