1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Generic Broadcom Home Networking Division (HND) DMA engine HW interface 4 * This supports the following chips: BCM42xx, 44xx, 47xx . 5 * 6 * Copyright (C) 1999-2019, Broadcom. 7 * 8 * Unless you and Broadcom execute a separate written software license 9 * agreement governing use of this software, this software is licensed to you 10 * under the terms of the GNU General Public License version 2 (the "GPL"), 11 * available at http://www.broadcom.com/licenses/GPLv2.php, with the 12 * following added to such license: 13 * 14 * As a special exception, the copyright holders of this software give you 15 * permission to link this software with independent modules, and to copy and 16 * distribute the resulting executable under terms of your choice, provided that 17 * you also meet, for each linked independent module, the terms and conditions of 18 * the license of that module. An independent module is a module which is not 19 * derived from this software. The special exception does not apply to any 20 * modifications of the software. 21 * 22 * Notwithstanding the above, under no circumstances may you combine this 23 * software in any way with any other Broadcom software provided under a license 24 * other than the GPL, without Broadcom's express prior written consent. 25 * 26 * 27 * <<Broadcom-WL-IPTag/Open:>> 28 * 29 * $Id: sbhnddma.h 694506 2017-04-13 05:10:05Z $ 30 */ 31 32 #ifndef _sbhnddma_h_ 33 #define _sbhnddma_h_ 34 35 /* DMA structure: 36 * support two DMA engines: 32 bits address or 64 bit addressing 37 * basic DMA register set is per channel(transmit or receive) 38 * a pair of channels is defined for convenience 39 */ 40 41 /* 32 bits addressing */ 42 43 /** dma registers per channel(xmt or rcv) */ 44 typedef volatile struct { 45 uint32 control; /**< enable, et al */ 46 uint32 addr; /**< descriptor ring base address (4K aligned) */ 47 uint32 ptr; /**< last descriptor posted to chip */ 48 uint32 status; /**< current active descriptor, et al */ 49 } dma32regs_t; 50 51 typedef volatile struct { 52 dma32regs_t xmt; /**< dma tx channel */ 53 dma32regs_t rcv; /**< dma rx channel */ 54 } dma32regp_t; 55 56 typedef volatile struct { /* diag access */ 57 uint32 fifoaddr; /**< diag address */ 58 uint32 fifodatalow; /**< low 32bits of data */ 59 uint32 fifodatahigh; /**< high 32bits of data */ 60 uint32 pad; /**< reserved */ 61 } dma32diag_t; 62 63 /** 64 * DMA Descriptor 65 * Descriptors are only read by the hardware, never written back. 66 */ 67 typedef volatile struct { 68 uint32 ctrl; /**< misc control bits & bufcount */ 69 uint32 addr; /**< data buffer address */ 70 } dma32dd_t; 71 72 /** Each descriptor ring must be 4096byte aligned, and fit within a single 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 0x00001fff /**< buffer byte count, real data len must <= 4KB */ 211 #define CTRL_AE ((uint32)3 << 16) /**< address extension bits */ 212 #define CTRL_AE_SHIFT 16 213 #define CTRL_PARITY ((uint32)3 << 18) /**< parity bit */ 214 #define CTRL_EOT ((uint32)1 << 28) /**< end of descriptor table */ 215 #define CTRL_IOC ((uint32)1 << 29) /**< interrupt on completion */ 216 #define CTRL_EOF ((uint32)1 << 30) /**< end of frame */ 217 #define CTRL_SOF ((uint32)1 << 31) /**< start of frame */ 218 219 /** control flags in the range [27:20] are core-specific and not defined here */ 220 #define CTRL_CORE_MASK 0x0ff00000 221 222 /* 64 bits addressing */ 223 224 /** dma registers per channel(xmt or rcv) */ 225 typedef volatile struct { 226 uint32 control; /**< enable, et al */ 227 uint32 ptr; /**< last descriptor posted to chip */ 228 uint32 addrlow; /**< descriptor ring base address low 32-bits (8K aligned) */ 229 uint32 addrhigh; /**< descriptor ring base address bits 63:32 (8K aligned) */ 230 uint32 status0; /**< current descriptor, xmt state */ 231 uint32 status1; /**< active descriptor, xmt error */ 232 } dma64regs_t; 233 234 typedef volatile struct { 235 dma64regs_t tx; /**< dma64 tx channel */ 236 dma64regs_t rx; /**< dma64 rx channel */ 237 } dma64regp_t; 238 239 typedef volatile struct { /**< diag access */ 240 uint32 fifoaddr; /**< diag address */ 241 uint32 fifodatalow; /**< low 32bits of data */ 242 uint32 fifodatahigh; /**< high 32bits of data */ 243 uint32 pad; /**< reserved */ 244 } dma64diag_t; 245 246 /** 247 * DMA Descriptor 248 * Descriptors are only read by the hardware, never written back. 249 */ 250 typedef volatile struct { 251 uint32 ctrl1; /**< misc control bits */ 252 uint32 ctrl2; /**< buffer count and address extension */ 253 uint32 addrlow; /**< memory address of the date buffer, bits 31:0 */ 254 uint32 addrhigh; /**< memory address of the date buffer, bits 63:32 */ 255 } dma64dd_t; 256 257 /** 258 * Each descriptor ring must be 8kB aligned, and fit within a contiguous 8kB physical addresss. 259 */ 260 #define D64RINGALIGN_BITS 13 261 #define D64MAXRINGSZ (1 << D64RINGALIGN_BITS) 262 #define D64RINGBOUNDARY (1 << D64RINGALIGN_BITS) 263 264 #define D64MAXDD (D64MAXRINGSZ / sizeof (dma64dd_t)) 265 266 /** for cores with large descriptor ring support, descriptor ring size can be up to 4096 */ 267 #define D64MAXDD_LARGE ((1 << 16) / sizeof (dma64dd_t)) 268 269 /** 270 * for cores with large descriptor ring support (4k descriptors), descriptor ring cannot cross 271 * 64K boundary 272 */ 273 #define D64RINGBOUNDARY_LARGE (1 << 16) 274 275 /* 276 * Default DMA Burstlen values for USBRev >= 12 and SDIORev >= 11. 277 * When this field contains the value N, the burst length is 2**(N + 4) bytes. 278 */ 279 #define D64_DEF_USBBURSTLEN 2 280 #define D64_DEF_SDIOBURSTLEN 1 281 282 #ifndef D64_USBBURSTLEN 283 #define D64_USBBURSTLEN DMA_BL_64 284 #endif // endif 285 #ifndef D64_SDIOBURSTLEN 286 #define D64_SDIOBURSTLEN DMA_BL_32 287 #endif // endif 288 289 /* transmit channel control */ 290 #define D64_XC_XE 0x00000001 /**< transmit enable */ 291 #define D64_XC_SE 0x00000002 /**< transmit suspend request */ 292 #define D64_XC_LE 0x00000004 /**< loopback enable */ 293 #define D64_XC_FL 0x00000010 /**< flush request */ 294 #define D64_XC_MR_MASK 0x000001C0 /**< Multiple outstanding reads */ 295 #define D64_XC_MR_SHIFT 6 296 #define D64_XC_CS_SHIFT 9 /**< channel switch enable */ 297 #define D64_XC_CS_MASK 0x00000200 /**< channel switch enable */ 298 #define D64_XC_PD 0x00000800 /**< parity check disable */ 299 #define D64_XC_AE 0x00030000 /**< address extension bits */ 300 #define D64_XC_AE_SHIFT 16 301 #define D64_XC_BL_MASK 0x001C0000 /**< BurstLen bits */ 302 #define D64_XC_BL_SHIFT 18 303 #define D64_XC_PC_MASK 0x00E00000 /**< Prefetch control */ 304 #define D64_XC_PC_SHIFT 21 305 #define D64_XC_PT_MASK 0x03000000 /**< Prefetch threshold */ 306 #define D64_XC_PT_SHIFT 24 307 #define D64_XC_CO_MASK 0x04000000 /**< coherent transactions for descriptors */ 308 #define D64_XC_CO_SHIFT 26 309 310 /* transmit descriptor table pointer */ 311 #define D64_XP_LD_MASK 0x00001fff /**< last valid descriptor */ 312 313 /* transmit channel status */ 314 #define D64_XS0_CD_MASK (di->d64_xs0_cd_mask) /**< current descriptor pointer */ 315 #define D64_XS0_XS_MASK 0xf0000000 /**< transmit state */ 316 #define D64_XS0_XS_SHIFT 28 317 #define D64_XS0_XS_DISABLED 0x00000000 /**< disabled */ 318 #define D64_XS0_XS_ACTIVE 0x10000000 /**< active */ 319 #define D64_XS0_XS_IDLE 0x20000000 /**< idle wait */ 320 #define D64_XS0_XS_STOPPED 0x30000000 /**< stopped */ 321 #define D64_XS0_XS_SUSP 0x40000000 /**< suspend pending */ 322 323 #define D64_XS1_AD_MASK (di->d64_xs1_ad_mask) /**< active descriptor */ 324 #define D64_XS1_XE_MASK 0xf0000000 /**< transmit errors */ 325 #define D64_XS1_XE_SHIFT 28 326 #define D64_XS1_XE_NOERR 0x00000000 /**< no error */ 327 #define D64_XS1_XE_DPE 0x10000000 /**< descriptor protocol error */ 328 #define D64_XS1_XE_DFU 0x20000000 /**< data fifo underrun */ 329 #define D64_XS1_XE_DTE 0x30000000 /**< data transfer error */ 330 #define D64_XS1_XE_DESRE 0x40000000 /**< descriptor read error */ 331 #define D64_XS1_XE_COREE 0x50000000 /**< core error */ 332 333 /* receive channel control */ 334 #define D64_RC_RE 0x00000001 /**< receive enable */ 335 #define D64_RC_RO_MASK 0x000000fe /**< receive frame offset */ 336 #define D64_RC_RO_SHIFT 1 337 #define D64_RC_FM 0x00000100 /**< direct fifo receive (pio) mode */ 338 #define D64_RC_SH 0x00000200 /**< separate rx header descriptor enable */ 339 #define D64_RC_SHIFT 9 /**< separate rx header descriptor enable */ 340 #define D64_RC_OC 0x00000400 /**< overflow continue */ 341 #define D64_RC_PD 0x00000800 /**< parity check disable */ 342 #define D64_RC_WAITCMP_MASK 0x00001000 343 #define D64_RC_WAITCMP_SHIFT 12 344 #define D64_RC_SA 0x00002000 /**< select active */ 345 #define D64_RC_GE 0x00004000 /**< Glom enable */ 346 #define D64_RC_AE 0x00030000 /**< address extension bits */ 347 #define D64_RC_AE_SHIFT 16 348 #define D64_RC_BL_MASK 0x001C0000 /**< BurstLen bits */ 349 #define D64_RC_BL_SHIFT 18 350 #define D64_RC_PC_MASK 0x00E00000 /**< Prefetch control */ 351 #define D64_RC_PC_SHIFT 21 352 #define D64_RC_PT_MASK 0x03000000 /**< Prefetch threshold */ 353 #define D64_RC_PT_SHIFT 24 354 #define D64_RC_CO_MASK 0x04000000 /**< coherent transactions for descriptors */ 355 #define D64_RC_CO_SHIFT 26 356 #define D64_RC_ROEXT_MASK 0x08000000 /**< receive frame offset extension bit */ 357 #define D64_RC_ROEXT_SHIFT 27 358 359 /* flags for dma controller */ 360 #define DMA_CTRL_PEN (1 << 0) /**< partity enable */ 361 #define DMA_CTRL_ROC (1 << 1) /**< rx overflow continue */ 362 #define DMA_CTRL_RXMULTI (1 << 2) /**< allow rx scatter to multiple descriptors */ 363 #define DMA_CTRL_UNFRAMED (1 << 3) /**< Unframed Rx/Tx data */ 364 #define DMA_CTRL_USB_BOUNDRY4KB_WAR (1 << 4) 365 #define DMA_CTRL_DMA_AVOIDANCE_WAR (1 << 5) /**< DMA avoidance WAR for 4331 */ 366 #define DMA_CTRL_RXSINGLE (1 << 6) /**< always single buffer */ 367 #define DMA_CTRL_SDIO_RXGLOM (1 << 7) /**< DMA Rx glome is enabled */ 368 #define DMA_CTRL_DESC_ONLY_FLAG (1 << 8) /**< For DMA which posts only descriptors, 369 * no packets 370 */ 371 #define DMA_CTRL_DESC_CD_WAR (1 << 9) /**< WAR for descriptor only DMA's CD not being 372 * updated correctly by HW in CT mode. 373 */ 374 #define DMA_CTRL_CS (1 << 10) /* channel switch enable */ 375 #define DMA_CTRL_ROEXT (1 << 11) /* receive frame offset extension support */ 376 #define DMA_CTRL_RX_ALIGN_8BYTE (1 << 12) /* RXDMA address 8-byte aligned for 43684A0 */ 377 378 /* receive descriptor table pointer */ 379 #define D64_RP_LD_MASK 0x00001fff /**< last valid descriptor */ 380 381 /* receive channel status */ 382 #define D64_RS0_CD_MASK (di->d64_rs0_cd_mask) /**< current descriptor pointer */ 383 #define D64_RS0_RS_MASK 0xf0000000 /**< receive state */ 384 #define D64_RS0_RS_SHIFT 28 385 #define D64_RS0_RS_DISABLED 0x00000000 /**< disabled */ 386 #define D64_RS0_RS_ACTIVE 0x10000000 /**< active */ 387 #define D64_RS0_RS_IDLE 0x20000000 /**< idle wait */ 388 #define D64_RS0_RS_STOPPED 0x30000000 /**< stopped */ 389 #define D64_RS0_RS_SUSP 0x40000000 /**< suspend pending */ 390 391 #define D64_RS1_AD_MASK (di->d64_rs1_ad_mask) /* active descriptor pointer */ 392 #define D64_RS1_RE_MASK 0xf0000000 /* receive errors */ 393 #define D64_RS1_RE_SHIFT 28 394 #define D64_RS1_RE_NOERR 0x00000000 /**< no error */ 395 #define D64_RS1_RE_DPO 0x10000000 /**< descriptor protocol error */ 396 #define D64_RS1_RE_DFU 0x20000000 /**< data fifo overflow */ 397 #define D64_RS1_RE_DTE 0x30000000 /**< data transfer error */ 398 #define D64_RS1_RE_DESRE 0x40000000 /**< descriptor read error */ 399 #define D64_RS1_RE_COREE 0x50000000 /**< core error */ 400 401 /* fifoaddr */ 402 #define D64_FA_OFF_MASK 0xffff /**< offset */ 403 #define D64_FA_SEL_MASK 0xf0000 /**< select */ 404 #define D64_FA_SEL_SHIFT 16 405 #define D64_FA_SEL_XDD 0x00000 /**< transmit dma data */ 406 #define D64_FA_SEL_XDP 0x10000 /**< transmit dma pointers */ 407 #define D64_FA_SEL_RDD 0x40000 /**< receive dma data */ 408 #define D64_FA_SEL_RDP 0x50000 /**< receive dma pointers */ 409 #define D64_FA_SEL_XFD 0x80000 /**< transmit fifo data */ 410 #define D64_FA_SEL_XFP 0x90000 /**< transmit fifo pointers */ 411 #define D64_FA_SEL_RFD 0xc0000 /**< receive fifo data */ 412 #define D64_FA_SEL_RFP 0xd0000 /**< receive fifo pointers */ 413 #define D64_FA_SEL_RSD 0xe0000 /**< receive frame status data */ 414 #define D64_FA_SEL_RSP 0xf0000 /**< receive frame status pointers */ 415 416 /* descriptor control flags 1 */ 417 #define D64_CTRL_COREFLAGS 0x0ff00000 /**< core specific flags */ 418 #define D64_CTRL1_COHERENT ((uint32)1 << 17) /* cache coherent per transaction */ 419 #define D64_CTRL1_NOTPCIE ((uint32)1 << 18) /**< buirst size control */ 420 #define D64_CTRL1_EOT ((uint32)1 << 28) /**< end of descriptor table */ 421 #define D64_CTRL1_IOC ((uint32)1 << 29) /**< interrupt on completion */ 422 #define D64_CTRL1_EOF ((uint32)1 << 30) /**< end of frame */ 423 #define D64_CTRL1_SOF ((uint32)1 << 31) /**< start of frame */ 424 425 /* descriptor control flags 2 */ 426 #define D64_CTRL2_MAX_LEN 0x0000fff7 /* Max transfer length (buffer byte count) <= 65527 */ 427 #define D64_CTRL2_BC_MASK 0x0000ffff /**< mask for buffer byte count */ 428 #define D64_CTRL2_AE 0x00030000 /**< address extension bits */ 429 #define D64_CTRL2_AE_SHIFT 16 430 #define D64_CTRL2_PARITY 0x00040000 /* parity bit */ 431 432 /** control flags in the range [27:20] are core-specific and not defined here */ 433 #define D64_CTRL_CORE_MASK 0x0ff00000 434 435 #define D64_RX_FRM_STS_LEN 0x0000ffff /**< frame length mask */ 436 #define D64_RX_FRM_STS_OVFL 0x00800000 /**< RxOverFlow */ 437 #define D64_RX_FRM_STS_DSCRCNT 0x0f000000 /**< no. of descriptors used - 1, d11corerev >= 22 */ 438 #define D64_RX_FRM_STS_DSCRCNT_SHIFT 24 /* Shift for no .of dma descriptor field */ 439 #define D64_RX_FRM_STS_DATATYPE 0xf0000000 /**< core-dependent data type */ 440 441 #define BCM_D64_CTRL2_BOUND_DMA_LENGTH(len) \ 442 (((len) > D64_CTRL2_MAX_LEN) ? D64_CTRL2_MAX_LEN : (len)) 443 444 /** receive frame status */ 445 typedef volatile struct { 446 uint16 len; 447 uint16 flags; 448 } dma_rxh_t; 449 450 #endif /* _sbhnddma_h_ */ 451