dpni.h (6aa90fe2d96745b63d4ccc74c0c37b90d31b699e) | dpni.h (f395b69f40f580491ef56f2395a98e3189baa53c) |
---|---|
1/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ 2/* Copyright 2013-2016 Freescale Semiconductor Inc. 3 * Copyright 2016 NXP 4 */ 5#ifndef __FSL_DPNI_H 6#define __FSL_DPNI_H 7 8#include "dpkg.h" --- 500 unchanged lines hidden (view full) --- 509 */ 510#define DPNI_LINK_OPT_PAUSE 0x0000000000000004ULL 511/** 512 * Enable a-symmetric pause frames 513 */ 514#define DPNI_LINK_OPT_ASYM_PAUSE 0x0000000000000008ULL 515 516/** | 1/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ 2/* Copyright 2013-2016 Freescale Semiconductor Inc. 3 * Copyright 2016 NXP 4 */ 5#ifndef __FSL_DPNI_H 6#define __FSL_DPNI_H 7 8#include "dpkg.h" --- 500 unchanged lines hidden (view full) --- 509 */ 510#define DPNI_LINK_OPT_PAUSE 0x0000000000000004ULL 511/** 512 * Enable a-symmetric pause frames 513 */ 514#define DPNI_LINK_OPT_ASYM_PAUSE 0x0000000000000008ULL 515 516/** |
517 * Enable priority flow control pause frames 518 */ 519#define DPNI_LINK_OPT_PFC_PAUSE 0x0000000000000010ULL 520 521/** |
|
517 * struct - Structure representing DPNI link configuration 518 * @rate: Rate 519 * @options: Mask of available options; use 'DPNI_LINK_OPT_<X>' values 520 */ 521struct dpni_link_cfg { 522 u32 rate; 523 u64 options; 524}; --- 348 unchanged lines hidden (view full) --- 873 * QUEUE_INDEX is ignored if this type is used. 874 */ 875enum dpni_congestion_point { 876 DPNI_CP_QUEUE, 877 DPNI_CP_GROUP, 878}; 879 880/** | 522 * struct - Structure representing DPNI link configuration 523 * @rate: Rate 524 * @options: Mask of available options; use 'DPNI_LINK_OPT_<X>' values 525 */ 526struct dpni_link_cfg { 527 u32 rate; 528 u64 options; 529}; --- 348 unchanged lines hidden (view full) --- 878 * QUEUE_INDEX is ignored if this type is used. 879 */ 880enum dpni_congestion_point { 881 DPNI_CP_QUEUE, 882 DPNI_CP_GROUP, 883}; 884 885/** |
886 * struct dpni_dest_cfg - Structure representing DPNI destination parameters 887 * @dest_type: Destination type 888 * @dest_id: Either DPIO ID or DPCON ID, depending on the destination type 889 * @priority: Priority selection within the DPIO or DPCON channel; valid 890 * values are 0-1 or 0-7, depending on the number of priorities 891 * in that channel; not relevant for 'DPNI_DEST_NONE' option 892 */ 893struct dpni_dest_cfg { 894 enum dpni_dest dest_type; 895 int dest_id; 896 u8 priority; 897}; 898 899/* DPNI congestion options */ 900 901/** 902 * This congestion will trigger flow control or priority flow control. 903 * This will have effect only if flow control is enabled with 904 * dpni_set_link_cfg(). 905 */ 906#define DPNI_CONG_OPT_FLOW_CONTROL 0x00000040 907 908/** 909 * struct dpni_congestion_notification_cfg - congestion notification 910 * configuration 911 * @units: Units type 912 * @threshold_entry: Above this threshold we enter a congestion state. 913 * set it to '0' to disable it 914 * @threshold_exit: Below this threshold we exit the congestion state. 915 * @message_ctx: The context that will be part of the CSCN message 916 * @message_iova: I/O virtual address (must be in DMA-able memory), 917 * must be 16B aligned; valid only if 'DPNI_CONG_OPT_WRITE_MEM_<X>' 918 * is contained in 'options' 919 * @dest_cfg: CSCN can be send to either DPIO or DPCON WQ channel 920 * @notification_mode: Mask of available options; use 'DPNI_CONG_OPT_<X>' values 921 */ 922 923struct dpni_congestion_notification_cfg { 924 enum dpni_congestion_unit units; 925 u32 threshold_entry; 926 u32 threshold_exit; 927 u64 message_ctx; 928 u64 message_iova; 929 struct dpni_dest_cfg dest_cfg; 930 u16 notification_mode; 931}; 932 933int dpni_set_congestion_notification( 934 struct fsl_mc_io *mc_io, 935 u32 cmd_flags, 936 u16 token, 937 enum dpni_queue_type qtype, 938 u8 tc_id, 939 const struct dpni_congestion_notification_cfg *cfg); 940 941/** |
|
881 * struct dpni_taildrop - Structure representing the taildrop 882 * @enable: Indicates whether the taildrop is active or not. 883 * @units: Indicates the unit of THRESHOLD. Queue taildrop only supports 884 * byte units, this field is ignored and assumed = 0 if 885 * CONGESTION_POINT is 0. 886 * @threshold: Threshold value, in units identified by UNITS field. Value 0 887 * cannot be used as a valid taildrop threshold, THRESHOLD must 888 * be > 0 if the taildrop is enabled. --- 117 unchanged lines hidden --- | 942 * struct dpni_taildrop - Structure representing the taildrop 943 * @enable: Indicates whether the taildrop is active or not. 944 * @units: Indicates the unit of THRESHOLD. Queue taildrop only supports 945 * byte units, this field is ignored and assumed = 0 if 946 * CONGESTION_POINT is 0. 947 * @threshold: Threshold value, in units identified by UNITS field. Value 0 948 * cannot be used as a valid taildrop threshold, THRESHOLD must 949 * be > 0 if the taildrop is enabled. --- 117 unchanged lines hidden --- |