struct dma_channel {
void *private_data;
// FIXME not void* private_data, but a dma_controller *
- size_t dwMaxLength;
+ size_t max_len;
size_t dwActualLength;
enum dma_channel_status bStatus;
u8 bDesiredMode;
* @bMode: TRUE if mode 1; FALSE if mode 0
* @dma_addr: base address of data (in DMA space)
* @length: the number of bytes to transfer; no larger than the channel's
- * reported dwMaxLength
+ * reported max_len
*
* Returns TRUE on success, else FALSE
*/
/* setup DMA, then program endpoint CSR */
request_size = min(pRequest->length,
- musb_ep->dma->dwMaxLength);
+ musb_ep->dma->max_len);
if (request_size <= musb_ep->wPacketSize)
musb_ep->dma->bDesiredMode = 0;
else
int transfer_size = 0;
#ifdef USE_MODE1
transfer_size = min(pRequest->length,
- channel->dwMaxLength);
+ channel->max_len);
#else
transfer_size = len;
#endif
musb_writew(epio, MGC_O_HDRC_TXCSR,
wCsr | MGC_M_TXCSR_MODE);
- qh->segsize = min(dwLength, pDmaChannel->dwMaxLength);
+ qh->segsize = min(dwLength, pDmaChannel->max_len);
if (qh->segsize <= wPacketSize)
pDmaChannel->bDesiredMode = 0;
pChannel = &(pImplChannel->Channel);
pChannel->private_data = pImplChannel;
pChannel->bStatus = MGC_DMA_STATUS_FREE;
- pChannel->dwMaxLength = 0x10000;
+ pChannel->max_len = 0x10000;
/* Tx => mode 1; Rx => mode 0 */
pChannel->bDesiredMode = bTransmit;
pChannel->dwActualLength = 0;
chdat->completed_len = 0;
chdat->tusb_dma = tusb_dma;
- channel->dwMaxLength = 0x7fffffff;
+ channel->max_len = 0x7fffffff;
channel->bDesiredMode = 0;
channel->dwActualLength = 0;