1 /* 2 * Generic Broadcom Home Networking Division (HND) DMA engine HW interface 3 * This supports the following chips: BCM42xx, 44xx, 47xx . 4 * 5 * Copyright (C) 1999-2019, Broadcom. 6 * 7 * Unless you and Broadcom execute a separate written software license 8 * agreement governing use of this software, this software is licensed to you 9 * under the terms of the GNU General Public License version 2 (the "GPL"), 10 * available at http://www.broadcom.com/licenses/GPLv2.php, with the 11 * following added to such license: 12 * 13 * As a special exception, the copyright holders of this software give you 14 * permission to link this software with independent modules, and to copy and 15 * distribute the resulting executable under terms of your choice, provided that 16 * you also meet, for each linked independent module, the terms and conditions 17 * of the license of that module. An independent module is a module which is 18 * not derived from this software. The special exception does not apply to any 19 * modifications of the software. 20 * 21 * Notwithstanding the above, under no circumstances may you combine this 22 * software in any way with any other Broadcom software provided under a license 23 * other than the GPL, without Broadcom's express prior written consent. 24 * 25 * 26 * <<Broadcom-WL-IPTag/Open:>> 27 * 28 * $Id: sbhnddma.h 694506 2017-04-13 05:10:05Z $ 29 */ 30 31 #ifndef _sbhnddma_h_ 32 #define _sbhnddma_h_ 33 34 /* DMA structure: 35 * support two DMA engines: 32 bits address or 64 bit addressing 36 * basic DMA register set is per channel(transmit or receive) 37 * a pair of channels is defined for convenience 38 */ 39 40 /* 32 bits addressing */ 41 42 /** dma registers per channel(xmt or rcv) */ 43 typedef volatile struct { 44 uint32 control; /**< enable, et al */ 45 uint32 addr; /**< descriptor ring base address (4K aligned) */ 46 uint32 ptr; /**< last descriptor posted to chip */ 47 uint32 status; /**< current active descriptor, et al */ 48 } dma32regs_t; 49 50 typedef volatile struct { 51 dma32regs_t xmt; /**< dma tx channel */ 52 dma32regs_t rcv; /**< dma rx channel */ 53 } dma32regp_t; 54 55 typedef volatile struct { /* diag access */ 56 uint32 fifoaddr; /**< diag address */ 57 uint32 fifodatalow; /**< low 32bits of data */ 58 uint32 fifodatahigh; /**< high 32bits of data */ 59 uint32 pad; /**< reserved */ 60 } dma32diag_t; 61 62 /** 63 * DMA Descriptor 64 * Descriptors are only read by the hardware, never written back. 65 */ 66 typedef volatile struct { 67 uint32 ctrl; /**< misc control bits & bufcount */ 68 uint32 addr; /**< data buffer address */ 69 } dma32dd_t; 70 71 /** Each descriptor ring must be 4096byte aligned, and fit within a single 72 * 4096byte page. */ 73 #define D32RINGALIGN_BITS 12 74 #define D32MAXRINGSZ (1 << D32RINGALIGN_BITS) 75 #define D32RINGALIGN (1 << D32RINGALIGN_BITS) 76 77 #define D32MAXDD (D32MAXRINGSZ / sizeof(dma32dd_t)) 78 79 /* transmit channel control */ 80 #define XC_XE ((uint32)1 << 0) /**< transmit enable */ 81 #define XC_SE ((uint32)1 << 1) /**< transmit suspend request */ 82 #define XC_LE ((uint32)1 << 2) /**< loopback enable */ 83 #define XC_FL ((uint32)1 << 4) /**< flush request */ 84 #define XC_MR_MASK 0x000001C0 /**< Multiple outstanding reads */ 85 #define XC_MR_SHIFT 6 86 #define XC_PD ((uint32)1 << 11) /**< parity check disable */ 87 #define XC_AE ((uint32)3 << 16) /**< address extension bits */ 88 #define XC_AE_SHIFT 16 89 #define XC_BL_MASK 0x001C0000 /**< BurstLen bits */ 90 #define XC_BL_SHIFT 18 91 #define XC_PC_MASK 0x00E00000 /**< Prefetch control */ 92 #define XC_PC_SHIFT 21 93 #define XC_PT_MASK 0x03000000 /**< Prefetch threshold */ 94 #define XC_PT_SHIFT 24 95 96 /** Multiple outstanding reads */ 97 #define DMA_MR_1 0 98 #define DMA_MR_2 1 99 #define DMA_MR_4 2 100 #define DMA_MR_8 3 101 #define DMA_MR_12 4 102 #define DMA_MR_16 5 103 #define DMA_MR_20 6 104 #define DMA_MR_32 7 105 106 /** DMA Burst Length in bytes */ 107 #define DMA_BL_16 0 108 #define DMA_BL_32 1 109 #define DMA_BL_64 2 110 #define DMA_BL_128 3 111 #define DMA_BL_256 4 112 #define DMA_BL_512 5 113 #define DMA_BL_1024 6 114 115 /** Prefetch control */ 116 #define DMA_PC_0 0 117 #define DMA_PC_4 1 118 #define DMA_PC_8 2 119 #define DMA_PC_16 3 120 #define DMA_PC_32 4 121 /* others: reserved */ 122 123 /** Prefetch threshold */ 124 #define DMA_PT_1 0 125 #define DMA_PT_2 1 126 #define DMA_PT_4 2 127 #define DMA_PT_8 3 128 129 /** Channel Switch */ 130 #define DMA_CS_OFF 0 131 #define DMA_CS_ON 1 132 133 /* transmit descriptor table pointer */ 134 #define XP_LD_MASK 0xfff /**< last valid descriptor */ 135 136 /* transmit channel status */ 137 #define XS_CD_MASK 0x0fff /**< current descriptor pointer */ 138 #define XS_XS_MASK 0xf000 /**< transmit state */ 139 #define XS_XS_SHIFT 12 140 #define XS_XS_DISABLED 0x0000 /**< disabled */ 141 #define XS_XS_ACTIVE 0x1000 /**< active */ 142 #define XS_XS_IDLE 0x2000 /**< idle wait */ 143 #define XS_XS_STOPPED 0x3000 /**< stopped */ 144 #define XS_XS_SUSP 0x4000 /**< suspend pending */ 145 #define XS_XE_MASK 0xf0000 /**< transmit errors */ 146 #define XS_XE_SHIFT 16 147 #define XS_XE_NOERR 0x00000 /**< no error */ 148 #define XS_XE_DPE 0x10000 /**< descriptor protocol error */ 149 #define XS_XE_DFU 0x20000 /**< data fifo underrun */ 150 #define XS_XE_BEBR 0x30000 /**< bus error on buffer read */ 151 #define XS_XE_BEDA 0x40000 /**< bus error on descriptor access */ 152 #define XS_AD_MASK 0xfff00000 /**< active descriptor */ 153 #define XS_AD_SHIFT 20 154 155 /* receive channel control */ 156 #define RC_RE ((uint32)1 << 0) /**< receive enable */ 157 #define RC_RO_MASK 0xfe /**< receive frame offset */ 158 #define RC_RO_SHIFT 1 159 #define RC_FM ((uint32)1 << 8) /**< direct fifo receive (pio) mode */ 160 #define RC_SH ((uint32)1 << 9) /**< separate rx header descriptor enable */ 161 #define RC_OC ((uint32)1 << 10) /**< overflow continue */ 162 #define RC_PD ((uint32)1 << 11) /**< parity check disable */ 163 #define RC_AE ((uint32)3 << 16) /**< address extension bits */ 164 #define RC_AE_SHIFT 16 165 #define RC_BL_MASK 0x001C0000 /**< BurstLen bits */ 166 #define RC_BL_SHIFT 18 167 #define RC_PC_MASK 0x00E00000 /**< Prefetch control */ 168 #define RC_PC_SHIFT 21 169 #define RC_PT_MASK 0x03000000 /**< Prefetch threshold */ 170 #define RC_PT_SHIFT 24 171 #define RC_WAITCMP_MASK 0x00001000 172 #define RC_WAITCMP_SHIFT 12 173 /* receive descriptor table pointer */ 174 #define RP_LD_MASK 0xfff /**< last valid descriptor */ 175 176 /* receive channel status */ 177 #define RS_CD_MASK 0x0fff /**< current descriptor pointer */ 178 #define RS_RS_MASK 0xf000 /**< receive state */ 179 #define RS_RS_SHIFT 12 180 #define RS_RS_DISABLED 0x0000 /**< disabled */ 181 #define RS_RS_ACTIVE 0x1000 /**< active */ 182 #define RS_RS_IDLE 0x2000 /**< idle wait */ 183 #define RS_RS_STOPPED 0x3000 /**< reserved */ 184 #define RS_RE_MASK 0xf0000 /**< receive errors */ 185 #define RS_RE_SHIFT 16 186 #define RS_RE_NOERR 0x00000 /**< no error */ 187 #define RS_RE_DPE 0x10000 /**< descriptor protocol error */ 188 #define RS_RE_DFO 0x20000 /**< data fifo overflow */ 189 #define RS_RE_BEBW 0x30000 /**< bus error on buffer write */ 190 #define RS_RE_BEDA 0x40000 /**< bus error on descriptor access */ 191 #define RS_AD_MASK 0xfff00000 /**< active descriptor */ 192 #define RS_AD_SHIFT 20 193 194 /* fifoaddr */ 195 #define FA_OFF_MASK 0xffff /**< offset */ 196 #define FA_SEL_MASK 0xf0000 /**< select */ 197 #define FA_SEL_SHIFT 16 198 #define FA_SEL_XDD 0x00000 /**< transmit dma data */ 199 #define FA_SEL_XDP 0x10000 /**< transmit dma pointers */ 200 #define FA_SEL_RDD 0x40000 /**< receive dma data */ 201 #define FA_SEL_RDP 0x50000 /**< receive dma pointers */ 202 #define FA_SEL_XFD 0x80000 /**< transmit fifo data */ 203 #define FA_SEL_XFP 0x90000 /**< transmit fifo pointers */ 204 #define FA_SEL_RFD 0xc0000 /**< receive fifo data */ 205 #define FA_SEL_RFP 0xd0000 /**< receive fifo pointers */ 206 #define FA_SEL_RSD 0xe0000 /**< receive frame status data */ 207 #define FA_SEL_RSP 0xf0000 /**< receive frame status pointers */ 208 209 /* descriptor control flags */ 210 #define CTRL_BC_MASK \ 211 0x00001fff /**< buffer byte count, real data len must <= 4KB */ 212 #define CTRL_AE ((uint32)3 << 16) /**< address extension bits */ 213 #define CTRL_AE_SHIFT 16 214 #define CTRL_PARITY ((uint32)3 << 18) /**< parity bit */ 215 #define CTRL_EOT ((uint32)1 << 28) /**< end of descriptor table */ 216 #define CTRL_IOC ((uint32)1 << 29) /**< interrupt on completion */ 217 #define CTRL_EOF ((uint32)1 << 30) /**< end of frame */ 218 #define CTRL_SOF ((uint32)1 << 31) /**< start of frame */ 219 220 /** control flags in the range [27:20] are core-specific and not defined here */ 221 #define CTRL_CORE_MASK 0x0ff00000 222 223 /* 64 bits addressing */ 224 225 /** dma registers per channel(xmt or rcv) */ 226 typedef volatile struct { 227 uint32 control; /**< enable, et al */ 228 uint32 ptr; /**< last descriptor posted to chip */ 229 uint32 230 addrlow; /**< descriptor ring base address low 32-bits (8K aligned) */ 231 uint32 232 addrhigh; /**< descriptor ring base address bits 63:32 (8K aligned) */ 233 uint32 status0; /**< current descriptor, xmt state */ 234 uint32 status1; /**< active descriptor, xmt error */ 235 } dma64regs_t; 236 237 typedef volatile struct { 238 dma64regs_t tx; /**< dma64 tx channel */ 239 dma64regs_t rx; /**< dma64 rx channel */ 240 } dma64regp_t; 241 242 typedef volatile struct { /**< diag access */ 243 uint32 fifoaddr; /**< diag address */ 244 uint32 fifodatalow; /**< low 32bits of data */ 245 uint32 fifodatahigh; /**< high 32bits of data */ 246 uint32 pad; /**< reserved */ 247 } dma64diag_t; 248 249 /** 250 * DMA Descriptor 251 * Descriptors are only read by the hardware, never written back. 252 */ 253 typedef volatile struct { 254 uint32 ctrl1; /**< misc control bits */ 255 uint32 ctrl2; /**< buffer count and address extension */ 256 uint32 addrlow; /**< memory address of the date buffer, bits 31:0 */ 257 uint32 addrhigh; /**< memory address of the date buffer, bits 63:32 */ 258 } dma64dd_t; 259 260 /** 261 * Each descriptor ring must be 8kB aligned, and fit within a contiguous 8kB 262 * physical addresss. 263 */ 264 #define D64RINGALIGN_BITS 13 265 #define D64MAXRINGSZ (1 << D64RINGALIGN_BITS) 266 #define D64RINGBOUNDARY (1 << D64RINGALIGN_BITS) 267 268 #define D64MAXDD (D64MAXRINGSZ / sizeof(dma64dd_t)) 269 270 /** for cores with large descriptor ring support, descriptor ring size can be up 271 * to 4096 */ 272 #define D64MAXDD_LARGE ((1 << 16) / sizeof(dma64dd_t)) 273 274 /** 275 * for cores with large descriptor ring support (4k descriptors), descriptor 276 * ring cannot cross 64K boundary 277 */ 278 #define D64RINGBOUNDARY_LARGE (1 << 16) 279 280 /* 281 * Default DMA Burstlen values for USBRev >= 12 and SDIORev >= 11. 282 * When this field contains the value N, the burst length is 2**(N + 4) bytes. 283 */ 284 #define D64_DEF_USBBURSTLEN 2 285 #define D64_DEF_SDIOBURSTLEN 1 286 287 #ifndef D64_USBBURSTLEN 288 #define D64_USBBURSTLEN DMA_BL_64 289 #endif // endif 290 #ifndef D64_SDIOBURSTLEN 291 #define D64_SDIOBURSTLEN DMA_BL_32 292 #endif // endif 293 294 /* transmit channel control */ 295 #define D64_XC_XE 0x00000001 /**< transmit enable */ 296 #define D64_XC_SE 0x00000002 /**< transmit suspend request */ 297 #define D64_XC_LE 0x00000004 /**< loopback enable */ 298 #define D64_XC_FL 0x00000010 /**< flush request */ 299 #define D64_XC_MR_MASK 0x000001C0 /**< Multiple outstanding reads */ 300 #define D64_XC_MR_SHIFT 6 301 #define D64_XC_CS_SHIFT 9 /**< channel switch enable */ 302 #define D64_XC_CS_MASK 0x00000200 /**< channel switch enable */ 303 #define D64_XC_PD 0x00000800 /**< parity check disable */ 304 #define D64_XC_AE 0x00030000 /**< address extension bits */ 305 #define D64_XC_AE_SHIFT 16 306 #define D64_XC_BL_MASK 0x001C0000 /**< BurstLen bits */ 307 #define D64_XC_BL_SHIFT 18 308 #define D64_XC_PC_MASK 0x00E00000 /**< Prefetch control */ 309 #define D64_XC_PC_SHIFT 21 310 #define D64_XC_PT_MASK 0x03000000 /**< Prefetch threshold */ 311 #define D64_XC_PT_SHIFT 24 312 #define D64_XC_CO_MASK 0x04000000 /**< coherent transactions for descriptors \ 313 */ 314 #define D64_XC_CO_SHIFT 26 315 316 /* transmit descriptor table pointer */ 317 #define D64_XP_LD_MASK 0x00001fff /**< last valid descriptor */ 318 319 /* transmit channel status */ 320 #define D64_XS0_CD_MASK (di->d64_xs0_cd_mask) /**< current descriptor pointer \ 321 */ 322 #define D64_XS0_XS_MASK 0xf0000000 /**< transmit state */ 323 #define D64_XS0_XS_SHIFT 28 324 #define D64_XS0_XS_DISABLED 0x00000000 /**< disabled */ 325 #define D64_XS0_XS_ACTIVE 0x10000000 /**< active */ 326 #define D64_XS0_XS_IDLE 0x20000000 /**< idle wait */ 327 #define D64_XS0_XS_STOPPED 0x30000000 /**< stopped */ 328 #define D64_XS0_XS_SUSP 0x40000000 /**< suspend pending */ 329 330 #define D64_XS1_AD_MASK (di->d64_xs1_ad_mask) /**< active descriptor */ 331 #define D64_XS1_XE_MASK 0xf0000000 /**< transmit errors */ 332 #define D64_XS1_XE_SHIFT 28 333 #define D64_XS1_XE_NOERR 0x00000000 /**< no error */ 334 #define D64_XS1_XE_DPE 0x10000000 /**< descriptor protocol error */ 335 #define D64_XS1_XE_DFU 0x20000000 /**< data fifo underrun */ 336 #define D64_XS1_XE_DTE 0x30000000 /**< data transfer error */ 337 #define D64_XS1_XE_DESRE 0x40000000 /**< descriptor read error */ 338 #define D64_XS1_XE_COREE 0x50000000 /**< core error */ 339 340 /* receive channel control */ 341 #define D64_RC_RE 0x00000001 /**< receive enable */ 342 #define D64_RC_RO_MASK 0x000000fe /**< receive frame offset */ 343 #define D64_RC_RO_SHIFT 1 344 #define D64_RC_FM 0x00000100 /**< direct fifo receive (pio) mode */ 345 #define D64_RC_SH 0x00000200 /**< separate rx header descriptor enable */ 346 #define D64_RC_SHIFT 9 /**< separate rx header descriptor enable */ 347 #define D64_RC_OC 0x00000400 /**< overflow continue */ 348 #define D64_RC_PD 0x00000800 /**< parity check disable */ 349 #define D64_RC_WAITCMP_MASK 0x00001000 350 #define D64_RC_WAITCMP_SHIFT 12 351 #define D64_RC_SA 0x00002000 /**< select active */ 352 #define D64_RC_GE 0x00004000 /**< Glom enable */ 353 #define D64_RC_AE 0x00030000 /**< address extension bits */ 354 #define D64_RC_AE_SHIFT 16 355 #define D64_RC_BL_MASK 0x001C0000 /**< BurstLen bits */ 356 #define D64_RC_BL_SHIFT 18 357 #define D64_RC_PC_MASK 0x00E00000 /**< Prefetch control */ 358 #define D64_RC_PC_SHIFT 21 359 #define D64_RC_PT_MASK 0x03000000 /**< Prefetch threshold */ 360 #define D64_RC_PT_SHIFT 24 361 #define D64_RC_CO_MASK 0x04000000 /**< coherent transactions for descriptors \ 362 */ 363 #define D64_RC_CO_SHIFT 26 364 #define D64_RC_ROEXT_MASK 0x08000000 /**< receive frame offset extension bit \ 365 */ 366 #define D64_RC_ROEXT_SHIFT 27 367 368 /* flags for dma controller */ 369 #define DMA_CTRL_PEN (1 << 0) /**< partity enable */ 370 #define DMA_CTRL_ROC (1 << 1) /**< rx overflow continue */ 371 #define DMA_CTRL_RXMULTI \ 372 (1 << 2) /**< allow rx scatter to multiple descriptors */ 373 #define DMA_CTRL_UNFRAMED (1 << 3) /**< Unframed Rx/Tx data */ 374 #define DMA_CTRL_USB_BOUNDRY4KB_WAR (1 << 4) 375 #define DMA_CTRL_DMA_AVOIDANCE_WAR (1 << 5) /**< DMA avoidance WAR for 4331 */ 376 #define DMA_CTRL_RXSINGLE (1 << 6) /**< always single buffer */ 377 #define DMA_CTRL_SDIO_RXGLOM (1 << 7) /**< DMA Rx glome is enabled */ 378 #define DMA_CTRL_DESC_ONLY_FLAG \ 379 (1 << 8) /**< For DMA which posts only descriptors, \ 380 * no packets \ 381 */ 382 #define DMA_CTRL_DESC_CD_WAR \ 383 (1 << 9) /**< WAR for descriptor only DMA's CD not being \ 384 * updated correctly by HW in CT mode. \ 385 */ 386 #define DMA_CTRL_CS (1 << 10) /* channel switch enable */ 387 #define DMA_CTRL_ROEXT (1 << 11) /* receive frame offset extension support */ 388 #define DMA_CTRL_RX_ALIGN_8BYTE \ 389 (1 << 12) /* RXDMA address 8-byte aligned for 43684A0 */ 390 391 /* receive descriptor table pointer */ 392 #define D64_RP_LD_MASK 0x00001fff /**< last valid descriptor */ 393 394 /* receive channel status */ 395 #define D64_RS0_CD_MASK (di->d64_rs0_cd_mask) /**< current descriptor pointer \ 396 */ 397 #define D64_RS0_RS_MASK 0xf0000000 /**< receive state */ 398 #define D64_RS0_RS_SHIFT 28 399 #define D64_RS0_RS_DISABLED 0x00000000 /**< disabled */ 400 #define D64_RS0_RS_ACTIVE 0x10000000 /**< active */ 401 #define D64_RS0_RS_IDLE 0x20000000 /**< idle wait */ 402 #define D64_RS0_RS_STOPPED 0x30000000 /**< stopped */ 403 #define D64_RS0_RS_SUSP 0x40000000 /**< suspend pending */ 404 405 #define D64_RS1_AD_MASK (di->d64_rs1_ad_mask) /* active descriptor pointer */ 406 #define D64_RS1_RE_MASK 0xf0000000 /* receive errors */ 407 #define D64_RS1_RE_SHIFT 28 408 #define D64_RS1_RE_NOERR 0x00000000 /**< no error */ 409 #define D64_RS1_RE_DPO 0x10000000 /**< descriptor protocol error */ 410 #define D64_RS1_RE_DFU 0x20000000 /**< data fifo overflow */ 411 #define D64_RS1_RE_DTE 0x30000000 /**< data transfer error */ 412 #define D64_RS1_RE_DESRE 0x40000000 /**< descriptor read error */ 413 #define D64_RS1_RE_COREE 0x50000000 /**< core error */ 414 415 /* fifoaddr */ 416 #define D64_FA_OFF_MASK 0xffff /**< offset */ 417 #define D64_FA_SEL_MASK 0xf0000 /**< select */ 418 #define D64_FA_SEL_SHIFT 16 419 #define D64_FA_SEL_XDD 0x00000 /**< transmit dma data */ 420 #define D64_FA_SEL_XDP 0x10000 /**< transmit dma pointers */ 421 #define D64_FA_SEL_RDD 0x40000 /**< receive dma data */ 422 #define D64_FA_SEL_RDP 0x50000 /**< receive dma pointers */ 423 #define D64_FA_SEL_XFD 0x80000 /**< transmit fifo data */ 424 #define D64_FA_SEL_XFP 0x90000 /**< transmit fifo pointers */ 425 #define D64_FA_SEL_RFD 0xc0000 /**< receive fifo data */ 426 #define D64_FA_SEL_RFP 0xd0000 /**< receive fifo pointers */ 427 #define D64_FA_SEL_RSD 0xe0000 /**< receive frame status data */ 428 #define D64_FA_SEL_RSP 0xf0000 /**< receive frame status pointers */ 429 430 /* descriptor control flags 1 */ 431 #define D64_CTRL_COREFLAGS 0x0ff00000 /**< core specific flags */ 432 #define D64_CTRL1_COHERENT \ 433 ((uint32)1 << 17) /* cache coherent per transaction */ 434 #define D64_CTRL1_NOTPCIE ((uint32)1 << 18) /**< buirst size control */ 435 #define D64_CTRL1_EOT ((uint32)1 << 28) /**< end of descriptor table */ 436 #define D64_CTRL1_IOC ((uint32)1 << 29) /**< interrupt on completion */ 437 #define D64_CTRL1_EOF ((uint32)1 << 30) /**< end of frame */ 438 #define D64_CTRL1_SOF ((uint32)1 << 31) /**< start of frame */ 439 440 /* descriptor control flags 2 */ 441 #define D64_CTRL2_MAX_LEN \ 442 0x0000fff7 /* Max transfer length (buffer byte count) <= 65527 */ 443 #define D64_CTRL2_BC_MASK 0x0000ffff /**< mask for buffer byte count */ 444 #define D64_CTRL2_AE 0x00030000 /**< address extension bits */ 445 #define D64_CTRL2_AE_SHIFT 16 446 #define D64_CTRL2_PARITY 0x00040000 /* parity bit */ 447 448 /** control flags in the range [27:20] are core-specific and not defined here */ 449 #define D64_CTRL_CORE_MASK 0x0ff00000 450 451 #define D64_RX_FRM_STS_LEN 0x0000ffff /**< frame length mask */ 452 #define D64_RX_FRM_STS_OVFL 0x00800000 /**< RxOverFlow */ 453 #define D64_RX_FRM_STS_DSCRCNT \ 454 0x0f000000 /**< no. of descriptors used - 1, d11corerev >= 22 */ 455 #define D64_RX_FRM_STS_DSCRCNT_SHIFT \ 456 24 /* Shift for no .of dma descriptor field */ 457 #define D64_RX_FRM_STS_DATATYPE 0xf0000000 /**< core-dependent data type */ 458 459 #define BCM_D64_CTRL2_BOUND_DMA_LENGTH(len) \ 460 (((len) > D64_CTRL2_MAX_LEN) ? D64_CTRL2_MAX_LEN : (len)) 461 462 /** receive frame status */ 463 typedef volatile struct { 464 uint16 len; 465 uint16 flags; 466 } dma_rxh_t; 467 468 #endif /* _sbhnddma_h_ */ 469