| /Linux-v5.15/include/soc/mscc/ |
| D | ocelot.h | 32 * ocelot->num_phys_ports - 1, or a multicast set: the PGIDs from 33 * ocelot->num_phys_ports to 63. By convention, a unicast PGID corresponds to 71 #define for_each_unicast_dest_pgid(ocelot, pgid) \ argument 73 (pgid) < (ocelot)->num_phys_ports; \ 76 #define for_each_nonreserved_multicast_dest_pgid(ocelot, pgid) \ argument 77 for ((pgid) = (ocelot)->num_phys_ports + 1; \ 81 #define for_each_aggr_pgid(ocelot, pgid) \ argument 549 struct ocelot; 552 struct net_device *(*port_to_netdev)(struct ocelot *ocelot, int port); 554 int (*reset)(struct ocelot *ocelot); [all …]
|
| D | ocelot_ptp.h | 3 * Microsemi Ocelot Switch driver 14 #include <soc/mscc/ocelot.h> 57 int ocelot_init_timestamp(struct ocelot *ocelot, 59 int ocelot_deinit_timestamp(struct ocelot *ocelot);
|
| /Linux-v5.15/drivers/net/ethernet/mscc/ |
| D | ocelot.c | 3 * Microsemi Ocelot Switch driver 7 #include <linux/dsa/ocelot.h> 11 #include "ocelot.h" 23 static inline u32 ocelot_mact_read_macaccess(struct ocelot *ocelot) in ocelot_mact_read_macaccess() argument 25 return ocelot_read(ocelot, ANA_TABLES_MACACCESS); in ocelot_mact_read_macaccess() 28 static inline int ocelot_mact_wait_for_completion(struct ocelot *ocelot) in ocelot_mact_wait_for_completion() argument 33 ocelot, val, in ocelot_mact_wait_for_completion() 39 static void ocelot_mact_select(struct ocelot *ocelot, in ocelot_mact_select() argument 56 ocelot_write(ocelot, macl, ANA_TABLES_MACLDATA); in ocelot_mact_select() 57 ocelot_write(ocelot, mach, ANA_TABLES_MACHDATA); in ocelot_mact_select() [all …]
|
| D | ocelot_net.c | 2 /* Microsemi Ocelot Switch driver 11 #include <linux/dsa/ocelot.h> 16 #include "ocelot.h" 21 static struct ocelot *devlink_port_to_ocelot(struct devlink_port *dlp) in devlink_port_to_ocelot() 28 struct ocelot *ocelot = devlink_port_to_ocelot(dlp); in devlink_port_to_port() local 30 return dlp - ocelot->devlink_ports; in devlink_port_to_port() 37 struct ocelot *ocelot = devlink_priv(dl); in ocelot_devlink_sb_pool_get() local 39 return ocelot_sb_pool_get(ocelot, sb_index, pool_index, pool_info); in ocelot_devlink_sb_pool_get() 47 struct ocelot *ocelot = devlink_priv(dl); in ocelot_devlink_sb_pool_set() local 49 return ocelot_sb_pool_set(ocelot, sb_index, pool_index, size, in ocelot_devlink_sb_pool_set() [all …]
|
| D | ocelot_ptp.c | 2 /* Microsemi Ocelot PTP clock driver 11 #include <soc/mscc/ocelot.h> 15 struct ocelot *ocelot = container_of(ptp, struct ocelot, ptp_info); in ocelot_ptp_gettime64() local 21 spin_lock_irqsave(&ocelot->ptp_clock_lock, flags); in ocelot_ptp_gettime64() 23 val = ocelot_read_rix(ocelot, PTP_PIN_CFG, TOD_ACC_PIN); in ocelot_ptp_gettime64() 26 ocelot_write_rix(ocelot, val, PTP_PIN_CFG, TOD_ACC_PIN); in ocelot_ptp_gettime64() 28 s = ocelot_read_rix(ocelot, PTP_PIN_TOD_SEC_MSB, TOD_ACC_PIN) & 0xffff; in ocelot_ptp_gettime64() 30 s += ocelot_read_rix(ocelot, PTP_PIN_TOD_SEC_LSB, TOD_ACC_PIN); in ocelot_ptp_gettime64() 31 ns = ocelot_read_rix(ocelot, PTP_PIN_TOD_NSEC, TOD_ACC_PIN); in ocelot_ptp_gettime64() 33 spin_unlock_irqrestore(&ocelot->ptp_clock_lock, flags); in ocelot_ptp_gettime64() [all …]
|
| D | ocelot_io.c | 3 * Microsemi Ocelot Switch driver 11 #include "ocelot.h" 13 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() [all …]
|
| D | ocelot_devlink.c | 5 #include "ocelot.h" 221 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() [all …]
|
| D | ocelot_mrp.c | 2 /* Microsemi Ocelot Switch driver 12 #include "ocelot.h" 18 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 73 err = ocelot_vcap_filter_add(ocelot, filter, NULL); in ocelot_mrp_redirect_add_vcap() [all …]
|
| D | ocelot_vcap.c | 2 /* Microsemi Ocelot Switch driver 49 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() [all …]
|
| D | ocelot_vsc7514.c | 3 * Microsemi Ocelot Switch driver 7 #include <linux/dsa/ocelot.h> 21 #include "ocelot.h" 484 static void ocelot_pll5_init(struct ocelot *ocelot) in ocelot_pll5_init() argument 487 * The values are coming from the VTSS API for Ocelot in ocelot_pll5_init() 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() [all …]
|
| D | ocelot.h | 3 * Microsemi Ocelot Switch driver 24 #include <soc/mscc/ocelot.h> 70 /* A (PGID) port mask structure, encoding the 2^ocelot->num_phys_ports 95 int ocelot_mact_learn(struct ocelot *ocelot, int port, 98 int ocelot_mact_forget(struct ocelot *ocelot, 100 struct net_device *ocelot_port_to_netdev(struct ocelot *ocelot, int port); 106 int ocelot_probe_port(struct ocelot *ocelot, int port, struct regmap *target, 109 int ocelot_devlink_init(struct ocelot *ocelot); 110 void ocelot_devlink_teardown(struct ocelot *ocelot); 111 int ocelot_port_devlink_init(struct ocelot *ocelot, int port, [all …]
|
| D | ocelot_police.c | 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() [all …]
|
| D | ocelot_flower.c | 2 /* Microsemi Ocelot Switch driver 35 * offload support in Ocelot in ocelot_chain_to_block() 119 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() 245 egress_port = ocelot->ops->netdev_to_port(a->dev); in ocelot_flower_parse_action() 248 "Destination not an ocelot port"); in ocelot_flower_parse_action() 373 static int ocelot_flower_parse_indev(struct ocelot *ocelot, int port, in ocelot_flower_parse_indev() argument [all …]
|
| D | ocelot_vcap.h | 2 /* Microsemi Ocelot Switch driver 9 #include "ocelot.h" 15 int ocelot_vcap_filter_stats_update(struct ocelot *ocelot, 18 void ocelot_detect_vcap_constants(struct ocelot *ocelot); 19 int ocelot_vcap_init(struct ocelot *ocelot);
|
| D | Kconfig | 22 This is a hardware support library for Ocelot network switches. It is 26 tristate "Ocelot switch driver" 35 This driver supports the Ocelot network switch device as present on 36 the Ocelot SoCs (VSC7514).
|
| D | ocelot_police.h | 2 /* Microsemi Ocelot Switch driver 10 #include "ocelot.h" 33 int qos_policer_conf_set(struct ocelot *ocelot, int port, u32 pol_ix,
|
| /Linux-v5.15/drivers/net/dsa/ocelot/ |
| D | felix.c | 5 * register-compatible with Ocelot and that perform I/O to their host CPU 15 #include <soc/mscc/ocelot.h> 17 #include <linux/dsa/ocelot.h> 33 struct ocelot *ocelot = &felix->ocelot; in felix_tag_8021q_rxvlan_add() local 44 key_length = ocelot->vcap[VCAP_ES0].keys[VCAP_ES0_IGR_PORT].length; in felix_tag_8021q_rxvlan_add() 68 err = ocelot_vcap_filter_add(ocelot, outer_tagging_rule, NULL); in felix_tag_8021q_rxvlan_add() 79 struct ocelot *ocelot = &felix->ocelot; in felix_tag_8021q_txvlan_add() local 87 if (ocelot->ports[port]->is_dsa_8021q_cpu) in felix_tag_8021q_txvlan_add() 117 err = ocelot_vcap_filter_add(ocelot, untagging_rule, NULL); in felix_tag_8021q_txvlan_add() 136 err = ocelot_vcap_filter_add(ocelot, redirect_rule, NULL); in felix_tag_8021q_txvlan_add() [all …]
|
| D | felix.h | 7 #define ocelot_to_felix(o) container_of((o), struct felix, ocelot) 28 /* Some Ocelot switches are integrated into the SoC without the 40 int (*mdio_bus_alloc)(struct ocelot *ocelot); 41 void (*mdio_bus_free)(struct ocelot *ocelot); 42 void (*phylink_validate)(struct ocelot *ocelot, int port, 45 int (*prevalidate_phy_mode)(struct ocelot *ocelot, int port, 49 void (*port_sched_speed_set)(struct ocelot *ocelot, int port, 55 /* DSA glue / front-end for struct ocelot */ 59 struct ocelot ocelot; member 68 struct net_device *felix_port_to_netdev(struct ocelot *ocelot, int port);
|
| D | felix_vsc9959.c | 10 #include <soc/mscc/ocelot.h> 11 #include <linux/dsa/ocelot.h> 890 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() [all …]
|
| D | seville_vsc9953.c | 8 #include <soc/mscc/ocelot.h> 11 #include <linux/dsa/ocelot.h> 862 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() [all …]
|
| /Linux-v5.15/Documentation/devicetree/bindings/mips/ |
| D | mscc.txt | 7 - 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"; 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.15/arch/mips/boot/dts/mscc/ |
| D | ocelot.dtsi | 7 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"; 199 compatible = "mscc,ocelot-chip-reset"; 204 compatible = "mscc,ocelot-pinctrl"; 238 compatible = "mscc,ocelot-miim"; 260 compatible = "mscc,ocelot-miim"; 269 compatible = "mscc,ocelot-hsio", "syscon", "simple-mfd";
|
| /Linux-v5.15/Documentation/devicetree/bindings/interrupt-controller/ |
| D | mscc,ocelot-icpu-intr.yaml | 4 $id: "http://devicetree.org/schemas/interrupt-controller/mscc,ocelot-icpu-intr.yaml#" 7 title: Microsemi Ocelot SoC ICPU Interrupt Controller 16 the Microsemi Ocelot interrupt controller that is part of the 26 - mscc,ocelot-icpu-intr 56 compatible = "mscc,ocelot-icpu-intr";
|
| /Linux-v5.15/Documentation/devicetree/bindings/phy/ |
| D | phy-ocelot-serdes.txt | 1 Microsemi Ocelot SerDes muxing driver 4 On Microsemi Ocelot, there is a handful of registers in HSIO address 19 This is a child of the HSIO syscon ("mscc,ocelot-hsio", see 20 Documentation/devicetree/bindings/mips/mscc.txt) on the Microsemi Ocelot. 28 defined in dt-bindings/phy/phy-ocelot-serdes.h
|
| /Linux-v5.15/arch/mips/generic/ |
| D | board-ocelot.its.S | 5 description = "MSCC Ocelot PCB123 Device Tree"; 16 description = "MSCC Ocelot PCB120 Device Tree"; 29 description = "Ocelot Linux kernel"; 35 description = "Ocelot Linux kernel";
|