| /linux/drivers/net/ethernet/mscc/ |
| H A D | ocelot.c | 3 * Microsemi Ocelot Switch driver 7 #include <linux/dsa/ocelot.h> 14 #include "ocelot.h" 30 /* Caller must hold &ocelot->mact_lock */ 31 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() 36 /* Caller must hold &ocelot->mact_lock */ 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() 48 /* Caller must hold &ocelot->mact_lock */ [all …]
|
| H A D | ocelot_fdma.c | 13 #include <linux/dsa/ocelot.h> 22 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() [all …]
|
| H A D | ocelot_stats.c | 2 /* Statistics for Ocelot switch family 11 #include "ocelot.h" 153 * and copied to ocelot->stats. 312 ocelot_get_stats_layout(struct ocelot *ocelot) in ocelot_get_stats_layout() argument 314 if (ocelot->mm_supported) in ocelot_get_stats_layout() 321 * Caller must hold &ocelot->stat_view_lock. 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() [all …]
|
| H A 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 63 filter->id.cookie = OCELOT_VCAP_IS2_MRP_REDIRECT(ocelot, src_port); in ocelot_mrp_redirect_add_vcap() [all …]
|
| H A D | ocelot_io.c | 3 * Microsemi Ocelot Switch driver 11 #include "ocelot.h" 13 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() [all …]
|
| H A D | ocelot_mm.c | 9 #include <soc/mscc/ocelot.h> 13 #include "ocelot.h" 52 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 [all …]
|
| H A 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 …]
|
| H A 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 …]
|
| H A 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, 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() [all …]
|
| H A D | ocelot_fdma.h | 10 #include "ocelot.h" 144 * @ocelot: Back-pointer to ocelot struct 154 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 D | ocelot_vcap.h | 2 /* Microsemi Ocelot Switch driver 9 #include "ocelot.h" 15 int ocelot_vcap_filter_stats_update(struct ocelot *ocelot, 18 int ocelot_vcap_init(struct ocelot *ocelot);
|
| H A D | Kconfig | 23 This is a hardware support library for Ocelot network switches. It is 27 tristate "Ocelot switch driver" 36 This driver supports the Ocelot network switch device as present on 37 the Ocelot SoCs (VSC7514).
|
| H A D | ocelot_police.h | 2 /* Microsemi Ocelot Switch driver 10 #include "ocelot.h" 34 int qos_policer_conf_set(struct ocelot *ocelot, u32 pol_ix,
|
| /linux/drivers/net/dsa/ocelot/ |
| H A D | felix_vsc9959.c | 13 #include <soc/mscc/ocelot.h> 14 #include <linux/dsa/ocelot.h> 880 static int vsc9959_gcb_soft_rst_status(struct ocelot *ocelot) in vsc9959_gcb_soft_rst_status() argument 884 ocelot_field_read(ocelot, GCB_SOFT_RST_SWC_RST, &val); in vsc9959_gcb_soft_rst_status() 889 static int vsc9959_sys_ram_init_status(struct ocelot *ocelot) in vsc9959_sys_ram_init_status() argument 891 return ocelot_read(ocelot, SYS_RAM_INIT); in vsc9959_sys_ram_init_status() 897 static int vsc9959_reset(struct ocelot *ocelot) in vsc9959_reset() argument 902 ocelot_field_write(ocelot, GCB_SOFT_RST_SWC_RST, 1); in vsc9959_reset() 904 err = readx_poll_timeout(vsc9959_gcb_soft_rst_status, ocelot, val, !val, in vsc9959_reset() 907 dev_err(ocelot->dev, "timeout: switch core reset\n"); in vsc9959_reset() [all …]
|
| H A D | Kconfig | 6 register-compatible with Ocelot and that perform I/O to their host 12 tristate "Ocelot External Ethernet switch support" 26 The Ocelot switch family is a set of multi-port networking chips. All 33 tristate "Ocelot / Felix Ethernet switch support" 51 tristate "Ocelot / Seville Ethernet switch support"
|
| H A D | seville_vsc9953.c | 9 #include <soc/mscc/ocelot.h> 13 #include <linux/dsa/ocelot.h> 784 static int vsc9953_gcb_soft_rst_status(struct ocelot *ocelot) in vsc9953_gcb_soft_rst_status() argument 788 ocelot_field_read(ocelot, GCB_SOFT_RST_SWC_RST, &val); in vsc9953_gcb_soft_rst_status() 793 static int vsc9953_sys_ram_init_status(struct ocelot *ocelot) in vsc9953_sys_ram_init_status() argument 797 ocelot_field_read(ocelot, SYS_RESET_CFG_MEM_INIT, &val); in vsc9953_sys_ram_init_status() 807 static int vsc9953_reset(struct ocelot *ocelot) in vsc9953_reset() argument 812 ocelot_field_write(ocelot, GCB_SOFT_RST_SWC_RST, 1); in vsc9953_reset() 814 err = readx_poll_timeout(vsc9953_gcb_soft_rst_status, ocelot, val, !val, in vsc9953_reset() 817 dev_err(ocelot->dev, "timeout: switch core reset\n"); in vsc9953_reset() [all …]
|
| /linux/drivers/mfd/ |
| H A D | ocelot-core.c | 3 * Core driver for the Ocelot chip family. 22 #include <linux/mfd/ocelot.h> 27 #include <soc/mscc/ocelot.h> 29 #include "ocelot.h" 164 .name = "ocelot-pinctrl", 165 .of_compatible = "mscc,ocelot-pinctrl", 169 .name = "ocelot-sgpio", 170 .of_compatible = "mscc,ocelot-sgpio", 174 .name = "ocelot-miim0", 175 .of_compatible = "mscc,ocelot-miim", [all …]
|
| /linux/include/soc/mscc/ |
| H A D | ocelot_vcap.h | 2 * Microsemi Ocelot Switch driver 9 #include <soc/mscc/ocelot.h> 14 #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 [all …]
|
| H A 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/Documentation/devicetree/bindings/mfd/ |
| H A D | mscc,ocelot.yaml | 4 $id: http://devicetree.org/schemas/mfd/mscc,ocelot.yaml# 7 title: Ocelot Externally-Controlled Ethernet Switch 13 The Ocelot ethernet switch family contains chips that have an internal CPU 42 $ref: /schemas/pinctrl/mscc,ocelot-pinctrl.yaml 50 - mscc,ocelot-sgpio 58 - mscc,ocelot-miim 91 compatible = "mscc,ocelot-miim"; 102 compatible = "mscc,ocelot-miim"; 115 compatible = "mscc,ocelot-pinctrl"; 133 compatible = "mscc,ocelot-sgpio";
|
| /linux/Documentation/devicetree/bindings/mips/ |
| H A 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"; 35 - compatible: Should be "mscc,ocelot-hsio", "syscon", "simple-mfd" 40 compatible = "mscc,ocelot-hsio", "syscon", "simple-mfd";
|
| /linux/arch/mips/boot/dts/mscc/ |
| H A 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"; 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";
|
| /linux/Documentation/devicetree/bindings/phy/ |
| H A D | mscc,vsc7514-serdes.yaml | 7 title: Microsemi Ocelot SerDes muxing 14 On Microsemi Ocelot, there is a handful of registers in HSIO address 29 This is a child of the HSIO syscon ("mscc,ocelot-hsio", see 30 Documentation/devicetree/bindings/mips/mscc.txt) on the Microsemi Ocelot. 42 dt-bindings/phy/phy-ocelot-serdes.h
|
| /linux/arch/mips/generic/ |
| H A 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";
|
| /linux/drivers/power/reset/ |
| H A D | ocelot-reset.c | 100 .syscon = "mscc,ocelot-cpu-syscon", 107 .syscon = "mscc,ocelot-cpu-syscon", 114 .syscon = "mscc,ocelot-cpu-syscon", 135 .compatible = "mscc,ocelot-chip-reset", 147 .name = "ocelot-chip-reset",
|