ocelot.h (6f84981772535e670e4e2df051a672af229b6694) ocelot.h (ab3f97a9610a8d90dc9934517e82c3272d4e98a0)
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>

--- 348 unchanged lines hidden (view full) ---

357 SYS_COUNT_RX_GREEN_PRIO_0,
358 SYS_COUNT_RX_GREEN_PRIO_1,
359 SYS_COUNT_RX_GREEN_PRIO_2,
360 SYS_COUNT_RX_GREEN_PRIO_3,
361 SYS_COUNT_RX_GREEN_PRIO_4,
362 SYS_COUNT_RX_GREEN_PRIO_5,
363 SYS_COUNT_RX_GREEN_PRIO_6,
364 SYS_COUNT_RX_GREEN_PRIO_7,
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>

--- 348 unchanged lines hidden (view full) ---

357 SYS_COUNT_RX_GREEN_PRIO_0,
358 SYS_COUNT_RX_GREEN_PRIO_1,
359 SYS_COUNT_RX_GREEN_PRIO_2,
360 SYS_COUNT_RX_GREEN_PRIO_3,
361 SYS_COUNT_RX_GREEN_PRIO_4,
362 SYS_COUNT_RX_GREEN_PRIO_5,
363 SYS_COUNT_RX_GREEN_PRIO_6,
364 SYS_COUNT_RX_GREEN_PRIO_7,
365 SYS_COUNT_RX_ASSEMBLY_ERRS,
366 SYS_COUNT_RX_SMD_ERRS,
367 SYS_COUNT_RX_ASSEMBLY_OK,
368 SYS_COUNT_RX_MERGE_FRAGMENTS,
369 SYS_COUNT_RX_PMAC_OCTETS,
370 SYS_COUNT_RX_PMAC_UNICAST,
371 SYS_COUNT_RX_PMAC_MULTICAST,
372 SYS_COUNT_RX_PMAC_BROADCAST,
373 SYS_COUNT_RX_PMAC_SHORTS,
374 SYS_COUNT_RX_PMAC_FRAGMENTS,
375 SYS_COUNT_RX_PMAC_JABBERS,
376 SYS_COUNT_RX_PMAC_CRC_ALIGN_ERRS,
377 SYS_COUNT_RX_PMAC_SYM_ERRS,
378 SYS_COUNT_RX_PMAC_64,
379 SYS_COUNT_RX_PMAC_65_127,
380 SYS_COUNT_RX_PMAC_128_255,
381 SYS_COUNT_RX_PMAC_256_511,
382 SYS_COUNT_RX_PMAC_512_1023,
383 SYS_COUNT_RX_PMAC_1024_1526,
384 SYS_COUNT_RX_PMAC_1527_MAX,
385 SYS_COUNT_RX_PMAC_PAUSE,
386 SYS_COUNT_RX_PMAC_CONTROL,
387 SYS_COUNT_RX_PMAC_LONGS,
365 SYS_COUNT_TX_OCTETS,
366 SYS_COUNT_TX_UNICAST,
367 SYS_COUNT_TX_MULTICAST,
368 SYS_COUNT_TX_BROADCAST,
369 SYS_COUNT_TX_COLLISION,
370 SYS_COUNT_TX_DROPS,
371 SYS_COUNT_TX_PAUSE,
372 SYS_COUNT_TX_64,

--- 15 unchanged lines hidden (view full) ---

388 SYS_COUNT_TX_GREEN_PRIO_1,
389 SYS_COUNT_TX_GREEN_PRIO_2,
390 SYS_COUNT_TX_GREEN_PRIO_3,
391 SYS_COUNT_TX_GREEN_PRIO_4,
392 SYS_COUNT_TX_GREEN_PRIO_5,
393 SYS_COUNT_TX_GREEN_PRIO_6,
394 SYS_COUNT_TX_GREEN_PRIO_7,
395 SYS_COUNT_TX_AGED,
388 SYS_COUNT_TX_OCTETS,
389 SYS_COUNT_TX_UNICAST,
390 SYS_COUNT_TX_MULTICAST,
391 SYS_COUNT_TX_BROADCAST,
392 SYS_COUNT_TX_COLLISION,
393 SYS_COUNT_TX_DROPS,
394 SYS_COUNT_TX_PAUSE,
395 SYS_COUNT_TX_64,

--- 15 unchanged lines hidden (view full) ---

411 SYS_COUNT_TX_GREEN_PRIO_1,
412 SYS_COUNT_TX_GREEN_PRIO_2,
413 SYS_COUNT_TX_GREEN_PRIO_3,
414 SYS_COUNT_TX_GREEN_PRIO_4,
415 SYS_COUNT_TX_GREEN_PRIO_5,
416 SYS_COUNT_TX_GREEN_PRIO_6,
417 SYS_COUNT_TX_GREEN_PRIO_7,
418 SYS_COUNT_TX_AGED,
419 SYS_COUNT_TX_MM_HOLD,
420 SYS_COUNT_TX_MERGE_FRAGMENTS,
421 SYS_COUNT_TX_PMAC_OCTETS,
422 SYS_COUNT_TX_PMAC_UNICAST,
423 SYS_COUNT_TX_PMAC_MULTICAST,
424 SYS_COUNT_TX_PMAC_BROADCAST,
425 SYS_COUNT_TX_PMAC_PAUSE,
426 SYS_COUNT_TX_PMAC_64,
427 SYS_COUNT_TX_PMAC_65_127,
428 SYS_COUNT_TX_PMAC_128_255,
429 SYS_COUNT_TX_PMAC_256_511,
430 SYS_COUNT_TX_PMAC_512_1023,
431 SYS_COUNT_TX_PMAC_1024_1526,
432 SYS_COUNT_TX_PMAC_1527_MAX,
396 SYS_COUNT_DROP_LOCAL,
397 SYS_COUNT_DROP_TAIL,
398 SYS_COUNT_DROP_YELLOW_PRIO_0,
399 SYS_COUNT_DROP_YELLOW_PRIO_1,
400 SYS_COUNT_DROP_YELLOW_PRIO_2,
401 SYS_COUNT_DROP_YELLOW_PRIO_3,
402 SYS_COUNT_DROP_YELLOW_PRIO_4,
403 SYS_COUNT_DROP_YELLOW_PRIO_5,

--- 405 unchanged lines hidden (view full) ---

809 struct mutex fwd_domain_lock;
810
811 /* Lock for serializing Time-Aware Shaper changes */
812 struct mutex tas_lock;
813
814 struct workqueue_struct *owq;
815
816 u8 ptp:1;
433 SYS_COUNT_DROP_LOCAL,
434 SYS_COUNT_DROP_TAIL,
435 SYS_COUNT_DROP_YELLOW_PRIO_0,
436 SYS_COUNT_DROP_YELLOW_PRIO_1,
437 SYS_COUNT_DROP_YELLOW_PRIO_2,
438 SYS_COUNT_DROP_YELLOW_PRIO_3,
439 SYS_COUNT_DROP_YELLOW_PRIO_4,
440 SYS_COUNT_DROP_YELLOW_PRIO_5,

--- 405 unchanged lines hidden (view full) ---

846 struct mutex fwd_domain_lock;
847
848 /* Lock for serializing Time-Aware Shaper changes */
849 struct mutex tas_lock;
850
851 struct workqueue_struct *owq;
852
853 u8 ptp:1;
854 u8 mm_supported:1;
817 struct ptp_clock *ptp_clock;
818 struct ptp_clock_info ptp_info;
819 struct hwtstamp_config hwtstamp_config;
820 unsigned int ptp_skbs_in_flight;
821 /* Protects the 2-step TX timestamp ID logic */
822 spinlock_t ts_id_lock;
823 /* Protects the PTP interface state */
824 struct mutex ptp_lock;

--- 107 unchanged lines hidden (view full) ---

932/* DSA callbacks */
933void ocelot_get_strings(struct ocelot *ocelot, int port, u32 sset, u8 *data);
934void ocelot_get_ethtool_stats(struct ocelot *ocelot, int port, u64 *data);
935int ocelot_get_sset_count(struct ocelot *ocelot, int port, int sset);
936void ocelot_port_get_stats64(struct ocelot *ocelot, int port,
937 struct rtnl_link_stats64 *stats);
938void ocelot_port_get_pause_stats(struct ocelot *ocelot, int port,
939 struct ethtool_pause_stats *pause_stats);
855 struct ptp_clock *ptp_clock;
856 struct ptp_clock_info ptp_info;
857 struct hwtstamp_config hwtstamp_config;
858 unsigned int ptp_skbs_in_flight;
859 /* Protects the 2-step TX timestamp ID logic */
860 spinlock_t ts_id_lock;
861 /* Protects the PTP interface state */
862 struct mutex ptp_lock;

--- 107 unchanged lines hidden (view full) ---

970/* DSA callbacks */
971void ocelot_get_strings(struct ocelot *ocelot, int port, u32 sset, u8 *data);
972void ocelot_get_ethtool_stats(struct ocelot *ocelot, int port, u64 *data);
973int ocelot_get_sset_count(struct ocelot *ocelot, int port, int sset);
974void ocelot_port_get_stats64(struct ocelot *ocelot, int port,
975 struct rtnl_link_stats64 *stats);
976void ocelot_port_get_pause_stats(struct ocelot *ocelot, int port,
977 struct ethtool_pause_stats *pause_stats);
978void ocelot_port_get_mm_stats(struct ocelot *ocelot, int port,
979 struct ethtool_mm_stats *stats);
940void ocelot_port_get_rmon_stats(struct ocelot *ocelot, int port,
941 struct ethtool_rmon_stats *rmon_stats,
942 const struct ethtool_rmon_hist_range **ranges);
943void ocelot_port_get_eth_ctrl_stats(struct ocelot *ocelot, int port,
944 struct ethtool_eth_ctrl_stats *ctrl_stats);
945void ocelot_port_get_eth_mac_stats(struct ocelot *ocelot, int port,
946 struct ethtool_eth_mac_stats *mac_stats);
947void ocelot_port_get_eth_phy_stats(struct ocelot *ocelot, int port,

--- 175 unchanged lines hidden ---
980void ocelot_port_get_rmon_stats(struct ocelot *ocelot, int port,
981 struct ethtool_rmon_stats *rmon_stats,
982 const struct ethtool_rmon_hist_range **ranges);
983void ocelot_port_get_eth_ctrl_stats(struct ocelot *ocelot, int port,
984 struct ethtool_eth_ctrl_stats *ctrl_stats);
985void ocelot_port_get_eth_mac_stats(struct ocelot *ocelot, int port,
986 struct ethtool_eth_mac_stats *mac_stats);
987void ocelot_port_get_eth_phy_stats(struct ocelot *ocelot, int port,

--- 175 unchanged lines hidden ---