Path: blob/main/sys/contrib/ncsw/inc/flib/fsl_fman_dtsec.h
48375 views
/*1* Copyright 2008-2012 Freescale Semiconductor Inc.2*3* Redistribution and use in source and binary forms, with or without4* modification, are permitted provided that the following conditions are met:5* * Redistributions of source code must retain the above copyright6* notice, this list of conditions and the following disclaimer.7* * Redistributions in binary form must reproduce the above copyright8* notice, this list of conditions and the following disclaimer in the9* documentation and/or other materials provided with the distribution.10* * Neither the name of Freescale Semiconductor nor the11* names of its contributors may be used to endorse or promote products12* derived from this software without specific prior written permission.13*14*15* ALTERNATIVELY, this software may be distributed under the terms of the16* GNU General Public License ("GPL") as published by the Free Software17* Foundation, either version 2 of that License or (at your option) any18* later version.19*20* THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY21* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED22* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE23* DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY24* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES25* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;26* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND27* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT28* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS29* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.30*/3132#ifndef __FSL_FMAN_DTSEC_H33#define __FSL_FMAN_DTSEC_H3435#include "common/general.h"36#include "fsl_enet.h"3738/**39* DOC: dTSEC Init sequence40*41* To prepare dTSEC block for transfer use the following call sequence:42*43* - fman_dtsec_defconfig() - This step is optional and yet recommended. Its44* use is to obtain the default dTSEC configuration parameters.45*46* - Change dtsec configuration in &dtsec_cfg. This structure will be used47* to customize the dTSEC behavior.48*49* - fman_dtsec_init() - Applies the configuration on dTSEC hardware. Note that50* dTSEC is initialized while both Tx and Rx are disabled.51*52* - fman_dtsec_set_mac_address() - Set the station address (mac address).53* This is used by dTSEC to match against received packets.54*55* - fman_dtsec_adjust_link() - Set the link speed and duplex parameters56* after the PHY establishes the link.57*58* - dtsec_enable_tx() and dtsec_enable_rx() to enable transmission and59* reception.60*/6162/**63* DOC: dTSEC Graceful stop64*65* To temporary stop dTSEC activity use fman_dtsec_stop_tx() and66* fman_dtsec_stop_rx(). Note that these functions request dTSEC graceful stop67* but return before this stop is complete. To query for graceful stop68* completion use fman_dtsec_get_event() and check DTSEC_IEVENT_GTSC and69* DTSEC_IEVENT_GRSC bits. Alternatively the dTSEC interrupt mask can be set to70* enable graceful stop interrupts.71*72* To resume operation after graceful stop use fman_dtsec_start_tx() and73* fman_dtsec_start_rx().74*/7576/**77* DOC: dTSEC interrupt handling78*79* This code does not provide an interrupt handler for dTSEC. Instead this80* handler should be implemented and registered to the operating system by the81* caller. Some primitives for accessing the event status and mask registers82* are provided.83*84* See "dTSEC Events" section for a list of events that dTSEC can generate.85*/8687/**88* DOC: dTSEC Events89*90* Interrupt events cause dTSEC event bits to be set. Software may poll the91* event register at any time to check for pending interrupts. If an event92* occurs and its corresponding enable bit is set in the interrupt mask93* register, the event also causes a hardware interrupt at the PIC.94*95* To poll for event status use the fman_dtsec_get_event() function.96* To configure the interrupt mask use fman_dtsec_enable_interrupt() and97* fman_dtsec_disable_interrupt() functions.98* After servicing a dTSEC interrupt use fman_dtsec_ack_event to reset the99* serviced event bit.100*101* The following events may be signaled by dTSEC hardware:102*103* %DTSEC_IEVENT_BABR - Babbling receive error. This bit indicates that104* a frame was received with length in excess of the MAC's maximum frame length105* register.106*107* %DTSEC_IEVENT_RXC - Receive control (pause frame) interrupt. A pause108* control frame was received while Rx pause frame handling is enabled.109* Also see fman_dtsec_handle_rx_pause().110*111* %DTSEC_IEVENT_MSRO - MIB counter overflow. The count for one of the MIB112* counters has exceeded the size of its register.113*114* %DTSEC_IEVENT_GTSC - Graceful transmit stop complete. Graceful stop is now115* complete. The transmitter is in a stopped state, in which only pause frames116* can be transmitted.117* Also see fman_dtsec_stop_tx().118*119* %DTSEC_IEVENT_BABT - Babbling transmit error. The transmitted frame length120* has exceeded the value in the MAC's Maximum Frame Length register.121*122* %DTSEC_IEVENT_TXC - Transmit control (pause frame) interrupt. his bit123* indicates that a control frame was transmitted.124*125* %DTSEC_IEVENT_TXE - Transmit error. This bit indicates that an error126* occurred on the transmitted channel. This bit is set whenever any transmit127* error occurs which causes the dTSEC to discard all or part of a frame128* (LC, CRL, XFUN).129*130* %DTSEC_IEVENT_LC - Late collision. This bit indicates that a collision131* occurred beyond the collision window (slot time) in half-duplex mode.132* The frame is truncated with a bad CRC and the remainder of the frame133* is discarded.134*135* %DTSEC_IEVENT_CRL - Collision retry limit. is bit indicates that the number136* of successive transmission collisions has exceeded the MAC's half-duplex137* register's retransmission maximum count. The frame is discarded without138* being transmitted and transmission of the next frame commences. This only139* occurs while in half-duplex mode.140* The number of retransmit attempts can be set in141* &dtsec_halfdup_cfg.@retransmit before calling fman_dtsec_init().142*143* %DTSEC_IEVENT_XFUN - Transmit FIFO underrun. This bit indicates that the144* transmit FIFO became empty before the complete frame was transmitted.145* The frame is truncated with a bad CRC and the remainder of the frame is146* discarded.147*148* %DTSEC_IEVENT_MAG - TBD149*150* %DTSEC_IEVENT_MMRD - MII management read completion.151*152* %DTSEC_IEVENT_MMWR - MII management write completion.153*154* %DTSEC_IEVENT_GRSC - Graceful receive stop complete. It allows the user to155* know if the system has completed the stop and it is safe to write to receive156* registers (status, control or configuration registers) that are used by the157* system during normal operation.158*159* %DTSEC_IEVENT_TDPE - Internal data error on transmit. This bit indicates160* that the dTSEC has detected a parity error on its stored transmit data, which161* is likely to compromise the validity of recently transferred frames.162*163* %DTSEC_IEVENT_RDPE - Internal data error on receive. This bit indicates that164* the dTSEC has detected a parity error on its stored receive data, which is165* likely to compromise the validity of recently transferred frames.166*/167/* Interrupt Mask Register (IMASK) */168#define DTSEC_IMASK_BREN 0x80000000169#define DTSEC_IMASK_RXCEN 0x40000000170#define DTSEC_IMASK_MSROEN 0x04000000171#define DTSEC_IMASK_GTSCEN 0x02000000172#define DTSEC_IMASK_BTEN 0x01000000173#define DTSEC_IMASK_TXCEN 0x00800000174#define DTSEC_IMASK_TXEEN 0x00400000175#define DTSEC_IMASK_LCEN 0x00040000176#define DTSEC_IMASK_CRLEN 0x00020000177#define DTSEC_IMASK_XFUNEN 0x00010000178#define DTSEC_IMASK_ABRTEN 0x00008000179#define DTSEC_IMASK_IFERREN 0x00004000180#define DTSEC_IMASK_MAGEN 0x00000800181#define DTSEC_IMASK_MMRDEN 0x00000400182#define DTSEC_IMASK_MMWREN 0x00000200183#define DTSEC_IMASK_GRSCEN 0x00000100184#define DTSEC_IMASK_TDPEEN 0x00000002185#define DTSEC_IMASK_RDPEEN 0x00000001186187#define DTSEC_EVENTS_MASK \188((uint32_t)(DTSEC_IMASK_BREN | \189DTSEC_IMASK_RXCEN | \190DTSEC_IMASK_BTEN | \191DTSEC_IMASK_TXCEN | \192DTSEC_IMASK_TXEEN | \193DTSEC_IMASK_ABRTEN | \194DTSEC_IMASK_LCEN | \195DTSEC_IMASK_CRLEN | \196DTSEC_IMASK_XFUNEN | \197DTSEC_IMASK_IFERREN | \198DTSEC_IMASK_MAGEN | \199DTSEC_IMASK_TDPEEN | \200DTSEC_IMASK_RDPEEN))201202/* dtsec timestamp event bits */203#define TMR_PEMASK_TSREEN 0x00010000204#define TMR_PEVENT_TSRE 0x00010000205206/* Group address bit indication */207#define MAC_GROUP_ADDRESS 0x0000010000000000ULL208/* size in bytes of L2 address */209#define MAC_ADDRLEN 6210211#define DEFAULT_HALFDUP_ON FALSE212#define DEFAULT_HALFDUP_RETRANSMIT 0xf213#define DEFAULT_HALFDUP_COLL_WINDOW 0x37214#define DEFAULT_HALFDUP_EXCESS_DEFER TRUE215#define DEFAULT_HALFDUP_NO_BACKOFF FALSE216#define DEFAULT_HALFDUP_BP_NO_BACKOFF FALSE217#define DEFAULT_HALFDUP_ALT_BACKOFF_VAL 0x0A218#define DEFAULT_HALFDUP_ALT_BACKOFF_EN FALSE219#define DEFAULT_RX_DROP_BCAST FALSE220#define DEFAULT_RX_SHORT_FRM TRUE221#define DEFAULT_RX_LEN_CHECK FALSE222#define DEFAULT_TX_PAD_CRC TRUE223#define DEFAULT_TX_CRC FALSE224#define DEFAULT_RX_CTRL_ACC FALSE225#define DEFAULT_TX_PAUSE_TIME 0xf000226#define DEFAULT_TBIPA 5227#define DEFAULT_RX_PREPEND 0228#define DEFAULT_PTP_TSU_EN TRUE229#define DEFAULT_PTP_EXCEPTION_EN TRUE230#define DEFAULT_PREAMBLE_LEN 7231#define DEFAULT_RX_PREAMBLE FALSE232#define DEFAULT_TX_PREAMBLE FALSE233#define DEFAULT_LOOPBACK FALSE234#define DEFAULT_RX_TIME_STAMP_EN FALSE235#define DEFAULT_TX_TIME_STAMP_EN FALSE236#define DEFAULT_RX_FLOW TRUE237#define DEFAULT_TX_FLOW TRUE238#define DEFAULT_RX_GROUP_HASH_EXD FALSE239#define DEFAULT_TX_PAUSE_TIME_EXTD 0240#define DEFAULT_RX_PROMISC FALSE241#define DEFAULT_NON_BACK_TO_BACK_IPG1 0x40242#define DEFAULT_NON_BACK_TO_BACK_IPG2 0x60243#define DEFAULT_MIN_IFG_ENFORCEMENT 0x50244#define DEFAULT_BACK_TO_BACK_IPG 0x60245#define DEFAULT_MAXIMUM_FRAME 0x600246#define DEFAULT_TBI_PHY_ADDR 5247#define DEFAULT_WAKE_ON_LAN FALSE248249/* register related defines (bits, field offsets..) */250#define DTSEC_ID1_ID 0xffff0000251#define DTSEC_ID1_REV_MJ 0x0000FF00252#define DTSEC_ID1_REV_MN 0x000000ff253254#define DTSEC_ID2_INT_REDUCED_OFF 0x00010000255#define DTSEC_ID2_INT_NORMAL_OFF 0x00020000256257#define DTSEC_ECNTRL_CLRCNT 0x00004000258#define DTSEC_ECNTRL_AUTOZ 0x00002000259#define DTSEC_ECNTRL_STEN 0x00001000260#define DTSEC_ECNTRL_CFG_RO 0x80000000261#define DTSEC_ECNTRL_GMIIM 0x00000040262#define DTSEC_ECNTRL_TBIM 0x00000020263#define DTSEC_ECNTRL_SGMIIM 0x00000002264#define DTSEC_ECNTRL_RPM 0x00000010265#define DTSEC_ECNTRL_R100M 0x00000008266#define DTSEC_ECNTRL_RMM 0x00000004267#define DTSEC_ECNTRL_QSGMIIM 0x00000001268269#define DTSEC_TCTRL_THDF 0x00000800270#define DTSEC_TCTRL_TTSE 0x00000040271#define DTSEC_TCTRL_GTS 0x00000020272#define DTSEC_TCTRL_TFC_PAUSE 0x00000010273274/* PTV offsets */275#define PTV_PTE_OFST 16276277#define RCTRL_CFA 0x00008000278#define RCTRL_GHTX 0x00000400279#define RCTRL_RTSE 0x00000040280#define RCTRL_GRS 0x00000020281#define RCTRL_BC_REJ 0x00000010282#define RCTRL_MPROM 0x00000008283#define RCTRL_RSF 0x00000004284#define RCTRL_UPROM 0x00000001285#define RCTRL_PROM (RCTRL_UPROM | RCTRL_MPROM)286287#define TMR_CTL_ESFDP 0x00000800288#define TMR_CTL_ESFDE 0x00000400289290#define MACCFG1_SOFT_RESET 0x80000000291#define MACCFG1_LOOPBACK 0x00000100292#define MACCFG1_RX_FLOW 0x00000020293#define MACCFG1_TX_FLOW 0x00000010294#define MACCFG1_TX_EN 0x00000001295#define MACCFG1_RX_EN 0x00000004296#define MACCFG1_RESET_RxMC 0x00080000297#define MACCFG1_RESET_TxMC 0x00040000298#define MACCFG1_RESET_RxFUN 0x00020000299#define MACCFG1_RESET_TxFUN 0x00010000300301#define MACCFG2_NIBBLE_MODE 0x00000100302#define MACCFG2_BYTE_MODE 0x00000200303#define MACCFG2_PRE_AM_Rx_EN 0x00000080304#define MACCFG2_PRE_AM_Tx_EN 0x00000040305#define MACCFG2_LENGTH_CHECK 0x00000010306#define MACCFG2_MAGIC_PACKET_EN 0x00000008307#define MACCFG2_PAD_CRC_EN 0x00000004308#define MACCFG2_CRC_EN 0x00000002309#define MACCFG2_FULL_DUPLEX 0x00000001310311#define PREAMBLE_LENGTH_SHIFT 12312313#define IPGIFG_NON_BACK_TO_BACK_IPG_1_SHIFT 24314#define IPGIFG_NON_BACK_TO_BACK_IPG_2_SHIFT 16315#define IPGIFG_MIN_IFG_ENFORCEMENT_SHIFT 8316317#define IPGIFG_NON_BACK_TO_BACK_IPG_1 0x7F000000318#define IPGIFG_NON_BACK_TO_BACK_IPG_2 0x007F0000319#define IPGIFG_MIN_IFG_ENFORCEMENT 0x0000FF00320#define IPGIFG_BACK_TO_BACK_IPG 0x0000007F321322#define HAFDUP_ALT_BEB 0x00080000323#define HAFDUP_BP_NO_BACKOFF 0x00040000324#define HAFDUP_NO_BACKOFF 0x00020000325#define HAFDUP_EXCESS_DEFER 0x00010000326#define HAFDUP_COLLISION_WINDOW 0x000003ff327328#define HAFDUP_ALTERNATE_BEB_TRUNCATION_SHIFT 20329#define HAFDUP_RETRANSMISSION_MAX_SHIFT 12330#define HAFDUP_RETRANSMISSION_MAX 0x0000f000331332#define NUM_OF_HASH_REGS 8 /* Number of hash table registers */333334/* CAR1/2 bits */335#define DTSEC_CAR1_TR64 0x80000000336#define DTSEC_CAR1_TR127 0x40000000337#define DTSEC_CAR1_TR255 0x20000000338#define DTSEC_CAR1_TR511 0x10000000339#define DTSEC_CAR1_TRK1 0x08000000340#define DTSEC_CAR1_TRMAX 0x04000000341#define DTSEC_CAR1_TRMGV 0x02000000342343#define DTSEC_CAR1_RBYT 0x00010000344#define DTSEC_CAR1_RPKT 0x00008000345#define DTSEC_CAR1_RFCS 0x00004000346#define DTSEC_CAR1_RMCA 0x00002000347#define DTSEC_CAR1_RBCA 0x00001000348#define DTSEC_CAR1_RXCF 0x00000800349#define DTSEC_CAR1_RXPF 0x00000400350#define DTSEC_CAR1_RXUO 0x00000200351#define DTSEC_CAR1_RALN 0x00000100352#define DTSEC_CAR1_RFLR 0x00000080353#define DTSEC_CAR1_RCDE 0x00000040354#define DTSEC_CAR1_RCSE 0x00000020355#define DTSEC_CAR1_RUND 0x00000010356#define DTSEC_CAR1_ROVR 0x00000008357#define DTSEC_CAR1_RFRG 0x00000004358#define DTSEC_CAR1_RJBR 0x00000002359#define DTSEC_CAR1_RDRP 0x00000001360361#define DTSEC_CAR2_TJBR 0x00080000362#define DTSEC_CAR2_TFCS 0x00040000363#define DTSEC_CAR2_TXCF 0x00020000364#define DTSEC_CAR2_TOVR 0x00010000365#define DTSEC_CAR2_TUND 0x00008000366#define DTSEC_CAR2_TFRG 0x00004000367#define DTSEC_CAR2_TBYT 0x00002000368#define DTSEC_CAR2_TPKT 0x00001000369#define DTSEC_CAR2_TMCA 0x00000800370#define DTSEC_CAR2_TBCA 0x00000400371#define DTSEC_CAR2_TXPF 0x00000200372#define DTSEC_CAR2_TDFR 0x00000100373#define DTSEC_CAR2_TEDF 0x00000080374#define DTSEC_CAR2_TSCL 0x00000040375#define DTSEC_CAR2_TMCL 0x00000020376#define DTSEC_CAR2_TLCL 0x00000010377#define DTSEC_CAR2_TXCL 0x00000008378#define DTSEC_CAR2_TNCL 0x00000004379#define DTSEC_CAR2_TDRP 0x00000001380381#define CAM1_ERRORS_ONLY \382(DTSEC_CAR1_RXPF | DTSEC_CAR1_RALN | DTSEC_CAR1_RFLR \383| DTSEC_CAR1_RCDE | DTSEC_CAR1_RCSE | DTSEC_CAR1_RUND \384| DTSEC_CAR1_ROVR | DTSEC_CAR1_RFRG | DTSEC_CAR1_RJBR \385| DTSEC_CAR1_RDRP)386387#define CAM2_ERRORS_ONLY (DTSEC_CAR2_TFCS | DTSEC_CAR2_TXPF | DTSEC_CAR2_TDRP)388389/*390* Group of dTSEC specific counters relating to the standard RMON MIB Group 1391* (or Ethernet) statistics.392*/393#define CAM1_MIB_GRP_1 \394(DTSEC_CAR1_RDRP | DTSEC_CAR1_RBYT | DTSEC_CAR1_RPKT | DTSEC_CAR1_RMCA\395| DTSEC_CAR1_RBCA | DTSEC_CAR1_RALN | DTSEC_CAR1_RUND | DTSEC_CAR1_ROVR\396| DTSEC_CAR1_RFRG | DTSEC_CAR1_RJBR \397| DTSEC_CAR1_TR64 | DTSEC_CAR1_TR127 | DTSEC_CAR1_TR255 \398| DTSEC_CAR1_TR511 | DTSEC_CAR1_TRMAX)399400#define CAM2_MIB_GRP_1 (DTSEC_CAR2_TNCL | DTSEC_CAR2_TDRP)401402/* memory map */403404struct dtsec_regs {405/* dTSEC General Control and Status Registers */406uint32_t tsec_id; /* 0x000 ETSEC_ID register */407uint32_t tsec_id2; /* 0x004 ETSEC_ID2 register */408uint32_t ievent; /* 0x008 Interrupt event register */409uint32_t imask; /* 0x00C Interrupt mask register */410uint32_t reserved0010[1];411uint32_t ecntrl; /* 0x014 E control register */412uint32_t ptv; /* 0x018 Pause time value register */413uint32_t tbipa; /* 0x01C TBI PHY address register */414uint32_t tmr_ctrl; /* 0x020 Time-stamp Control register */415uint32_t tmr_pevent; /* 0x024 Time-stamp event register */416uint32_t tmr_pemask; /* 0x028 Timer event mask register */417uint32_t reserved002c[5];418uint32_t tctrl; /* 0x040 Transmit control register */419uint32_t reserved0044[3];420uint32_t rctrl; /* 0x050 Receive control register */421uint32_t reserved0054[11];422uint32_t igaddr[8]; /* 0x080-0x09C Individual/group address */423uint32_t gaddr[8]; /* 0x0A0-0x0BC Group address registers 0-7 */424uint32_t reserved00c0[16];425uint32_t maccfg1; /* 0x100 MAC configuration #1 */426uint32_t maccfg2; /* 0x104 MAC configuration #2 */427uint32_t ipgifg; /* 0x108 IPG/IFG */428uint32_t hafdup; /* 0x10C Half-duplex */429uint32_t maxfrm; /* 0x110 Maximum frame */430uint32_t reserved0114[10];431uint32_t ifstat; /* 0x13C Interface status */432uint32_t macstnaddr1; /* 0x140 Station Address,part 1 */433uint32_t macstnaddr2; /* 0x144 Station Address,part 2 */434struct {435uint32_t exact_match1; /* octets 1-4 */436uint32_t exact_match2; /* octets 5-6 */437} macaddr[15]; /* 0x148-0x1BC mac exact match addresses 1-15 */438uint32_t reserved01c0[16];439uint32_t tr64; /* 0x200 transmit and receive 64 byte frame counter */440uint32_t tr127; /* 0x204 transmit and receive 65 to 127 byte frame441* counter */442uint32_t tr255; /* 0x208 transmit and receive 128 to 255 byte frame443* counter */444uint32_t tr511; /* 0x20C transmit and receive 256 to 511 byte frame445* counter */446uint32_t tr1k; /* 0x210 transmit and receive 512 to 1023 byte frame447* counter */448uint32_t trmax; /* 0x214 transmit and receive 1024 to 1518 byte frame449* counter */450uint32_t trmgv; /* 0x218 transmit and receive 1519 to 1522 byte good451* VLAN frame count */452uint32_t rbyt; /* 0x21C receive byte counter */453uint32_t rpkt; /* 0x220 receive packet counter */454uint32_t rfcs; /* 0x224 receive FCS error counter */455uint32_t rmca; /* 0x228 RMCA receive multicast packet counter */456uint32_t rbca; /* 0x22C receive broadcast packet counter */457uint32_t rxcf; /* 0x230 receive control frame packet counter */458uint32_t rxpf; /* 0x234 receive pause frame packet counter */459uint32_t rxuo; /* 0x238 receive unknown OP code counter */460uint32_t raln; /* 0x23C receive alignment error counter */461uint32_t rflr; /* 0x240 receive frame length error counter */462uint32_t rcde; /* 0x244 receive code error counter */463uint32_t rcse; /* 0x248 receive carrier sense error counter */464uint32_t rund; /* 0x24C receive undersize packet counter */465uint32_t rovr; /* 0x250 receive oversize packet counter */466uint32_t rfrg; /* 0x254 receive fragments counter */467uint32_t rjbr; /* 0x258 receive jabber counter */468uint32_t rdrp; /* 0x25C receive drop */469uint32_t tbyt; /* 0x260 transmit byte counter */470uint32_t tpkt; /* 0x264 transmit packet counter */471uint32_t tmca; /* 0x268 transmit multicast packet counter */472uint32_t tbca; /* 0x26C transmit broadcast packet counter */473uint32_t txpf; /* 0x270 transmit pause control frame counter */474uint32_t tdfr; /* 0x274 transmit deferral packet counter */475uint32_t tedf; /* 0x278 transmit excessive deferral packet counter */476uint32_t tscl; /* 0x27C transmit single collision packet counter */477uint32_t tmcl; /* 0x280 transmit multiple collision packet counter */478uint32_t tlcl; /* 0x284 transmit late collision packet counter */479uint32_t txcl; /* 0x288 transmit excessive collision packet counter */480uint32_t tncl; /* 0x28C transmit total collision counter */481uint32_t reserved0290[1];482uint32_t tdrp; /* 0x294 transmit drop frame counter */483uint32_t tjbr; /* 0x298 transmit jabber frame counter */484uint32_t tfcs; /* 0x29C transmit FCS error counter */485uint32_t txcf; /* 0x2A0 transmit control frame counter */486uint32_t tovr; /* 0x2A4 transmit oversize frame counter */487uint32_t tund; /* 0x2A8 transmit undersize frame counter */488uint32_t tfrg; /* 0x2AC transmit fragments frame counter */489uint32_t car1; /* 0x2B0 carry register one register* */490uint32_t car2; /* 0x2B4 carry register two register* */491uint32_t cam1; /* 0x2B8 carry register one mask register */492uint32_t cam2; /* 0x2BC carry register two mask register */493uint32_t reserved02c0[848];494};495496/**497* struct dtsec_mib_grp_1_counters - MIB counter overflows498*499* @tr64: Transmit and Receive 64 byte frame count. Increment for each500* good or bad frame, of any type, transmitted or received, which501* is 64 bytes in length.502* @tr127: Transmit and Receive 65 to 127 byte frame count. Increments for503* each good or bad frame of any type, transmitted or received,504* which is 65-127 bytes in length.505* @tr255: Transmit and Receive 128 to 255 byte frame count. Increments506* for each good or bad frame, of any type, transmitted or507* received, which is 128-255 bytes in length.508* @tr511: Transmit and Receive 256 to 511 byte frame count. Increments509* for each good or bad frame, of any type, transmitted or510* received, which is 256-511 bytes in length.511* @tr1k: Transmit and Receive 512 to 1023 byte frame count. Increments512* for each good or bad frame, of any type, transmitted or513* received, which is 512-1023 bytes in length.514* @trmax: Transmit and Receive 1024 to 1518 byte frame count. Increments515* for each good or bad frame, of any type, transmitted or516* received, which is 1024-1518 bytes in length.517* @rfrg: Receive fragments count. Increments for each received frame518* which is less than 64 bytes in length and contains an invalid519* FCS. This includes integral and non-integral lengths.520* @rjbr: Receive jabber count. Increments for received frames which521* exceed 1518 (non VLAN) or 1522 (VLAN) bytes and contain an522* invalid FCS. This includes alignment errors.523* @rdrp: Receive dropped packets count. Increments for received frames524* which are streamed to system but are later dropped due to lack525* of system resources. Does not increment for frames rejected due526* to address filtering.527* @raln: Receive alignment error count. Increments for each received528* frame from 64 to 1518 (non VLAN) or 1522 (VLAN) which contains529* an invalid FCS and is not an integral number of bytes.530* @rund: Receive undersize packet count. Increments each time a frame is531* received which is less than 64 bytes in length and contains a532* valid FCS and is otherwise well formed. This count does not533* include range length errors.534* @rovr: Receive oversize packet count. Increments each time a frame is535* received which exceeded 1518 (non VLAN) or 1522 (VLAN) and536* contains a valid FCS and is otherwise well formed.537* @rbyt: Receive byte count. Increments by the byte count of frames538* received, including those in bad packets, excluding preamble and539* SFD but including FCS bytes.540* @rpkt: Receive packet count. Increments for each received frame541* (including bad packets, all unicast, broadcast, and multicast542* packets).543* @rmca: Receive multicast packet count. Increments for each multicast544* frame with valid CRC and of lengths 64 to 1518 (non VLAN) or545* 1522 (VLAN), excluding broadcast frames. This count does not546* include range/length errors.547* @rbca: Receive broadcast packet count. Increments for each broadcast548* frame with valid CRC and of lengths 64 to 1518 (non VLAN) or549* 1522 (VLAN), excluding multicast frames. Does not include550* range/length errors.551* @tdrp: Transmit drop frame count. Increments each time a memory error552* or an underrun has occurred.553* @tncl: Transmit total collision counter. Increments by the number of554* collisions experienced during the transmission of a frame. Does555* not increment for aborted frames.556*557* The structure contains a group of dTSEC HW specific counters relating to the558* standard RMON MIB Group 1 (or Ethernet statistics) counters. This structure559* is counting only the carry events of the corresponding HW counters.560*561* tr64 to trmax notes: Frame sizes specified are considered excluding preamble562* and SFD but including FCS bytes.563*/564struct dtsec_mib_grp_1_counters {565uint64_t rdrp;566uint64_t tdrp;567uint64_t rbyt;568uint64_t rpkt;569uint64_t rbca;570uint64_t rmca;571uint64_t raln;572uint64_t rund;573uint64_t rovr;574uint64_t rfrg;575uint64_t rjbr;576uint64_t tncl;577uint64_t tr64;578uint64_t tr127;579uint64_t tr255;580uint64_t tr511;581uint64_t tr1k;582uint64_t trmax;583};584585enum dtsec_stat_counters {586E_DTSEC_STAT_TR64,587E_DTSEC_STAT_TR127,588E_DTSEC_STAT_TR255,589E_DTSEC_STAT_TR511,590E_DTSEC_STAT_TR1K,591E_DTSEC_STAT_TRMAX,592E_DTSEC_STAT_TRMGV,593E_DTSEC_STAT_RBYT,594E_DTSEC_STAT_RPKT,595E_DTSEC_STAT_RMCA,596E_DTSEC_STAT_RBCA,597E_DTSEC_STAT_RXPF,598E_DTSEC_STAT_RALN,599E_DTSEC_STAT_RFLR,600E_DTSEC_STAT_RCDE,601E_DTSEC_STAT_RCSE,602E_DTSEC_STAT_RUND,603E_DTSEC_STAT_ROVR,604E_DTSEC_STAT_RFRG,605E_DTSEC_STAT_RJBR,606E_DTSEC_STAT_RDRP,607E_DTSEC_STAT_TFCS,608E_DTSEC_STAT_TBYT,609E_DTSEC_STAT_TPKT,610E_DTSEC_STAT_TMCA,611E_DTSEC_STAT_TBCA,612E_DTSEC_STAT_TXPF,613E_DTSEC_STAT_TNCL,614E_DTSEC_STAT_TDRP615};616617enum dtsec_stat_level {618/* No statistics */619E_MAC_STAT_NONE = 0,620/* Only RMON MIB group 1 (ether stats). Optimized for performance */621E_MAC_STAT_MIB_GRP1,622/* Only error counters are available. Optimized for performance */623E_MAC_STAT_PARTIAL,624/* All counters available. Not optimized for performance */625E_MAC_STAT_FULL626};627628629/**630* struct dtsec_cfg - dTSEC configuration631*632* @halfdup_on: Transmit half-duplex flow control, under software633* control for 10/100-Mbps half-duplex media. If set,634* back pressure is applied to media by raising carrier.635* @halfdup_retransmit: Number of retransmission attempts following a collision.636* If this is exceeded dTSEC aborts transmission due to637* excessive collisions. The standard specifies the638* attempt limit to be 15.639* @halfdup_coll_window:The number of bytes of the frame during which640* collisions may occur. The default value of 55641* corresponds to the frame byte at the end of the642* standard 512-bit slot time window. If collisions are643* detected after this byte, the late collision event is644* asserted and transmission of current frame is aborted.645* @rx_drop_bcast: Discard broadcast frames. If set, all broadcast frames646* will be discarded by dTSEC.647* @rx_short_frm: Accept short frames. If set, dTSEC will accept frames648* of length 14..63 bytes.649* @rx_len_check: Length check for received frames. If set, the MAC650* checks the frame's length field on receive to ensure it651* matches the actual data field length. This only works652* for received frames with length field less than 1500.653* No check is performed for larger frames.654* @tx_pad_crc: Pad and append CRC. If set, the MAC pads all655* transmitted short frames and appends a CRC to every656* frame regardless of padding requirement.657* @tx_crc: Transmission CRC enable. If set, the MAC appends a CRC658* to all frames. If frames presented to the MAC have a659* valid length and contain a valid CRC, @tx_crc should be660* reset.661* This field is ignored if @tx_pad_crc is set.662* @rx_ctrl_acc: Control frame accept. If set, this overrides 802.3663* standard control frame behavior, and all Ethernet frames664* that have an ethertype of 0x8808 are treated as normal665* Ethernet frames and passed up to the packet interface on666* a DA match. Received pause control frames are passed to667* the packet interface only if Rx flow control is also668* disabled. See fman_dtsec_handle_rx_pause() function.669* @tx_pause_time: Transmit pause time value. This pause value is used as670* part of the pause frame to be sent when a transmit pause671* frame is initiated. If set to 0 this disables672* transmission of pause frames.673* @rx_preamble: Receive preamble enable. If set, the MAC recovers the674* received Ethernet 7-byte preamble and passes it to the675* packet interface at the start of each received frame.676* This field should be reset for internal MAC loop-back677* mode.678* @tx_preamble: User defined preamble enable for transmitted frames.679* If set, a user-defined preamble must passed to the MAC680* and it is transmitted instead of the standard preamble.681* @preamble_len: Length, in bytes, of the preamble field preceding each682* Ethernet start-of-frame delimiter byte. The default683* value of 0x7 should be used in order to guarantee684* reliable operation with IEEE 802.3 compliant hardware.685* @rx_prepend: Packet alignment padding length. The specified number686* of bytes (1-31) of zero padding are inserted before the687* start of each received frame. For Ethernet, where688* optional preamble extraction is enabled, the padding689* appears before the preamble, otherwise the padding690* precedes the layer 2 header.691*692* This structure contains basic dTSEC configuration and must be passed to693* fman_dtsec_init() function. A default set of configuration values can be694* obtained by calling fman_dtsec_defconfig().695*/696struct dtsec_cfg {697bool halfdup_on;698bool halfdup_alt_backoff_en;699bool halfdup_excess_defer;700bool halfdup_no_backoff;701bool halfdup_bp_no_backoff;702uint8_t halfdup_alt_backoff_val;703uint16_t halfdup_retransmit;704uint16_t halfdup_coll_window;705bool rx_drop_bcast;706bool rx_short_frm;707bool rx_len_check;708bool tx_pad_crc;709bool tx_crc;710bool rx_ctrl_acc;711unsigned short tx_pause_time;712unsigned short tbipa;713bool ptp_tsu_en;714bool ptp_exception_en;715bool rx_preamble;716bool tx_preamble;717unsigned char preamble_len;718unsigned char rx_prepend;719bool loopback;720bool rx_time_stamp_en;721bool tx_time_stamp_en;722bool rx_flow;723bool tx_flow;724bool rx_group_hash_exd;725bool rx_promisc;726uint8_t tbi_phy_addr;727uint16_t tx_pause_time_extd;728uint16_t maximum_frame;729uint32_t non_back_to_back_ipg1;730uint32_t non_back_to_back_ipg2;731uint32_t min_ifg_enforcement;732uint32_t back_to_back_ipg;733bool wake_on_lan;734};735736737/**738* fman_dtsec_defconfig() - Get default dTSEC configuration739* @cfg: pointer to configuration structure.740*741* Call this function to obtain a default set of configuration values for742* initializing dTSEC. The user can overwrite any of the values before calling743* fman_dtsec_init(), if specific configuration needs to be applied.744*/745void fman_dtsec_defconfig(struct dtsec_cfg *cfg);746747/**748* fman_dtsec_init() - Init dTSEC hardware block749* @regs: Pointer to dTSEC register block750* @cfg: dTSEC configuration data751* @iface_mode: dTSEC interface mode, the type of MAC - PHY interface.752* @iface_speed: 1G or 10G753* @macaddr: MAC station address to be assigned to the device754* @fm_rev_maj: major rev number755* @fm_rev_min: minor rev number756* @exceptions_mask: initial exceptions mask757*758* This function initializes dTSEC and applies basic configuration.759*760* dTSEC initialization sequence:761* Before enabling Rx/Tx call dtsec_set_address() to set MAC address,762* fman_dtsec_adjust_link() to configure interface speed and duplex and finally763* dtsec_enable_tx()/dtsec_enable_rx() to start transmission and reception.764*765* Returns: 0 if successful, an error code otherwise.766*/767int fman_dtsec_init(struct dtsec_regs *regs, struct dtsec_cfg *cfg,768enum enet_interface iface_mode,769enum enet_speed iface_speed,770uint8_t *macaddr, uint8_t fm_rev_maj,771uint8_t fm_rev_min,772uint32_t exception_mask);773774/**775* fman_dtsec_enable() - Enable dTSEC Tx and Tx776* @regs: Pointer to dTSEC register block777* @apply_rx: enable rx side778* @apply_tx: enable tx side779*780* This function resets Tx and Rx graceful stop bit and enables dTSEC Tx and Rx.781*/782void fman_dtsec_enable(struct dtsec_regs *regs, bool apply_rx, bool apply_tx);783784/**785* fman_dtsec_disable() - Disable dTSEC Tx and Rx786* @regs: Pointer to dTSEC register block787* @apply_rx: disable rx side788* @apply_tx: disable tx side789*790* This function disables Tx and Rx in dTSEC.791*/792void fman_dtsec_disable(struct dtsec_regs *regs, bool apply_rx, bool apply_tx);793794/**795* fman_dtsec_get_revision() - Get dTSEC hardware revision796* @regs: Pointer to dTSEC register block797*798* Returns dtsec_id content799*800* Call this function to obtain the dTSEC hardware version.801*/802uint32_t fman_dtsec_get_revision(struct dtsec_regs *regs);803804/**805* fman_dtsec_set_mac_address() - Set MAC station address806* @regs: Pointer to dTSEC register block807* @macaddr: MAC address array808*809* This function sets MAC station address. To enable unicast reception call810* this after fman_dtsec_init(). While promiscuous mode is disabled dTSEC will811* match the destination address of received unicast frames against this812* address.813*/814void fman_dtsec_set_mac_address(struct dtsec_regs *regs, uint8_t *macaddr);815816/**817* fman_dtsec_get_mac_address() - Query MAC station address818* @regs: Pointer to dTSEC register block819* @macaddr: MAC address array820*/821void fman_dtsec_get_mac_address(struct dtsec_regs *regs, uint8_t *macaddr);822823/**824* fman_dtsec_set_uc_promisc() - Sets unicast promiscuous mode825* @regs: Pointer to dTSEC register block826* @enable: Enable unicast promiscuous mode827*828* Use this function to enable/disable dTSEC L2 address filtering. If the829* address filtering is disabled all unicast packets are accepted.830* To set dTSEC in promiscuous mode call both fman_dtsec_set_uc_promisc() and831* fman_dtsec_set_mc_promisc() to disable filtering for both unicast and832* multicast addresses.833*/834void fman_dtsec_set_uc_promisc(struct dtsec_regs *regs, bool enable);835836/**837* fman_dtsec_set_wol() - Enable/Disable wake on lan838* (magic packet support)839* @regs: Pointer to dTSEC register block840* @en: Enable Wake On Lan support in dTSEC841*842*/843void fman_dtsec_set_wol(struct dtsec_regs *regs, bool en);844845/**846* fman_dtsec_adjust_link() - Adjust dTSEC speed/duplex settings847* @regs: Pointer to dTSEC register block848* @iface_mode: dTSEC interface mode849* @speed: Link speed850* @full_dx: True for full-duplex, false for half-duplex.851*852* This function configures the MAC to function and the desired rates. Use it853* to configure dTSEC after fman_dtsec_init() and whenever the link speed854* changes (for instance following PHY auto-negociation).855*856* Returns: 0 if successful, an error code otherwise.857*/858int fman_dtsec_adjust_link(struct dtsec_regs *regs,859enum enet_interface iface_mode,860enum enet_speed speed, bool full_dx);861862/**863* fman_dtsec_set_tbi_phy_addr() - Updates TBI address field864* @regs: Pointer to dTSEC register block865* @address: Valid PHY address in the range of 1 to 31. 0 is reserved.866*867* In SGMII mode, the dTSEC's TBIPA field must contain a valid TBI PHY address868* so that the associated TBI PHY (i.e. the link) may be initialized.869*870* Returns: 0 if successful, an error code otherwise.871*/872int fman_dtsec_set_tbi_phy_addr(struct dtsec_regs *regs,873uint8_t addr);874875/**876* fman_dtsec_set_max_frame_len() - Set max frame length877* @regs: Pointer to dTSEC register block878* @length: Max frame length.879*880* Sets maximum frame length for received and transmitted frames. Frames that881* exceeds this length are truncated.882*/883void fman_dtsec_set_max_frame_len(struct dtsec_regs *regs, uint16_t length);884885/**886* fman_dtsec_get_max_frame_len() - Query max frame length887* @regs: Pointer to dTSEC register block888*889* Returns: the current value of the maximum frame length.890*/891uint16_t fman_dtsec_get_max_frame_len(struct dtsec_regs *regs);892893/**894* fman_dtsec_handle_rx_pause() - Configure pause frame handling895* @regs: Pointer to dTSEC register block896* @en: Enable pause frame handling in dTSEC897*898* If enabled, dTSEC will handle pause frames internally. This must be disabled899* if dTSEC is set in half-duplex mode.900* If pause frame handling is disabled and &dtsec_cfg.rx_ctrl_acc is set, pause901* frames will be transferred to the packet interface just like regular Ethernet902* frames.903*/904void fman_dtsec_handle_rx_pause(struct dtsec_regs *regs, bool en);905906/**907* fman_dtsec_set_tx_pause_frames() - Configure Tx pause time908* @regs: Pointer to dTSEC register block909* @time: Time value included in pause frames910*911* Call this function to set the time value used in transmitted pause frames.912* If time is 0, transmission of pause frames is disabled913*/914void fman_dtsec_set_tx_pause_frames(struct dtsec_regs *regs, uint16_t time);915916/**917* fman_dtsec_ack_event() - Acknowledge handled events918* @regs: Pointer to dTSEC register block919* @ev_mask: Events to acknowledge920*921* After handling events signaled by dTSEC in either polling or interrupt mode,922* call this function to reset the associated status bits in dTSEC event923* register.924*/925void fman_dtsec_ack_event(struct dtsec_regs *regs, uint32_t ev_mask);926927/**928* fman_dtsec_get_event() - Returns currently asserted events929* @regs: Pointer to dTSEC register block930* @ev_mask: Mask of relevant events931*932* Call this function to obtain a bit-mask of events that are currently asserted933* in dTSEC, taken from IEVENT register.934*935* Returns: a bit-mask of events asserted in dTSEC.936*/937uint32_t fman_dtsec_get_event(struct dtsec_regs *regs, uint32_t ev_mask);938939/**940* fman_dtsec_get_interrupt_mask() - Returns a bit-mask of enabled interrupts941* @regs: Pointer to dTSEC register block942*943* Call this function to obtain a bit-mask of enabled interrupts944* in dTSEC, taken from IMASK register.945*946* Returns: a bit-mask of enabled interrupts in dTSEC.947*/948uint32_t fman_dtsec_get_interrupt_mask(struct dtsec_regs *regs);949950void fman_dtsec_clear_addr_in_paddr(struct dtsec_regs *regs,951uint8_t paddr_num);952953void fman_dtsec_add_addr_in_paddr(struct dtsec_regs *regs,954uint64_t addr,955uint8_t paddr_num);956957void fman_dtsec_enable_tmr_interrupt (struct dtsec_regs *regs);958959void fman_dtsec_disable_tmr_interrupt(struct dtsec_regs *regs);960961/**962* fman_dtsec_disable_interrupt() - Disables interrupts for the specified events963* @regs: Pointer to dTSEC register block964* @ev_mask: Mask of relevant events965*966* Call this function to disable interrupts in dTSEC for the specified events.967* To enable interrupts use fman_dtsec_enable_interrupt().968*/969void fman_dtsec_disable_interrupt(struct dtsec_regs *regs, uint32_t ev_mask);970971/**972* fman_dtsec_enable_interrupt() - Enable interrupts for the specified events973* @regs: Pointer to dTSEC register block974* @ev_mask: Mask of relevant events975*976* Call this function to enable interrupts in dTSEC for the specified events.977* To disable interrupts use fman_dtsec_disable_interrupt().978*/979void fman_dtsec_enable_interrupt(struct dtsec_regs *regs, uint32_t ev_mask);980981/**982* fman_dtsec_set_ts() - Enables dTSEC timestamps983* @regs: Pointer to dTSEC register block984* @en: true to enable timestamps, false to disable them985*986* Call this function to enable/disable dTSEC timestamps. This affects both987* Tx and Rx.988*/989void fman_dtsec_set_ts(struct dtsec_regs *regs, bool en);990991/**992* fman_dtsec_set_bucket() - Enables/disables a filter bucket993* @regs: Pointer to dTSEC register block994* @bucket: Bucket index995* @enable: true/false to enable/disable this bucket996*997* This function enables or disables the specified bucket. Enabling a bucket998* associated with an address configures dTSEC to accept received packets999* with that destination address.1000* Multiple addresses may be associated with the same bucket. Disabling a1001* bucket will affect all addresses associated with that bucket. A bucket that1002* is enabled requires further filtering and verification in the upper layers1003*1004*/1005void fman_dtsec_set_bucket(struct dtsec_regs *regs, int bucket, bool enable);10061007/**1008* dtsec_set_hash_table() - insert a crc code into thr filter table1009* @regs: Pointer to dTSEC register block1010* @crc: crc to insert1011* @mcast: true is this is a multicast address1012* @ghtx: true if we are in ghtx mode1013*1014* This function inserts a crc code into the filter table.1015*/1016void fman_dtsec_set_hash_table(struct dtsec_regs *regs, uint32_t crc,1017bool mcast, bool ghtx);10181019/**1020* fman_dtsec_reset_filter_table() - Resets the address filtering table1021* @regs: Pointer to dTSEC register block1022* @mcast: Reset multicast entries1023* @ucast: Reset unicast entries1024*1025* Resets all entries in L2 address filter table. After calling this function1026* all buckets enabled using fman_dtsec_set_bucket() will be disabled.1027* If dtsec_init_filter_table() was called with @unicast_hash set to false,1028* @ucast argument is ignored.1029* This does not affect the primary nor the 15 additional addresses configured1030* using dtsec_set_address() or dtsec_set_match_address().1031*/1032void fman_dtsec_reset_filter_table(struct dtsec_regs *regs, bool mcast,1033bool ucast);10341035/**1036* fman_dtsec_set_mc_promisc() - Set multicast promiscuous mode1037* @regs: Pointer to dTSEC register block1038* @enable: Enable multicast promiscuous mode1039*1040* Call this to enable/disable L2 address filtering for multicast packets.1041*/1042void fman_dtsec_set_mc_promisc(struct dtsec_regs *regs, bool enable);10431044/* statistics APIs */10451046/**1047* fman_dtsec_set_stat_level() - Enable a group of MIB statistics counters1048* @regs: Pointer to dTSEC register block1049* @level: Specifies a certain group of dTSEC MIB HW counters or _all_,1050* to specify all the existing counters.1051* If set to _none_, it disables all the counters.1052*1053* Enables the MIB statistics hw counters and sets up the carry interrupt1054* masks for the counters corresponding to the @level input parameter.1055*1056* Returns: error if invalid @level value given.1057*/1058int fman_dtsec_set_stat_level(struct dtsec_regs *regs,1059enum dtsec_stat_level level);10601061/**1062* fman_dtsec_reset_stat() - Completely resets all dTSEC HW counters1063* @regs: Pointer to dTSEC register block1064*/1065void fman_dtsec_reset_stat(struct dtsec_regs *regs);10661067/**1068* fman_dtsec_get_clear_carry_regs() - Read and clear carry bits (CAR1-2 registers)1069* @regs: Pointer to dTSEC register block1070* @car1: car1 register value1071* @car2: car2 register value1072*1073* When set, the carry bits signal that an overflow occurred on the1074* corresponding counters.1075* Note that the carry bits (CAR1-2 registers) will assert the1076* %DTSEC_IEVENT_MSRO interrupt if unmasked (via CAM1-2 regs).1077*1078* Returns: true if overflow occurred, otherwise - false1079*/1080bool fman_dtsec_get_clear_carry_regs(struct dtsec_regs *regs,1081uint32_t *car1, uint32_t *car2);10821083uint32_t fman_dtsec_check_and_clear_tmr_event(struct dtsec_regs *regs);10841085uint32_t fman_dtsec_get_stat_counter(struct dtsec_regs *regs,1086enum dtsec_stat_counters reg_name);10871088void fman_dtsec_start_tx(struct dtsec_regs *regs);1089void fman_dtsec_start_rx(struct dtsec_regs *regs);1090void fman_dtsec_stop_tx(struct dtsec_regs *regs);1091void fman_dtsec_stop_rx(struct dtsec_regs *regs);1092uint32_t fman_dtsec_get_rctrl(struct dtsec_regs *regs);109310941095#endif /* __FSL_FMAN_DTSEC_H */109610971098