Commit d150f81a authored by Tony Lindgren's avatar Tony Lindgren

musb_hdrc: Search and replace bTransmit with transmit

Search and replace bTransmit with transmit
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 9576fe9e
...@@ -147,11 +147,11 @@ static int __init cppi_controller_start(struct dma_controller *c) ...@@ -147,11 +147,11 @@ static int __init cppi_controller_start(struct dma_controller *c)
/* do whatever is necessary to start controller */ /* do whatever is necessary to start controller */
for (i = 0; i < ARRAY_SIZE(pController->txCppi); i++) { for (i = 0; i < ARRAY_SIZE(pController->txCppi); i++) {
pController->txCppi[i].bTransmit = TRUE; pController->txCppi[i].transmit = TRUE;
pController->txCppi[i].chNo = i; pController->txCppi[i].chNo = i;
} }
for (i = 0; i < ARRAY_SIZE(pController->rxCppi); i++) { for (i = 0; i < ARRAY_SIZE(pController->rxCppi); i++) {
pController->rxCppi[i].bTransmit = FALSE; pController->rxCppi[i].transmit = FALSE;
pController->rxCppi[i].chNo = i; pController->rxCppi[i].chNo = i;
} }
...@@ -283,7 +283,7 @@ static inline void core_rxirq_enable(void __iomem *tibase, unsigned epnum) ...@@ -283,7 +283,7 @@ static inline void core_rxirq_enable(void __iomem *tibase, unsigned epnum)
static struct dma_channel * static struct dma_channel *
cppi_channel_allocate(struct dma_controller *c, cppi_channel_allocate(struct dma_controller *c,
struct musb_hw_ep *ep, struct musb_hw_ep *ep,
u8 bTransmit) u8 transmit)
{ {
struct cppi *pController; struct cppi *pController;
u8 chNum; u8 chNum;
...@@ -300,7 +300,7 @@ cppi_channel_allocate(struct dma_controller *c, ...@@ -300,7 +300,7 @@ cppi_channel_allocate(struct dma_controller *c,
/* return the corresponding CPPI Channel Handle, and /* return the corresponding CPPI Channel Handle, and
* probably disable the non-CPPI irq until we need it. * probably disable the non-CPPI irq until we need it.
*/ */
if (bTransmit) { if (transmit) {
if (local_end > ARRAY_SIZE(pController->txCppi)) { if (local_end > ARRAY_SIZE(pController->txCppi)) {
DBG(1, "no %cX DMA channel for ep%d\n", 'T', local_end); DBG(1, "no %cX DMA channel for ep%d\n", 'T', local_end);
return NULL; return NULL;
...@@ -320,11 +320,11 @@ cppi_channel_allocate(struct dma_controller *c, ...@@ -320,11 +320,11 @@ cppi_channel_allocate(struct dma_controller *c,
*/ */
if (otgCh->hw_ep) if (otgCh->hw_ep)
DBG(1, "re-allocating DMA%d %cX channel %p\n", DBG(1, "re-allocating DMA%d %cX channel %p\n",
chNum, bTransmit ? 'T' : 'R', otgCh); chNum, transmit ? 'T' : 'R', otgCh);
otgCh->hw_ep = ep; otgCh->hw_ep = ep;
otgCh->Channel.status = MGC_DMA_STATUS_FREE; otgCh->Channel.status = MGC_DMA_STATUS_FREE;
DBG(4, "Allocate CPPI%d %cX\n", chNum, bTransmit ? 'T' : 'R'); DBG(4, "Allocate CPPI%d %cX\n", chNum, transmit ? 'T' : 'R');
otgCh->Channel.private_data = otgCh; otgCh->Channel.private_data = otgCh;
return &otgCh->Channel; return &otgCh->Channel;
} }
...@@ -343,7 +343,7 @@ static void cppi_channel_release(struct dma_channel *channel) ...@@ -343,7 +343,7 @@ static void cppi_channel_release(struct dma_channel *channel)
tibase = c->pController->pCoreBase - DAVINCI_BASE_OFFSET; tibase = c->pController->pCoreBase - DAVINCI_BASE_OFFSET;
if (!c->hw_ep) if (!c->hw_ep)
DBG(1, "releasing idle DMA channel %p\n", c); DBG(1, "releasing idle DMA channel %p\n", c);
else if (!c->bTransmit) else if (!c->transmit)
core_rxirq_enable(tibase, epnum); core_rxirq_enable(tibase, epnum);
/* for now, leave its cppi IRQ enabled (we won't trigger it) */ /* for now, leave its cppi IRQ enabled (we won't trigger it) */
...@@ -962,19 +962,19 @@ static int cppi_channel_program(struct dma_channel *pChannel, ...@@ -962,19 +962,19 @@ static int cppi_channel_program(struct dma_channel *pChannel,
case MGC_DMA_STATUS_CORE_ABORT: case MGC_DMA_STATUS_CORE_ABORT:
/* fault irq handler should have handled cleanup */ /* fault irq handler should have handled cleanup */
WARN("%cX DMA%d not cleaned up after abort!\n", WARN("%cX DMA%d not cleaned up after abort!\n",
otgChannel->bTransmit ? 'T' : 'R', otgChannel->transmit ? 'T' : 'R',
otgChannel->chNo); otgChannel->chNo);
//WARN_ON(1); //WARN_ON(1);
break; break;
case MGC_DMA_STATUS_BUSY: case MGC_DMA_STATUS_BUSY:
WARN("program active channel? %cX DMA%d\n", WARN("program active channel? %cX DMA%d\n",
otgChannel->bTransmit ? 'T' : 'R', otgChannel->transmit ? 'T' : 'R',
otgChannel->chNo); otgChannel->chNo);
//WARN_ON(1); //WARN_ON(1);
break; break;
case MGC_DMA_STATUS_UNKNOWN: case MGC_DMA_STATUS_UNKNOWN:
DBG(1, "%cX DMA%d not allocated!\n", DBG(1, "%cX DMA%d not allocated!\n",
otgChannel->bTransmit ? 'T' : 'R', otgChannel->transmit ? 'T' : 'R',
otgChannel->chNo); otgChannel->chNo);
/* FALLTHROUGH */ /* FALLTHROUGH */
case MGC_DMA_STATUS_FREE: case MGC_DMA_STATUS_FREE:
...@@ -991,7 +991,7 @@ static int cppi_channel_program(struct dma_channel *pChannel, ...@@ -991,7 +991,7 @@ static int cppi_channel_program(struct dma_channel *pChannel,
otgChannel->transferSize = dwLength; otgChannel->transferSize = dwLength;
/* TX channel? or RX? */ /* TX channel? or RX? */
if (otgChannel->bTransmit) if (otgChannel->transmit)
cppi_next_tx_segment(musb, otgChannel); cppi_next_tx_segment(musb, otgChannel);
else else
cppi_next_rx_segment(musb, otgChannel, mode); cppi_next_rx_segment(musb, otgChannel, mode);
...@@ -1390,7 +1390,7 @@ static int cppi_channel_abort(struct dma_channel *channel) ...@@ -1390,7 +1390,7 @@ static int cppi_channel_abort(struct dma_channel *channel)
return -EINVAL; return -EINVAL;
} }
if (!otgCh->bTransmit && otgCh->activeQueueHead) if (!otgCh->transmit && otgCh->activeQueueHead)
cppi_dump_rxq(3, "/abort", otgCh); cppi_dump_rxq(3, "/abort", otgCh);
mbase = pController->pCoreBase; mbase = pController->pCoreBase;
...@@ -1406,7 +1406,7 @@ static int cppi_channel_abort(struct dma_channel *channel) ...@@ -1406,7 +1406,7 @@ static int cppi_channel_abort(struct dma_channel *channel)
*/ */
musb_ep_select(mbase, chNum + 1); musb_ep_select(mbase, chNum + 1);
if (otgCh->bTransmit) { if (otgCh->transmit) {
struct cppi_tx_stateram *__iomem txState; struct cppi_tx_stateram *__iomem txState;
int enabled; int enabled;
......
...@@ -66,7 +66,7 @@ struct cppi_channel { ...@@ -66,7 +66,7 @@ struct cppi_channel {
/* which direction of which endpoint? */ /* which direction of which endpoint? */
struct musb_hw_ep *hw_ep; struct musb_hw_ep *hw_ep;
u8 bTransmit; u8 transmit;
u8 chNo; u8 chNo;
/* DMA modes: RNDIS or "transparent" */ /* DMA modes: RNDIS or "transparent" */
......
...@@ -181,7 +181,7 @@ struct dma_controller { ...@@ -181,7 +181,7 @@ struct dma_controller {
}; };
/* called after channel_program(), may indicate a fault */ /* called after channel_program(), may indicate a fault */
extern void musb_dma_completion(struct musb *musb, u8 epnum, u8 bTransmit); extern void musb_dma_completion(struct musb *musb, u8 epnum, u8 transmit);
extern struct dma_controller *__init extern struct dma_controller *__init
......
...@@ -79,7 +79,7 @@ struct musb_dma_channel { ...@@ -79,7 +79,7 @@ struct musb_dma_channel {
u16 wMaxPacketSize; u16 wMaxPacketSize;
u8 bIndex; u8 bIndex;
u8 epnum; u8 epnum;
u8 bTransmit; u8 transmit;
}; };
struct musb_dma_controller { struct musb_dma_controller {
...@@ -126,7 +126,7 @@ static int dma_controller_stop(struct dma_controller *c) ...@@ -126,7 +126,7 @@ static int dma_controller_stop(struct dma_controller *c)
} }
static struct dma_channel* dma_channel_allocate(struct dma_controller *c, static struct dma_channel* dma_channel_allocate(struct dma_controller *c,
struct musb_hw_ep *hw_ep, u8 bTransmit) struct musb_hw_ep *hw_ep, u8 transmit)
{ {
u8 bBit; u8 bBit;
struct dma_channel *pChannel = NULL; struct dma_channel *pChannel = NULL;
...@@ -141,13 +141,13 @@ static struct dma_channel* dma_channel_allocate(struct dma_controller *c, ...@@ -141,13 +141,13 @@ static struct dma_channel* dma_channel_allocate(struct dma_controller *c,
pImplChannel->pController = pController; pImplChannel->pController = pController;
pImplChannel->bIndex = bBit; pImplChannel->bIndex = bBit;
pImplChannel->epnum = hw_ep->epnum; pImplChannel->epnum = hw_ep->epnum;
pImplChannel->bTransmit = bTransmit; pImplChannel->transmit = transmit;
pChannel = &(pImplChannel->Channel); pChannel = &(pImplChannel->Channel);
pChannel->private_data = pImplChannel; pChannel->private_data = pImplChannel;
pChannel->status = MGC_DMA_STATUS_FREE; pChannel->status = MGC_DMA_STATUS_FREE;
pChannel->max_len = 0x10000; pChannel->max_len = 0x10000;
/* Tx => mode 1; Rx => mode 0 */ /* Tx => mode 1; Rx => mode 0 */
pChannel->desired_mode = bTransmit; pChannel->desired_mode = transmit;
pChannel->actual_len = 0; pChannel->actual_len = 0;
break; break;
} }
...@@ -204,7 +204,7 @@ static void configure_channel(struct dma_channel *pChannel, ...@@ -204,7 +204,7 @@ static void configure_channel(struct dma_channel *pChannel,
csr |= (pImplChannel->epnum << MUSB_HSDMA_ENDPOINT_SHIFT) csr |= (pImplChannel->epnum << MUSB_HSDMA_ENDPOINT_SHIFT)
| (1 << MUSB_HSDMA_ENABLE_SHIFT) | (1 << MUSB_HSDMA_ENABLE_SHIFT)
| (1 << MUSB_HSDMA_IRQENABLE_SHIFT) | (1 << MUSB_HSDMA_IRQENABLE_SHIFT)
| (pImplChannel->bTransmit ? (1 << MUSB_HSDMA_TRANSMIT_SHIFT) : 0); | (pImplChannel->transmit ? (1 << MUSB_HSDMA_TRANSMIT_SHIFT) : 0);
/* address/count */ /* address/count */
musb_writel(mbase, musb_writel(mbase,
...@@ -229,7 +229,7 @@ static int dma_channel_program(struct dma_channel * pChannel, ...@@ -229,7 +229,7 @@ static int dma_channel_program(struct dma_channel * pChannel,
DBG(2, "ep%d-%s pkt_sz %d, dma_addr 0x%x length %d, mode %d\n", DBG(2, "ep%d-%s pkt_sz %d, dma_addr 0x%x length %d, mode %d\n",
pImplChannel->epnum, pImplChannel->epnum,
pImplChannel->bTransmit ? "Tx" : "Rx", pImplChannel->transmit ? "Tx" : "Rx",
packet_sz, dma_addr, dwLength, mode); packet_sz, dma_addr, dwLength, mode);
BUG_ON(pChannel->status == MGC_DMA_STATUS_UNKNOWN || BUG_ON(pChannel->status == MGC_DMA_STATUS_UNKNOWN ||
...@@ -260,7 +260,7 @@ static int dma_channel_abort(struct dma_channel *pChannel) ...@@ -260,7 +260,7 @@ static int dma_channel_abort(struct dma_channel *pChannel)
u16 csr; u16 csr;
if (pChannel->status == MGC_DMA_STATUS_BUSY) { if (pChannel->status == MGC_DMA_STATUS_BUSY) {
if (pImplChannel->bTransmit) { if (pImplChannel->transmit) {
csr = musb_readw(mbase, csr = musb_readw(mbase,
MGC_END_OFFSET(pImplChannel->epnum,MUSB_TXCSR)); MGC_END_OFFSET(pImplChannel->epnum,MUSB_TXCSR));
...@@ -347,7 +347,7 @@ static irqreturn_t dma_controller_irq(int irq, void *private_data) ...@@ -347,7 +347,7 @@ static irqreturn_t dma_controller_irq(int irq, void *private_data)
/* completed */ /* completed */
if ((devctl & MUSB_DEVCTL_HM) if ((devctl & MUSB_DEVCTL_HM)
&& (pImplChannel->bTransmit) && (pImplChannel->transmit)
&& ((pChannel->desired_mode == 0) && ((pChannel->desired_mode == 0)
|| (pChannel->actual_len & || (pChannel->actual_len &
(pImplChannel->wMaxPacketSize - 1))) (pImplChannel->wMaxPacketSize - 1)))
...@@ -362,7 +362,7 @@ static irqreturn_t dma_controller_irq(int irq, void *private_data) ...@@ -362,7 +362,7 @@ static irqreturn_t dma_controller_irq(int irq, void *private_data)
musb_dma_completion( musb_dma_completion(
pController->pDmaPrivate, pController->pDmaPrivate,
pImplChannel->epnum, pImplChannel->epnum,
pImplChannel->bTransmit); pImplChannel->transmit);
} }
} }
} }
......
...@@ -1539,7 +1539,7 @@ static int __initdata use_dma = 1; ...@@ -1539,7 +1539,7 @@ static int __initdata use_dma = 1;
module_param(use_dma, bool, 0); module_param(use_dma, bool, 0);
MODULE_PARM_DESC(use_dma, "enable/disable use of DMA"); MODULE_PARM_DESC(use_dma, "enable/disable use of DMA");
void musb_dma_completion(struct musb *musb, u8 epnum, u8 bTransmit) void musb_dma_completion(struct musb *musb, u8 epnum, u8 transmit)
{ {
u8 devctl = musb_readb(musb->mregs, MUSB_DEVCTL); u8 devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
...@@ -1557,7 +1557,7 @@ void musb_dma_completion(struct musb *musb, u8 epnum, u8 bTransmit) ...@@ -1557,7 +1557,7 @@ void musb_dma_completion(struct musb *musb, u8 epnum, u8 bTransmit)
#endif #endif
} else { } else {
/* endpoints 1..15 */ /* endpoints 1..15 */
if (bTransmit) { if (transmit) {
if (devctl & MUSB_DEVCTL_HM) { if (devctl & MUSB_DEVCTL_HM) {
if (is_host_capable()) if (is_host_capable())
musb_host_tx(musb, epnum); musb_host_tx(musb, epnum);
......
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