Home
last modified time | relevance | path

Searched +full:ocelot +full:- +full:1 (Results 1 – 25 of 47) sorted by relevance

12

/linux/drivers/net/ethernet/mscc/
H A Docelot.c1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
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()
[all …]
H A Docelot_fdma.c1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
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()
43 return (dma - base) / sizeof(struct ocelot_fdma_dcb); in ocelot_fdma_dma_idx()
48 return unlikely(idx == ring_sz - 1) ? 0 : idx + 1; in ocelot_fdma_idx_next()
53 return unlikely(idx == 0) ? ring_sz - 1 : idx - 1; in ocelot_fdma_idx_prev()
58 struct ocelot_fdma_rx_ring *rx_ring = &fdma->rx_ring; in ocelot_fdma_rx_ring_free()
[all …]
H A Docelot_devlink.c1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
2 /* Copyright 2020-2021 NXP
5 #include "ocelot.h"
9 * Resource 1: Frame references tracked per source port
17 #define REF_xxxx_I (1 * OCELOT_RESOURCE_SZ)
33 * ----------------------
128 * ------------------
153 (BUF_xxxx_E + xxx_COL_SHR_x + (1 - (dp)))
175 (BUF_xxxx_I + xxx_COL_SHR_x + (1 - (dp)))
197 (REF_xxxx_E + xxx_COL_SHR_x + (1 - (dp)))
[all …]
H A Docelot_mrp.c1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
2 /* Microsemi Ocelot Switch driver
5 * Copyright 2020-2021 NXP
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()
29 if (ocelot_port->mrp_ring_id == p->mrp_ring_id) in ocelot_mrp_find_partner_port()
33 return -1; in ocelot_mrp_find_partner_port()
36 static int ocelot_mrp_del_vcap(struct ocelot *ocelot, int id) in ocelot_mrp_del_vcap() argument
[all …]
H A Docelot_vcap.c1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
2 /* Microsemi Ocelot Switch driver
24 VCAP_CMD_READ = 1, /* Copy from TCAM to Cache */
40 u32 tg_sw; /* Current type-group */
45 u32 tg_value; /* Current type-group value */
46 u32 tg_mask; /* Current type-group mask */
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
62 if ((sel & VCAP_SEL_ENTRY) && ix >= vcap->entry_count) in vcap_cmd()
[all …]
H A Docelot_stats.c1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
2 /* Statistics for Ocelot switch family
11 #include "ocelot.h"
152 /* 32-bit counter checked for wraparound by ocelot_port_update_stats()
153 * and copied to ocelot->stats.
157 /* Same as above, except also exported to ethtool -S. Standard counters should
312 ocelot_get_stats_layout(struct ocelot *ocelot) in ocelot_get_stats_layout() argument
314 if (ocelot->mm_supported) in ocelot_get_stats_layout()
320 /* Read the counters from hardware and keep them in region->buf.
321 * Caller must hold &ocelot->stat_view_lock.
[all …]
H A Docelot_police.c1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
2 /* Microsemi Ocelot Switch driver
7 #include <soc/mscc/ocelot.h>
10 /* Types for ANA:POL[0-192]:POL_MODE_CFG.FRM_MODE */
11 #define POL_MODE_LINERATE 0 /* Incl IPG. Unit: 33 1/3 kbps, 4096 bytes */
12 #define POL_MODE_DATARATE 1 /* Excl IPG. Unit: 33 1/3 kbps, 4096 bytes */
13 #define POL_MODE_FRMRATE_HI 2 /* Unit: 33 1/3 fps, 32.8 frames */
14 #define POL_MODE_FRMRATE_LO 3 /* Unit: 1/3 fps, 0.3 frames */
17 #define POL_IX_PORT 0 /* 0-11 : Port policers */
18 #define POL_IX_QUEUE 32 /* 32-127 : Queue policers */
[all …]
H A Docelot_mm.c1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
3 * Hardware library for MAC Merge Layer and Frame Preemption on TSN-capable
6 * Copyright 2022-2023 NXP
9 #include <soc/mscc/ocelot.h>
13 #include "ocelot.h"
39 case 1: in ocelot_mm_verify_status()
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()
[all …]
H A Docelot_police.h1 /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
2 /* Microsemi Ocelot Switch driver
10 #include "ocelot.h"
20 MSCC_QOS_RATE_MODE_MAX = __MSCC_QOS_RATE_MODE_END - 1,
34 int qos_policer_conf_set(struct ocelot *ocelot, u32 pol_ix,
/linux/include/soc/mscc/
H A Docelot.h1 /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
23 * - In one of PGID[0-63]: for the destination masks. There are 2 paths by
25 * - The {DMAC, VID} is present in the MAC table. In that case, the
28 * - The {DMAC, VID} is not present in the MAC table (it is unknown). The
34 * ocelot->num_phys_ports -
73 for_each_unicast_dest_pgid(ocelot,pgid) global() argument
78 for_each_nonreserved_multicast_dest_pgid(ocelot,pgid) global() argument
83 for_each_aggr_pgid(ocelot,pgid) global() argument
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.h1 /* SPDX-License-Identifier: (GPL-2.0 OR MIT)
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
[all …]
H A Docelot_ptp.h1 /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
3 * Microsemi Ocelot Switch driver
14 #include <soc/mscc/ocelot.h>
44 #define PTP_CFG_CLK_ADJ_CFG_DIR BIT(1)
57 int ocelot_init_timestamp(struct ocelot *ocelot,
59 int ocelot_deinit_timestamp(struct ocelot *ocelot);
/linux/Documentation/devicetree/bindings/mfd/
H A Dmscc,ocelot.yaml1 # SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
3 ---
4 $id: http://devicetree.org/schemas/mfd/mscc,ocelot.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Ocelot Externally-Controlled Ethernet Switch
10 - Colin Foster <colin.foster@in-advantage.com>
13 The Ocelot ethernet switch family contains chips that have an internal CPU
18 The switch family is a multi-port networking switch that supports many
25 - mscc,vsc7512
28 maxItems: 1
[all …]
/linux/arch/mips/boot/dts/mscc/
H A Docelot.dtsi1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
5 #address-cells = <1>;
6 #size-cells = <1>;
7 compatible = "mscc,ocelot";
10 #address-cells = <1>;
11 #size-cells = <0>;
25 cpuintc: interrupt-controller {
26 #address-cells = <0>;
27 #interrupt-cells = <1>;
28 interrupt-controller;
[all …]
H A Docelot_pcb120.dts1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
4 /dts-v1/;
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/interrupt-controller/irq.h>
8 #include <dt-bindings/phy/phy-ocelot-serdes.h>
9 #include "ocelot.dtsi"
12 compatible = "mscc,ocelot-pcb120", "mscc,ocelot";
15 stdout-path = "serial0:115200n8";
25 phy_int_pins: phy-int-pins {
30 phy_load_save_pins: phy-load-save-pins {
[all …]
H A Djaguar2.dtsi1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
7 #address-cells = <1>;
8 #size-cells = <1>;
18 #address-cells = <1>;
19 #size-cells = <0>;
29 cpuintc: interrupt-controller {
30 #address-cells = <0>;
31 #interrupt-cells = <1>;
32 interrupt-controller;
33 compatible = "mti,cpu-interrupt-controller";
[all …]
/linux/Documentation/devicetree/bindings/interrupt-controller/
H A Dmscc,ocelot-icpu-intr.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/interrupt-controller/mscc,ocelot-icpu-intr.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Microsemi Ocelot SoC ICPU Interrupt Controller
10 - Alexandre Belloni <alexandre.belloni@bootlin.com>
13 - $ref: /schemas/interrupt-controller.yaml#
16 the Microsemi Ocelot interrupt controller that is part of the
23 - enum:
24 - mscc,jaguar2-icpu-intr
[all …]
/linux/Documentation/devicetree/bindings/pinctrl/
H A Dmscc,ocelot-pinctrl.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
4 $id: http://devicetree.org/schemas/pinctrl/mscc,ocelot-pinctrl.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Microsemi Ocelot pin controller
10 - Alexandre Belloni <alexandre.belloni@bootlin.com>
11 - Lars Povlsen <lars.povlsen@microchip.com>
16 - enum:
17 - microchip,lan966x-pinctrl
18 - microchip,lan9691-pinctrl
[all …]
/linux/drivers/power/reset/
H A Docelot-reset.c1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
37 #define IF_SI_OWNER_MASK GENMASK(1, 0)
39 #define IF_SI_OWNER_SIBM 1
48 u32 if_si_owner_bit = ctx->props->if_si_owner_bit; in ocelot_restart_handle()
51 regmap_update_bits(ctx->cpu_ctrl, ctx->props->protect_reg, in ocelot_restart_handle()
52 ctx->props->vcore_protect, 0); in ocelot_restart_handle()
56 regmap_update_bits(ctx->cpu_ctrl, in ocelot_restart_handle()
63 writel(SOFT_CHIP_RST, ctx->base); in ocelot_restart_handle()
72 struct device *dev = &pdev->dev; in ocelot_reset_probe()
75 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); in ocelot_reset_probe()
[all …]
/linux/drivers/net/dsa/ocelot/
H A Docelot_ext.c1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
3 * Copyright 2021-2022 Innovative Advantage Inc.
6 #include <linux/mfd/ocelot.h>
9 #include <soc/mscc/ocelot.h>
67 return felix_register_switch(&pdev->dev, 0, 1, false, false, in ocelot_ext_probe()
73 struct felix *felix = dev_get_drvdata(&pdev->dev); in ocelot_ext_remove()
78 dsa_unregister_switch(felix->ds); in ocelot_ext_remove()
83 struct felix *felix = dev_get_drvdata(&pdev->dev); in ocelot_ext_shutdown()
88 dsa_switch_shutdown(felix->ds); in ocelot_ext_shutdown()
90 dev_set_drvdata(&pdev->dev, NULL); in ocelot_ext_shutdown()
[all …]
/linux/Documentation/devicetree/bindings/i2c/
H A Dsnps,designware-i2c.yaml1 # SPDX-License-Identifier: GPL-2.0-only
3 ---
4 $id: http://devicetree.org/schemas/i2c/snps,designware-i2c.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Jarkko Nikula <jarkko.nikula@linux.intel.com>
13 - $ref: /schemas/i2c/i2c-controller.yaml#
14 - if:
19 const: mscc,ocelot-i2c
23 maxItems: 1
28 - description: Generic Synopsys DesignWare I2C controller
[all …]
/linux/drivers/mfd/
H A Docelot-spi.c1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
3 * SPI core driver for the Ocelot chip family.
11 * Copyright 2021-2022 Innovative Advantage Inc.
13 * Author: Colin Foster <colin.foster@in-advantage.com>
28 #include "ocelot.h"
34 #define CFGSTAT_IF_NUM_VRAP (1 << 24)
63 * The SPI address must be big-endian, but we want the payload to match in ocelot_spi_initialize()
64 * our CPU. These are two bits (0 and 1) but they're repeated such that in ocelot_spi_initialize()
68 * 0b00: little-endian, MSB first in ocelot_spi_initialize()
72 * 0b01: big-endian, MSB first in ocelot_spi_initialize()
[all …]
/linux/net/dsa/
H A Dtag_ocelot.c1 // SPDX-License-Identifier: GPL-2.0
4 #include <linux/dsa/ocelot.h>
8 #define OCELOT_NAME "ocelot"
15 struct dsa_switch *ds = dp->ds; in ocelot_xmit_common()
26 netdev_get_prio_tc_map(netdev, skb->priority) : skb->priority; in ocelot_xmit_common()
33 ocelot_ifh_set_bypass(injection, 1); in ocelot_xmit_common()
34 ocelot_ifh_set_src(injection, ds->num_ports); in ocelot_xmit_common()
53 ocelot_ifh_set_dest(injection, BIT_ULL(dp->index)); in ocelot_xmit()
65 seville_ifh_set_dest(injection, BIT_ULL(dp->index)); in seville_xmit()
75 u8 *start = skb->data; in ocelot_rcv()
[all …]
H A Dtag_ocelot_8021q.c1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright 2020-2021 NXP
4 * An implementation of the software-defined tag_8021q.c tagger format, which
7 * - pushing the RX VLAN as a second, outer tag, on egress towards the CPU port
8 * - redirecting towards the correct front port based on TX VLAN and popping
12 #include <linux/dsa/ocelot.h>
17 #define OCELOT_8021Q_NAME "ocelot-8021q"
27 struct ocelot_8021q_tagger_private *priv = dp->ds->tagger_data; in ocelot_defer_xmit()
28 struct ocelot_8021q_tagger_data *data = &priv->data; in ocelot_defer_xmit()
33 xmit_work_fn = data->xmit_work_fn; in ocelot_defer_xmit()
[all …]
/linux/Documentation/devicetree/bindings/net/
H A Dmscc,miim.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Alexandre Belloni <alexandre.belloni@bootlin.com>
13 - $ref: mdio.yaml#
18 - mscc,ocelot-miim
19 - microchip,lan966x-miim
21 "#address-cells":
22 const: 1
24 "#size-cells":
[all …]

12