1*f6842c87Sskrll /* $NetBSD: dwc_gmac_reg.h,v 1.24 2024/10/19 05:09:03 skrll Exp $ */ 2231538d1Sjmcneill 3971dc1a0Smartin /*- 4971dc1a0Smartin * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc. 5971dc1a0Smartin * All rights reserved. 6971dc1a0Smartin * 7971dc1a0Smartin * This code is derived from software contributed to The NetBSD Foundation 8971dc1a0Smartin * by Matt Thomas of 3am Software Foundry and Martin Husemann. 9971dc1a0Smartin * 10971dc1a0Smartin * Redistribution and use in source and binary forms, with or without 11971dc1a0Smartin * modification, are permitted provided that the following conditions 12971dc1a0Smartin * are met: 13971dc1a0Smartin * 1. Redistributions of source code must retain the above copyright 14971dc1a0Smartin * notice, this list of conditions and the following disclaimer. 15971dc1a0Smartin * 2. Redistributions in binary form must reproduce the above copyright 16971dc1a0Smartin * notice, this list of conditions and the following disclaimer in the 17971dc1a0Smartin * documentation and/or other materials provided with the distribution. 18971dc1a0Smartin * 19971dc1a0Smartin * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20971dc1a0Smartin * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21971dc1a0Smartin * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22971dc1a0Smartin * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23971dc1a0Smartin * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24971dc1a0Smartin * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25971dc1a0Smartin * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26971dc1a0Smartin * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27971dc1a0Smartin * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28971dc1a0Smartin * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29971dc1a0Smartin * POSSIBILITY OF SUCH DAMAGE. 30971dc1a0Smartin */ 31971dc1a0Smartin 32971dc1a0Smartin #define AWIN_GMAC_MAC_CONF 0x0000 33971dc1a0Smartin #define AWIN_GMAC_MAC_FFILT 0x0004 34971dc1a0Smartin #define AWIN_GMAC_MAC_HTHIGH 0x0008 35971dc1a0Smartin #define AWIN_GMAC_MAC_HTLOW 0x000c 36971dc1a0Smartin #define AWIN_GMAC_MAC_MIIADDR 0x0010 37971dc1a0Smartin #define AWIN_GMAC_MAC_MIIDATA 0x0014 38971dc1a0Smartin #define AWIN_GMAC_MAC_FLOWCTRL 0x0018 39971dc1a0Smartin #define AWIN_GMAC_MAC_VLANTAG 0x001c 40bad15107Smartin #define AWIN_GMAC_MAC_VERSION 0x0020 /* not always implemented? */ 4177147dd2Sskrll #define AWIN_GMAC_MAC_VERSION_USERVER_MASK __BITS(15, 8) 4277147dd2Sskrll #define AWIN_GMAC_MAC_VERSION_SNPSVER_MASK __BITS( 7, 0) 43971dc1a0Smartin #define AWIN_GMAC_MAC_INTR 0x0038 44971dc1a0Smartin #define AWIN_GMAC_MAC_INTMASK 0x003c 45971dc1a0Smartin #define AWIN_GMAC_MAC_ADDR0HI 0x0040 46971dc1a0Smartin #define AWIN_GMAC_MAC_ADDR0LO 0x0044 47971dc1a0Smartin #define AWIN_GMAC_MII_STATUS 0x00D8 48971dc1a0Smartin 4924d51e99Sjmcneill #define AWIN_GMAC_MAC_CONF_DISABLEJABBER __BIT(22) /* jabber disable */ 506217b6d1Smartin #define AWIN_GMAC_MAC_CONF_FRAMEBURST __BIT(21) /* allow TX frameburst when 516217b6d1Smartin in half duplex mode */ 526217b6d1Smartin #define AWIN_GMAC_MAC_CONF_MIISEL __BIT(15) /* select MII phy */ 536217b6d1Smartin #define AWIN_GMAC_MAC_CONF_FES100 __BIT(14) /* 100 mbit mode */ 546217b6d1Smartin #define AWIN_GMAC_MAC_CONF_DISABLERXOWN __BIT(13) /* do not receive our own 556217b6d1Smartin TX frames in half duplex 566217b6d1Smartin mode */ 576217b6d1Smartin #define AWIN_GMAC_MAC_CONF_FULLDPLX __BIT(11) /* select full duplex */ 5824d51e99Sjmcneill #define AWIN_GMAC_MAC_CONF_ACS __BIT(7) /* auto pad/CRC stripping */ 596217b6d1Smartin #define AWIN_GMAC_MAC_CONF_TXENABLE __BIT(3) /* enable TX dma engine */ 606217b6d1Smartin #define AWIN_GMAC_MAC_CONF_RXENABLE __BIT(2) /* enable RX dma engine */ 612e0479a7Smartin 62f8c640e7Sjmcneill #define AWIN_GMAC_MAC_FFILT_RA __BIT(31) /* receive all mode */ 63f8c640e7Sjmcneill #define AWIN_GMAC_MAC_FFILT_HPF __BIT(10) /* hash or perfect filter */ 64f8c640e7Sjmcneill #define AWIN_GMAC_MAC_FFILT_SAF __BIT(9) /* source address filter */ 65f8c640e7Sjmcneill #define AWIN_GMAC_MAC_FFILT_SAIF __BIT(8) /* inverse filtering */ 66f8c640e7Sjmcneill #define AWIN_GMAC_MAC_FFILT_DBF __BIT(5) /* disable broadcast frames */ 67adb5d710Sandvar #define AWIN_GMAC_MAC_FFILT_PM __BIT(4) /* promiscuous multicast */ 68f8c640e7Sjmcneill #define AWIN_GMAC_MAC_FFILT_DAIF __BIT(3) /* DA inverse filtering */ 693af79252Smartin #define AWIN_GMAC_MAC_FFILT_HMC __BIT(2) /* multicast hash compare */ 703af79252Smartin #define AWIN_GMAC_MAC_FFILT_HUC __BIT(1) /* unicast hash compare */ 71adb5d710Sandvar #define AWIN_GMAC_MAC_FFILT_PR __BIT(0) /* promiscuous mode */ 723af79252Smartin 73bad15107Smartin #define AWIN_GMAC_MAC_INT_LPI __BIT(10) 74bad15107Smartin #define AWIN_GMAC_MAC_INT_TSI __BIT(9) 75bad15107Smartin #define AWIN_GMAC_MAC_INT_ANEG __BIT(2) 76bad15107Smartin #define AWIN_GMAC_MAC_INT_LINKCHG __BIT(1) 77bad15107Smartin #define AWIN_GMAC_MAC_INT_RGSMII __BIT(0) 78bad15107Smartin 7924d51e99Sjmcneill #define AWIN_GMAC_MAC_FLOWCTRL_PAUSE __BITS(31,16) 8024d51e99Sjmcneill #define AWIN_GMAC_MAC_FLOWCTRL_RFE __BIT(2) 8124d51e99Sjmcneill #define AWIN_GMAC_MAC_FLOWCTRL_TFE __BIT(1) 8224d51e99Sjmcneill #define AWIN_GMAC_MAC_FLOWCTRL_BUSY __BIT(0) 8324d51e99Sjmcneill 8417e5d3c8Schs #define GMAC_MMC_CTRL 0x0100 /* MMC control */ 8517e5d3c8Schs #define GMAC_MMC_RX_INTR 0x0104 /* MMC RX interrupt */ 8617e5d3c8Schs #define GMAC_MMC_TX_INTR 0x0108 /* MMC TX interrupt */ 8717e5d3c8Schs #define GMAC_MMC_RX_INT_MSK 0x010c /* MMC RX interrupt mask */ 8817e5d3c8Schs #define GMAC_MMC_TX_INT_MSK 0x0110 /* MMC TX interrupt mask */ 8917e5d3c8Schs #define GMAC_MMC_TXOCTETCNT_GB 0x0114 /* TX octet good+bad */ 9017e5d3c8Schs #define GMAC_MMC_TXFRMCNT_GB 0x0118 /* TX frame good+bad */ 9117e5d3c8Schs #define GMAC_MMC_TXUNDFLWERR 0x0148 /* TX underflow */ 9217e5d3c8Schs #define GMAC_MMC_TXCARERR 0x0160 /* TX carrier error */ 9317e5d3c8Schs #define GMAC_MMC_TXOCTETCNT_G 0x0164 /* TX octet good */ 9417e5d3c8Schs #define GMAC_MMC_TXFRMCNT_G 0x0168 /* TX frame good */ 9517e5d3c8Schs #define GMAC_MMC_RXFRMCNT_GB 0x0180 /* RX frame good+bad */ 9617e5d3c8Schs #define GMAC_MMC_RXOCTETCNT_GB 0x0184 /* RX octet good+bad */ 9717e5d3c8Schs #define GMAC_MMC_RXOCTETCNT_G 0x0188 /* RX octet good */ 9817e5d3c8Schs #define GMAC_MMC_RXMCFRMCNT_G 0x0190 /* RX mcast frame good */ 9917e5d3c8Schs #define GMAC_MMC_RXCRCERR 0x0194 /* RX CRC error */ 10017e5d3c8Schs #define GMAC_MMC_RXLENERR 0x01c8 /* RX length error */ 10117e5d3c8Schs #define GMAC_MMC_RXFIFOOVRFLW 0x01d4 /* RX FIFO overflow */ 10217e5d3c8Schs #define GMAC_MMC_IPC_INT_MSK 0x0200 /* RX csum offload intr mask */ 10317e5d3c8Schs #define GMAC_MMC_IPC_INTR 0x0208 /* RX csum offload interrupt */ 10417e5d3c8Schs #define GMAC_MMC_RXIPV4GFRM 0x0210 /* RX IPv4 good frame */ 10517e5d3c8Schs #define GMAC_MMC_RXIPV4HDERRFRM 0x0214 /* RX IPv4 header error */ 10617e5d3c8Schs #define GMAC_MMC_RXIPV6GFRM 0x0224 /* RX IPv6 good frame */ 10717e5d3c8Schs #define GMAC_MMC_RXIPV6HDERRFRM 0x0228 /* RX IPv6 header error */ 10817e5d3c8Schs #define GMAC_MMC_RXUDPERRFRM 0x0234 /* RX UDP csum error frame */ 10917e5d3c8Schs #define GMAC_MMC_RXTCPERRFRM 0x023c /* RX TCP csum error frame */ 11017e5d3c8Schs #define GMAC_MMC_RXICMPERRFRM 0x0244 /* RX ICMP csum error frame */ 11117e5d3c8Schs #define GMAC_MMC_RXIPV4HDERROCT 0x0254 /* RX IPv4 header error octets */ 11217e5d3c8Schs #define GMAC_MMC_RXIPV6HDERROCT 0x0268 /* RX IPv6 header error octets */ 11317e5d3c8Schs #define GMAC_MMC_RXUDPERROCT 0x0274 /* RX UDP error octets */ 11417e5d3c8Schs #define GMAC_MMC_RXTCPERROCT 0x027c /* RX TCP error octets */ 11517e5d3c8Schs #define GMAC_MMC_RXICMPERROCT 0x0280 /* RX ICMP error octets */ 11617e5d3c8Schs 11717e5d3c8Schs #define GMAC_MMC_CTRL_FHP __BIT(5) /* Full-Half preset */ 11817e5d3c8Schs #define GMAC_MMC_CTRL_CP __BIT(4) /* Counters preset */ 11917e5d3c8Schs #define GMAC_MMC_CTRL_MCF __BIT(3) /* MMC counter freeze */ 12017e5d3c8Schs #define GMAC_MMC_CTRL_ROR __BIT(2) /* reset on read */ 12117e5d3c8Schs #define GMAC_MMC_CTRL_CSR __BIT(1) /* Counter stop rollover */ 12217e5d3c8Schs #define GMAC_MMC_CTRL_CR __BIT(0) /* Counters reset */ 12317e5d3c8Schs 124971dc1a0Smartin #define AWIN_GMAC_DMA_BUSMODE 0x1000 125971dc1a0Smartin #define AWIN_GMAC_DMA_TXPOLL 0x1004 126971dc1a0Smartin #define AWIN_GMAC_DMA_RXPOLL 0x1008 127971dc1a0Smartin #define AWIN_GMAC_DMA_RX_ADDR 0x100c 128971dc1a0Smartin #define AWIN_GMAC_DMA_TX_ADDR 0x1010 129971dc1a0Smartin #define AWIN_GMAC_DMA_STATUS 0x1014 130971dc1a0Smartin #define AWIN_GMAC_DMA_OPMODE 0x1018 131971dc1a0Smartin #define AWIN_GMAC_DMA_INTENABLE 0x101c 132971dc1a0Smartin #define AWIN_GMAC_DMA_CUR_TX_DESC 0x1048 133971dc1a0Smartin #define AWIN_GMAC_DMA_CUR_RX_DESC 0x104c 134971dc1a0Smartin #define AWIN_GMAC_DMA_CUR_TX_BUFADDR 0x1050 135971dc1a0Smartin #define AWIN_GMAC_DMA_CUR_RX_BUFADDR 0x1054 136bad15107Smartin #define AWIN_GMAC_DMA_HWFEATURES 0x1058 /* not always implemented? */ 137971dc1a0Smartin 138518bac49Smartin #define GMAC_MII_PHY_MASK __BITS(15,11) 139518bac49Smartin #define GMAC_MII_REG_MASK __BITS(10,6) 140971dc1a0Smartin 141518bac49Smartin #define GMAC_MII_BUSY __BIT(0) 142518bac49Smartin #define GMAC_MII_WRITE __BIT(1) 143936e3162Smartin #define GMAC_MII_CLK_60_100M_DIV42 0x0 144936e3162Smartin #define GMAC_MII_CLK_100_150M_DIV62 0x1 145936e3162Smartin #define GMAC_MII_CLK_25_35M_DIV16 0x2 146936e3162Smartin #define GMAC_MII_CLK_35_60M_DIV26 0x3 147936e3162Smartin #define GMAC_MII_CLK_150_250M_DIV102 0x4 148936e3162Smartin #define GMAC_MII_CLK_250_300M_DIV124 0x5 149936e3162Smartin #define GMAC_MII_CLK_DIV4 0x8 150936e3162Smartin #define GMAC_MII_CLK_DIV6 0x9 151936e3162Smartin #define GMAC_MII_CLK_DIV8 0xa 152936e3162Smartin #define GMAC_MII_CLK_DIV10 0xb 153936e3162Smartin #define GMAC_MII_CLK_DIV12 0xc 154936e3162Smartin #define GMAC_MII_CLK_DIV14 0xd 155936e3162Smartin #define GMAC_MII_CLK_DIV16 0xe 156936e3162Smartin #define GMAC_MII_CLK_DIV18 0xf 157936e3162Smartin #define GMAC_MII_CLKMASK __BITS(5,2) 158971dc1a0Smartin 15924d51e99Sjmcneill #define GMAC_BUSMODE_4PBL __BIT(24) 16024d51e99Sjmcneill #define GMAC_BUSMODE_RPBL __BITS(22,17) 1613af79252Smartin #define GMAC_BUSMODE_FIXEDBURST __BIT(16) 1623af79252Smartin #define GMAC_BUSMODE_PRIORXTX __BITS(15,14) 1633af79252Smartin #define GMAC_BUSMODE_PRIORXTX_41 3 1643af79252Smartin #define GMAC_BUSMODE_PRIORXTX_31 2 1653af79252Smartin #define GMAC_BUSMODE_PRIORXTX_21 1 1663af79252Smartin #define GMAC_BUSMODE_PRIORXTX_11 0 16724d51e99Sjmcneill #define GMAC_BUSMODE_PBL __BITS(13,8) /* possible DMA 1683af79252Smartin burst len */ 169518bac49Smartin #define GMAC_BUSMODE_RESET __BIT(0) 170971dc1a0Smartin 17117e5d3c8Schs #define AWIN_GMAC_MRCOIS __BIT(7) /* MMC RX csum offload intr */ 17217e5d3c8Schs #define AWIN_GMAC_MTIS __BIT(6) /* MMC TX interrupt */ 17317e5d3c8Schs #define AWIN_GMAC_MRIS __BIT(3) /* MMC RX interrupt */ 17417e5d3c8Schs #define AWIN_GMAC_MIS __BIT(4) /* MMC interrupt */ 17517e5d3c8Schs #define AWIN_GMAC_PIS __BIT(3) /* PMT interrupt */ 17617e5d3c8Schs #define AWIN_GMAC_MII_IRQ __BIT(0) /* RGMII interrupt */ 177971dc1a0Smartin 1783af79252Smartin 1790d8f6796Smartin #define GMAC_DMA_OP_DISABLECSDROP __BIT(26) /* disable dropping of 1800d8f6796Smartin frames with TCP/IP 1810d8f6796Smartin checksum errors */ 1820d8f6796Smartin #define GMAC_DMA_OP_RXSTOREFORWARD __BIT(25) /* start RX when a 18324d51e99Sjmcneill full frame is available */ 1840d8f6796Smartin #define GMAC_DMA_OP_DISABLERXFLUSH __BIT(24) /* Do not drop frames 1850d8f6796Smartin when out of RX descr. */ 18624d51e99Sjmcneill #define GMAC_DMA_OP_TXSTOREFORWARD __BIT(21) /* start TX when a 1873af79252Smartin full frame is available */ 1883af79252Smartin #define GMAC_DMA_OP_FLUSHTX __BIT(20) /* flush TX fifo */ 189041c183aSjmcneill #define GMAC_DMA_OP_TTC __BITS(16,14) /* TX thresh control */ 1903af79252Smartin #define GMAC_DMA_OP_TXSTART __BIT(13) /* start TX DMA engine */ 191041c183aSjmcneill #define GMAC_DMA_OP_RTC __BITS(4,3) /* RX thres control */ 1923af79252Smartin #define GMAC_DMA_OP_RXSTART __BIT(1) /* start RX DMA engine */ 193518bac49Smartin 19417e5d3c8Schs #define GMAC_DMA_INT_MMC __BIT(27) /* MMC interrupt */ 195518bac49Smartin #define GMAC_DMA_INT_NIE __BIT(16) /* Normal/Summary */ 196518bac49Smartin #define GMAC_DMA_INT_AIE __BIT(15) /* Abnormal/Summary */ 197518bac49Smartin #define GMAC_DMA_INT_ERE __BIT(14) /* Early receive */ 198518bac49Smartin #define GMAC_DMA_INT_FBE __BIT(13) /* Fatal bus error */ 199518bac49Smartin #define GMAC_DMA_INT_ETE __BIT(10) /* Early transmit */ 200518bac49Smartin #define GMAC_DMA_INT_RWE __BIT(9) /* Receive watchdog */ 201518bac49Smartin #define GMAC_DMA_INT_RSE __BIT(8) /* Receive stopped */ 2023af79252Smartin #define GMAC_DMA_INT_RUE __BIT(7) /* Receive buffer unavail. */ 203518bac49Smartin #define GMAC_DMA_INT_RIE __BIT(6) /* Receive interrupt */ 204518bac49Smartin #define GMAC_DMA_INT_UNE __BIT(5) /* Tx underflow */ 205518bac49Smartin #define GMAC_DMA_INT_OVE __BIT(4) /* Receive overflow */ 206518bac49Smartin #define GMAC_DMA_INT_TJE __BIT(3) /* Transmit jabber */ 2073af79252Smartin #define GMAC_DMA_INT_TUE __BIT(2) /* Transmit buffer unavail. */ 208518bac49Smartin #define GMAC_DMA_INT_TSE __BIT(1) /* Transmit stopped */ 209518bac49Smartin #define GMAC_DMA_INT_TIE __BIT(0) /* Transmit interrupt */ 210971dc1a0Smartin 211bad15107Smartin #define GMAC_DMA_INT_MASK __BITS(0,16) /* all possible intr bits */ 212971dc1a0Smartin 21372645925Smartin #define GMAC_DMA_FEAT_ENHANCED_DESC __BIT(24) 21417e5d3c8Schs #define GMAC_DMA_FEAT_RMON __BIT(11) /* MMC */ 21572645925Smartin 216971dc1a0Smartin struct dwc_gmac_dev_dmadesc { 21772645925Smartin uint32_t ddesc_status0; /* Status / TDES0 */ 218971dc1a0Smartin /* both: */ 219518bac49Smartin #define DDESC_STATUS_OWNEDBYDEV __BIT(31) 220518bac49Smartin 221971dc1a0Smartin /* for RX descriptors */ 222518bac49Smartin #define DDESC_STATUS_DAFILTERFAIL __BIT(30) 223518bac49Smartin #define DDESC_STATUS_FRMLENMSK __BITS(29,16) 224518bac49Smartin #define DDESC_STATUS_RXERROR __BIT(15) 225518bac49Smartin #define DDESC_STATUS_RXTRUNCATED __BIT(14) 226518bac49Smartin #define DDESC_STATUS_SAFILTERFAIL __BIT(13) 227518bac49Smartin #define DDESC_STATUS_RXIPC_GIANTFRAME __BIT(12) 228518bac49Smartin #define DDESC_STATUS_RXDAMAGED __BIT(11) 229518bac49Smartin #define DDESC_STATUS_RXVLANTAG __BIT(10) 230518bac49Smartin #define DDESC_STATUS_RXFIRST __BIT(9) 231518bac49Smartin #define DDESC_STATUS_RXLAST __BIT(8) 232518bac49Smartin #define DDESC_STATUS_RXIPC_GIANT __BIT(7) 233518bac49Smartin #define DDESC_STATUS_RXCOLLISION __BIT(6) 234518bac49Smartin #define DDESC_STATUS_RXFRAMEETHER __BIT(5) 235518bac49Smartin #define DDESC_STATUS_RXWATCHDOG __BIT(4) 236518bac49Smartin #define DDESC_STATUS_RXMIIERROR __BIT(3) 237518bac49Smartin #define DDESC_STATUS_RXDRIBBLING __BIT(2) 238518bac49Smartin #define DDESC_STATUS_RXCRC __BIT(1) 239971dc1a0Smartin 24072645925Smartin uint32_t ddesc_cntl1; /* Control / TDES1 */ 241518bac49Smartin 242518bac49Smartin /* for TX descriptors */ 243518bac49Smartin #define DDESC_CNTL_TXINT __BIT(31) 244518bac49Smartin #define DDESC_CNTL_TXLAST __BIT(30) 245518bac49Smartin #define DDESC_CNTL_TXFIRST __BIT(29) 2460093a838Smartin #define DDESC_CNTL_TXCHECKINSCTRL __BITS(27,28) 2470093a838Smartin 2480093a838Smartin #define DDESC_TXCHECK_DISABLED 0 2490093a838Smartin #define DDESC_TXCHECK_IP 1 2500093a838Smartin #define DDESC_TXCHECK_IP_NO_PSE 2 2510093a838Smartin #define DDESC_TXCHECK_FULL 3 2520093a838Smartin 253518bac49Smartin #define DDESC_CNTL_TXCRCDIS __BIT(26) 254518bac49Smartin #define DDESC_CNTL_TXRINGEND __BIT(25) 255518bac49Smartin #define DDESC_CNTL_TXCHAIN __BIT(24) 2560093a838Smartin #define DDESC_CNTL_TXDISPAD __BIT(23) 257518bac49Smartin 258518bac49Smartin /* for RX descriptors */ 2593ac95479Smartin #define DDESC_CNTL_RXINTDIS __BIT(31) 260518bac49Smartin #define DDESC_CNTL_RXRINGEND __BIT(25) 261518bac49Smartin #define DDESC_CNTL_RXCHAIN __BIT(24) 262518bac49Smartin 263518bac49Smartin /* both */ 264518bac49Smartin #define DDESC_CNTL_SIZE1MASK __BITS(10,0) 265971dc1a0Smartin #define DDESC_CNTL_SIZE1SHIFT 0 266518bac49Smartin #define DDESC_CNTL_SIZE2MASK __BITS(21,11) 267518bac49Smartin #define DDESC_CNTL_SIZE2SHIFT 11 268971dc1a0Smartin 269971dc1a0Smartin uint32_t ddesc_data; /* pointer to buffer data */ 270971dc1a0Smartin uint32_t ddesc_next; /* link to next descriptor */ 271971dc1a0Smartin }; 27272645925Smartin 27372645925Smartin /* Common to enhanced descriptors */ 27472645925Smartin 27572645925Smartin #define DDESC_DES0_OWN __BIT(31) 27672645925Smartin 27772645925Smartin #define DDESC_DES1_SIZE2MASK __BITS(28,16) 27872645925Smartin #define DDESC_DES1_SIZE1MASK __BITS(12,0) 27972645925Smartin 28072645925Smartin /* For enhanced TX descriptors */ 28172645925Smartin 28272645925Smartin #define DDESC_TDES0_IC __BIT(30) 28372645925Smartin #define DDESC_TDES0_LS __BIT(29) 28472645925Smartin #define DDESC_TDES0_FS __BIT(28) 28572645925Smartin #define DDESC_TDES0_TCH __BIT(20) 28672645925Smartin 28772645925Smartin /* For enhanced RX descriptors */ 28872645925Smartin 28972645925Smartin #define DDESC_RDES0_FL __BITS(29,16) 29072645925Smartin #define DDESC_RDES0_ES __BIT(15) 29172645925Smartin #define DDESC_RDES0_LE __BIT(12) 29272645925Smartin 29372645925Smartin #define DDESC_RDES1_RCH __BIT(14) 294