Commit 01f8addb authored by Tony Lindgren's avatar Tony Lindgren

musb_hdrc: Search and replace bMode with mode

Search and replace bMode with mode
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent c74a37e9
...@@ -126,7 +126,7 @@ struct dma_channel { ...@@ -126,7 +126,7 @@ struct dma_channel {
* *
* @channel: pointer to a channel obtained by channel_alloc * @channel: pointer to a channel obtained by channel_alloc
* @maxpacket: the maximum packet size * @maxpacket: the maximum packet size
* @bMode: TRUE if mode 1; FALSE if mode 0 * @mode: 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 max_len * reported max_len
...@@ -136,7 +136,7 @@ struct dma_channel { ...@@ -136,7 +136,7 @@ struct dma_channel {
typedef int (*MGC_pfDmaProgramChannel) ( typedef int (*MGC_pfDmaProgramChannel) (
struct dma_channel *channel, struct dma_channel *channel,
u16 maxpacket, u16 maxpacket,
u8 bMode, u8 mode,
dma_addr_t dma_addr, dma_addr_t dma_addr,
u32 length); u32 length);
......
...@@ -171,7 +171,7 @@ static void dma_channel_release(struct dma_channel *pChannel) ...@@ -171,7 +171,7 @@ static void dma_channel_release(struct dma_channel *pChannel)
} }
static void configure_channel(struct dma_channel *pChannel, static void configure_channel(struct dma_channel *pChannel,
u16 wPacketSize, u8 bMode, u16 wPacketSize, u8 mode,
dma_addr_t dma_addr, u32 dwLength) dma_addr_t dma_addr, u32 dwLength)
{ {
struct musb_dma_channel *pImplChannel = struct musb_dma_channel *pImplChannel =
...@@ -182,9 +182,9 @@ static void configure_channel(struct dma_channel *pChannel, ...@@ -182,9 +182,9 @@ static void configure_channel(struct dma_channel *pChannel,
u16 wCsr = 0; u16 wCsr = 0;
DBG(4, "%p, pkt_sz %d, addr 0x%x, len %d, mode %d\n", DBG(4, "%p, pkt_sz %d, addr 0x%x, len %d, mode %d\n",
pChannel, wPacketSize, dma_addr, dwLength, bMode); pChannel, wPacketSize, dma_addr, dwLength, mode);
if (bMode) { if (mode) {
wCsr |= 1 << MGC_S_HSDMA_MODE1; wCsr |= 1 << MGC_S_HSDMA_MODE1;
if (dwLength < wPacketSize) { if (dwLength < wPacketSize) {
return FALSE; return FALSE;
...@@ -221,7 +221,7 @@ static void configure_channel(struct dma_channel *pChannel, ...@@ -221,7 +221,7 @@ static void configure_channel(struct dma_channel *pChannel,
} }
static int dma_channel_program(struct dma_channel * pChannel, static int dma_channel_program(struct dma_channel * pChannel,
u16 wPacketSize, u8 bMode, u16 wPacketSize, u8 mode,
dma_addr_t dma_addr, u32 dwLength) dma_addr_t dma_addr, u32 dwLength)
{ {
struct musb_dma_channel *pImplChannel = struct musb_dma_channel *pImplChannel =
...@@ -230,7 +230,7 @@ static int dma_channel_program(struct dma_channel * pChannel, ...@@ -230,7 +230,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->bTransmit ? "Tx" : "Rx",
wPacketSize, dma_addr, dwLength, bMode); wPacketSize, dma_addr, dwLength, mode);
BUG_ON(pChannel->status == MGC_DMA_STATUS_UNKNOWN || BUG_ON(pChannel->status == MGC_DMA_STATUS_UNKNOWN ||
pChannel->status == MGC_DMA_STATUS_BUSY); pChannel->status == MGC_DMA_STATUS_BUSY);
...@@ -241,7 +241,7 @@ static int dma_channel_program(struct dma_channel * pChannel, ...@@ -241,7 +241,7 @@ static int dma_channel_program(struct dma_channel * pChannel,
pImplChannel->wMaxPacketSize = wPacketSize; pImplChannel->wMaxPacketSize = wPacketSize;
pChannel->status = MGC_DMA_STATUS_BUSY; pChannel->status = MGC_DMA_STATUS_BUSY;
if ((bMode == 1) && (dwLength >= wPacketSize)) { if ((mode == 1) && (dwLength >= wPacketSize)) {
configure_channel(pChannel, wPacketSize, 1, dma_addr, configure_channel(pChannel, wPacketSize, 1, dma_addr,
dwLength); dwLength);
} else } else
......
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