ocelot.h (98817a84ff1c755c347ac633ff017a623a631fad) | ocelot.h (91c724cfc0cbc049f18c04634ad56080650e93b8) |
---|---|
1/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ 2/* Copyright (c) 2017 Microsemi Corporation 3 */ 4 5#ifndef _SOC_MSCC_OCELOT_H 6#define _SOC_MSCC_OCELOT_H 7 8#include <linux/ptp_clock_kernel.h> --- 51 unchanged lines hidden (view full) --- 60 * PGID_MCIPV6: the flooding destinations for IPv6 multicast traffic. 61 */ 62#define PGID_CPU 59 63#define PGID_UC 60 64#define PGID_MC 61 65#define PGID_MCIPV4 62 66#define PGID_MCIPV6 63 67 | 1/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ 2/* Copyright (c) 2017 Microsemi Corporation 3 */ 4 5#ifndef _SOC_MSCC_OCELOT_H 6#define _SOC_MSCC_OCELOT_H 7 8#include <linux/ptp_clock_kernel.h> --- 51 unchanged lines hidden (view full) --- 60 * PGID_MCIPV6: the flooding destinations for IPv6 multicast traffic. 61 */ 62#define PGID_CPU 59 63#define PGID_UC 60 64#define PGID_MC 61 65#define PGID_MCIPV4 62 66#define PGID_MCIPV6 63 67 |
68#define for_each_unicast_dest_pgid(ocelot, pgid) \ 69 for ((pgid) = 0; \ 70 (pgid) < (ocelot)->num_phys_ports; \ 71 (pgid)++) 72 73#define for_each_nonreserved_multicast_dest_pgid(ocelot, pgid) \ 74 for ((pgid) = (ocelot)->num_phys_ports + 1; \ 75 (pgid) < PGID_CPU; \ 76 (pgid)++) 77 78#define for_each_aggr_pgid(ocelot, pgid) \ 79 for ((pgid) = PGID_AGGR; \ 80 (pgid) < PGID_SRC; \ 81 (pgid)++) 82 |
|
68/* Aggregation PGIDs, one per Link Aggregation Code */ 69#define PGID_AGGR 64 70 71/* Source PGIDs, one per physical port */ 72#define PGID_SRC 80 73 74#define IFH_INJ_BYPASS BIT(31) 75#define IFH_INJ_POP_CNT_DISABLE (3 << 28) --- 30 unchanged lines hidden (view full) --- 106 QS, 107 QSYS, 108 REW, 109 SYS, 110 S2, 111 HSIO, 112 PTP, 113 GCB, | 83/* Aggregation PGIDs, one per Link Aggregation Code */ 84#define PGID_AGGR 64 85 86/* Source PGIDs, one per physical port */ 87#define PGID_SRC 80 88 89#define IFH_INJ_BYPASS BIT(31) 90#define IFH_INJ_POP_CNT_DISABLE (3 << 28) --- 30 unchanged lines hidden (view full) --- 121 QS, 122 QSYS, 123 REW, 124 SYS, 125 S2, 126 HSIO, 127 PTP, 128 GCB, |
129 DEV_GMII, |
|
114 TARGET_MAX, 115}; 116 117enum ocelot_reg { 118 ANA_ADVLEARN = ANA << TARGET_OFFSET, 119 ANA_VLANMASK, 120 ANA_PORT_B_DOMAIN, 121 ANA_ANAGEFIL, --- 266 unchanged lines hidden (view full) --- 388 PTP_PIN_TOD_SEC_LSB, 389 PTP_PIN_TOD_NSEC, 390 PTP_PIN_WF_HIGH_PERIOD, 391 PTP_PIN_WF_LOW_PERIOD, 392 PTP_CFG_MISC, 393 PTP_CLK_CFG_ADJ_CFG, 394 PTP_CLK_CFG_ADJ_FREQ, 395 GCB_SOFT_RST = GCB << TARGET_OFFSET, | 130 TARGET_MAX, 131}; 132 133enum ocelot_reg { 134 ANA_ADVLEARN = ANA << TARGET_OFFSET, 135 ANA_VLANMASK, 136 ANA_PORT_B_DOMAIN, 137 ANA_ANAGEFIL, --- 266 unchanged lines hidden (view full) --- 404 PTP_PIN_TOD_SEC_LSB, 405 PTP_PIN_TOD_NSEC, 406 PTP_PIN_WF_HIGH_PERIOD, 407 PTP_PIN_WF_LOW_PERIOD, 408 PTP_CFG_MISC, 409 PTP_CLK_CFG_ADJ_CFG, 410 PTP_CLK_CFG_ADJ_FREQ, 411 GCB_SOFT_RST = GCB << TARGET_OFFSET, |
412 DEV_CLOCK_CFG = DEV_GMII << TARGET_OFFSET, 413 DEV_PORT_MISC, 414 DEV_EVENTS, 415 DEV_EEE_CFG, 416 DEV_RX_PATH_DELAY, 417 DEV_TX_PATH_DELAY, 418 DEV_PTP_PREDICT_CFG, 419 DEV_MAC_ENA_CFG, 420 DEV_MAC_MODE_CFG, 421 DEV_MAC_MAXLEN_CFG, 422 DEV_MAC_TAGS_CFG, 423 DEV_MAC_ADV_CHK_CFG, 424 DEV_MAC_IFG_CFG, 425 DEV_MAC_HDX_CFG, 426 DEV_MAC_DBG_CFG, 427 DEV_MAC_FC_MAC_LOW_CFG, 428 DEV_MAC_FC_MAC_HIGH_CFG, 429 DEV_MAC_STICKY, 430 PCS1G_CFG, 431 PCS1G_MODE_CFG, 432 PCS1G_SD_CFG, 433 PCS1G_ANEG_CFG, 434 PCS1G_ANEG_NP_CFG, 435 PCS1G_LB_CFG, 436 PCS1G_DBG_CFG, 437 PCS1G_CDET_CFG, 438 PCS1G_ANEG_STATUS, 439 PCS1G_ANEG_NP_STATUS, 440 PCS1G_LINK_STATUS, 441 PCS1G_LINK_DOWN_CNT, 442 PCS1G_STICKY, 443 PCS1G_DEBUG_STATUS, 444 PCS1G_LPI_CFG, 445 PCS1G_LPI_WAKE_ERROR_CNT, 446 PCS1G_LPI_STATUS, 447 PCS1G_TSTPAT_MODE_CFG, 448 PCS1G_TSTPAT_STATUS, 449 DEV_PCS_FX100_CFG, 450 DEV_PCS_FX100_STATUS, |
|
396}; 397 398enum ocelot_regfield { 399 ANA_ADVLEARN_VLAN_CHK, 400 ANA_ADVLEARN_LEARN_MIRROR, 401 ANA_ANEVENTS_FLOOD_DISCARD, 402 ANA_ANEVENTS_MSTI_DROP, 403 ANA_ANEVENTS_ACLKILL, --- 61 unchanged lines hidden (view full) --- 465}; 466 467struct ocelot; 468 469struct ocelot_ops { 470 int (*reset)(struct ocelot *ocelot); 471}; 472 | 451}; 452 453enum ocelot_regfield { 454 ANA_ADVLEARN_VLAN_CHK, 455 ANA_ADVLEARN_LEARN_MIRROR, 456 ANA_ANEVENTS_FLOOD_DISCARD, 457 ANA_ANEVENTS_MSTI_DROP, 458 ANA_ANEVENTS_ACLKILL, --- 61 unchanged lines hidden (view full) --- 520}; 521 522struct ocelot; 523 524struct ocelot_ops { 525 int (*reset)(struct ocelot *ocelot); 526}; 527 |
473struct ocelot_acl_block { | 528struct ocelot_vcap_block { |
474 struct list_head rules; 475 int count; 476 int pol_lpr; 477}; 478 479struct ocelot_port { 480 struct ocelot *ocelot; 481 | 529 struct list_head rules; 530 int count; 531 int pol_lpr; 532}; 533 534struct ocelot_port { 535 struct ocelot *ocelot; 536 |
482 void __iomem *regs; | 537 struct regmap *target; |
483 484 bool vlan_aware; 485 486 /* Ingress default VLAN (pvid) */ 487 u16 pvid; 488 489 /* Egress default VLAN (vid) */ 490 u16 vid; --- 39 unchanged lines hidden (view full) --- 530 531 enum ocelot_tag_prefix inj_prefix; 532 enum ocelot_tag_prefix xtr_prefix; 533 534 u32 *lags; 535 536 struct list_head multicast; 537 | 538 539 bool vlan_aware; 540 541 /* Ingress default VLAN (pvid) */ 542 u16 pvid; 543 544 /* Egress default VLAN (vid) */ 545 u16 vid; --- 39 unchanged lines hidden (view full) --- 585 586 enum ocelot_tag_prefix inj_prefix; 587 enum ocelot_tag_prefix xtr_prefix; 588 589 u32 *lags; 590 591 struct list_head multicast; 592 |
538 struct ocelot_acl_block acl_block; | 593 struct ocelot_vcap_block block; |
539 540 const struct vcap_field *vcap_is2_keys; 541 const struct vcap_field *vcap_is2_actions; 542 const struct vcap_props *vcap; 543 544 /* Workqueue to check statistics for overflow with its lock */ 545 struct mutex stats_lock; 546 u64 *stats; --- 89 unchanged lines hidden (view full) --- 636 struct ocelot_policer *pol); 637int ocelot_port_policer_del(struct ocelot *ocelot, int port); 638int ocelot_cls_flower_replace(struct ocelot *ocelot, int port, 639 struct flow_cls_offload *f, bool ingress); 640int ocelot_cls_flower_destroy(struct ocelot *ocelot, int port, 641 struct flow_cls_offload *f, bool ingress); 642int ocelot_cls_flower_stats(struct ocelot *ocelot, int port, 643 struct flow_cls_offload *f, bool ingress); | 594 595 const struct vcap_field *vcap_is2_keys; 596 const struct vcap_field *vcap_is2_actions; 597 const struct vcap_props *vcap; 598 599 /* Workqueue to check statistics for overflow with its lock */ 600 struct mutex stats_lock; 601 u64 *stats; --- 89 unchanged lines hidden (view full) --- 691 struct ocelot_policer *pol); 692int ocelot_port_policer_del(struct ocelot *ocelot, int port); 693int ocelot_cls_flower_replace(struct ocelot *ocelot, int port, 694 struct flow_cls_offload *f, bool ingress); 695int ocelot_cls_flower_destroy(struct ocelot *ocelot, int port, 696 struct flow_cls_offload *f, bool ingress); 697int ocelot_cls_flower_stats(struct ocelot *ocelot, int port, 698 struct flow_cls_offload *f, bool ingress); |
699int ocelot_port_mdb_add(struct ocelot *ocelot, int port, 700 const struct switchdev_obj_port_mdb *mdb); 701int ocelot_port_mdb_del(struct ocelot *ocelot, int port, 702 const struct switchdev_obj_port_mdb *mdb); |
|
644 645#endif | 703 704#endif |