Commit 1b5ff8d8 authored by Tony Lindgren's avatar Tony Lindgren

musb_hdrc: Search and replace dwMaxLength with max_len

Search and replace dwMaxLength with max_len
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent d35a42cb
...@@ -113,7 +113,7 @@ struct dma_controller; ...@@ -113,7 +113,7 @@ struct dma_controller;
struct dma_channel { struct dma_channel {
void *private_data; void *private_data;
// FIXME not void* private_data, but a dma_controller * // FIXME not void* private_data, but a dma_controller *
size_t dwMaxLength; size_t max_len;
size_t dwActualLength; size_t dwActualLength;
enum dma_channel_status bStatus; enum dma_channel_status bStatus;
u8 bDesiredMode; u8 bDesiredMode;
...@@ -129,7 +129,7 @@ struct dma_channel { ...@@ -129,7 +129,7 @@ struct dma_channel {
* @bMode: TRUE if mode 1; FALSE if mode 0 * @bMode: TRUE if mode 1; FALSE if mode 0
* @dma_addr: base address of data (in DMA space) * @dma_addr: base address of data (in DMA space)
* @length: the number of bytes to transfer; no larger than the channel's * @length: the number of bytes to transfer; no larger than the channel's
* reported dwMaxLength * reported max_len
* *
* Returns TRUE on success, else FALSE * Returns TRUE on success, else FALSE
*/ */
......
...@@ -304,7 +304,7 @@ static void txstate(struct musb *musb, struct musb_request *req) ...@@ -304,7 +304,7 @@ static void txstate(struct musb *musb, struct musb_request *req)
/* setup DMA, then program endpoint CSR */ /* setup DMA, then program endpoint CSR */
request_size = min(pRequest->length, request_size = min(pRequest->length,
musb_ep->dma->dwMaxLength); musb_ep->dma->max_len);
if (request_size <= musb_ep->wPacketSize) if (request_size <= musb_ep->wPacketSize)
musb_ep->dma->bDesiredMode = 0; musb_ep->dma->bDesiredMode = 0;
else else
...@@ -661,7 +661,7 @@ static void rxstate(struct musb *musb, struct musb_request *req) ...@@ -661,7 +661,7 @@ static void rxstate(struct musb *musb, struct musb_request *req)
int transfer_size = 0; int transfer_size = 0;
#ifdef USE_MODE1 #ifdef USE_MODE1
transfer_size = min(pRequest->length, transfer_size = min(pRequest->length,
channel->dwMaxLength); channel->max_len);
#else #else
transfer_size = len; transfer_size = len;
#endif #endif
......
...@@ -771,7 +771,7 @@ static void musb_ep_program(struct musb *musb, u8 epnum, ...@@ -771,7 +771,7 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
musb_writew(epio, MGC_O_HDRC_TXCSR, musb_writew(epio, MGC_O_HDRC_TXCSR,
wCsr | MGC_M_TXCSR_MODE); wCsr | MGC_M_TXCSR_MODE);
qh->segsize = min(dwLength, pDmaChannel->dwMaxLength); qh->segsize = min(dwLength, pDmaChannel->max_len);
if (qh->segsize <= wPacketSize) if (qh->segsize <= wPacketSize)
pDmaChannel->bDesiredMode = 0; pDmaChannel->bDesiredMode = 0;
......
...@@ -145,7 +145,7 @@ static struct dma_channel* dma_channel_allocate(struct dma_controller *c, ...@@ -145,7 +145,7 @@ static struct dma_channel* dma_channel_allocate(struct dma_controller *c,
pChannel = &(pImplChannel->Channel); pChannel = &(pImplChannel->Channel);
pChannel->private_data = pImplChannel; pChannel->private_data = pImplChannel;
pChannel->bStatus = MGC_DMA_STATUS_FREE; pChannel->bStatus = MGC_DMA_STATUS_FREE;
pChannel->dwMaxLength = 0x10000; pChannel->max_len = 0x10000;
/* Tx => mode 1; Rx => mode 0 */ /* Tx => mode 1; Rx => mode 0 */
pChannel->bDesiredMode = bTransmit; pChannel->bDesiredMode = bTransmit;
pChannel->dwActualLength = 0; pChannel->dwActualLength = 0;
......
...@@ -548,7 +548,7 @@ tusb_omap_dma_allocate(struct dma_controller *c, ...@@ -548,7 +548,7 @@ tusb_omap_dma_allocate(struct dma_controller *c,
chdat->completed_len = 0; chdat->completed_len = 0;
chdat->tusb_dma = tusb_dma; chdat->tusb_dma = tusb_dma;
channel->dwMaxLength = 0x7fffffff; channel->max_len = 0x7fffffff;
channel->bDesiredMode = 0; channel->bDesiredMode = 0;
channel->dwActualLength = 0; channel->dwActualLength = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment