From: Tony Lindgren <tony@atomide.com>
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH 10/52] musb_hdrc: Search and replace wFifoCount with fifo_count
Date: Mon, 13 Aug 2007 06:48:45 -0700 [thread overview]
Message-ID: <11870129934099-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <11870129901657-git-send-email-tony@atomide.com>
Search and replace wFifoCount with fifo_count
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
drivers/usb/musb/g_ep0.c | 10 +++++-----
drivers/usb/musb/musb_gadget.c | 26 +++++++++++++-------------
drivers/usb/musb/musb_host.c | 20 ++++++++++----------
3 files changed, 28 insertions(+), 28 deletions(-)
--- a/drivers/usb/musb/g_ep0.c
+++ b/drivers/usb/musb/g_ep0.c
@@ -487,7 +487,7 @@ static void ep0_txstate(struct musb *musb)
struct usb_request *pRequest = next_ep0_request(musb);
u16 wCsrVal = MGC_M_CSR0_TXPKTRDY;
u8 *pFifoSource;
- u8 wFifoCount;
+ u8 fifo_count;
if (!pRequest) {
// WARN_ON(1);
@@ -497,13 +497,13 @@ static void ep0_txstate(struct musb *musb)
/* load the data */
pFifoSource = (u8 *) pRequest->buf + pRequest->actual;
- wFifoCount = min((unsigned) MGC_END0_FIFOSIZE,
+ fifo_count = min((unsigned) MGC_END0_FIFOSIZE,
pRequest->length - pRequest->actual);
- musb_write_fifo(&musb->aLocalEnd[0], wFifoCount, pFifoSource);
- pRequest->actual += wFifoCount;
+ musb_write_fifo(&musb->aLocalEnd[0], fifo_count, pFifoSource);
+ pRequest->actual += fifo_count;
/* update the flags */
- if (wFifoCount < MUSB_MAX_END0_PACKET
+ if (fifo_count < MUSB_MAX_END0_PACKET
|| pRequest->actual == pRequest->length) {
musb->ep0_state = MGC_END0_STAGE_STATUSOUT;
wCsrVal |= MGC_M_CSR0_P_DATAEND;
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -256,7 +256,7 @@ static void txstate(struct musb *musb, struct musb_request *req)
struct musb_ep *musb_ep;
void __iomem *epio = musb->aLocalEnd[bEnd].regs;
struct usb_request *pRequest;
- u16 wFifoCount = 0, wCsrVal;
+ u16 fifo_count = 0, wCsrVal;
int use_dma = 0;
musb_ep = req->ep;
@@ -271,7 +271,7 @@ static void txstate(struct musb *musb, struct musb_request *req)
wCsrVal = musb_readw(epio, MGC_O_HDRC_TXCSR);
pRequest = &req->request;
- wFifoCount = min(max_ep_writesize(musb, musb_ep),
+ fifo_count = min(max_ep_writesize(musb, musb_ep),
(int)(pRequest->length - pRequest->actual));
if (wCsrVal & MGC_M_TXCSR_TXPKTRDY) {
@@ -287,7 +287,7 @@ static void txstate(struct musb *musb, struct musb_request *req)
}
DBG(4, "hw_ep%d, maxpacket %d, fifo count %d, txcsr %03x\n",
- bEnd, musb_ep->wPacketSize, wFifoCount,
+ bEnd, musb_ep->wPacketSize, fifo_count,
wCsrVal);
#ifndef CONFIG_USB_INVENTRA_FIFO
@@ -381,9 +381,9 @@ static void txstate(struct musb *musb, struct musb_request *req)
#endif
if (!use_dma) {
- musb_write_fifo(musb_ep->hw_ep, wFifoCount,
+ musb_write_fifo(musb_ep->hw_ep, fifo_count,
(u8 *) (pRequest->buf + pRequest->actual));
- pRequest->actual += wFifoCount;
+ pRequest->actual += fifo_count;
wCsrVal |= MGC_M_TXCSR_TXPKTRDY;
wCsrVal &= ~MGC_M_TXCSR_P_UNDERRUN;
musb_writew(epio, MGC_O_HDRC_TXCSR, wCsrVal);
@@ -394,7 +394,7 @@ static void txstate(struct musb *musb, struct musb_request *req)
musb_ep->end_point.name, use_dma ? "dma" : "pio",
pRequest->actual, pRequest->length,
musb_readw(epio, MGC_O_HDRC_TXCSR),
- wFifoCount,
+ fifo_count,
musb_readw(epio, MGC_O_HDRC_TXMAXP));
}
@@ -577,7 +577,7 @@ static void rxstate(struct musb *musb, struct musb_request *req)
struct usb_request *pRequest = &req->request;
struct musb_ep *musb_ep = &musb->aLocalEnd[bEnd].ep_out;
void __iomem *epio = musb->aLocalEnd[bEnd].regs;
- u16 wFifoCount = 0;
+ u16 fifo_count = 0;
u16 wCount = musb_ep->wPacketSize;
wCsrVal = musb_readw(epio, MGC_O_HDRC_RXCSR);
@@ -684,13 +684,13 @@ static void rxstate(struct musb *musb, struct musb_request *req)
}
#endif /* Mentor's USB */
- wFifoCount = pRequest->length - pRequest->actual;
+ fifo_count = pRequest->length - pRequest->actual;
DBG(3, "%s OUT/RX pio fifo %d/%d, maxpacket %d\n",
musb_ep->end_point.name,
- wCount, wFifoCount,
+ wCount, fifo_count,
musb_ep->wPacketSize);
- wFifoCount = min(wCount, wFifoCount);
+ fifo_count = min(wCount, fifo_count);
#ifdef CONFIG_USB_TUSB_OMAP_DMA
if (tusb_dma_omap() && musb_ep->dma) {
@@ -703,15 +703,15 @@ static void rxstate(struct musb *musb, struct musb_request *req)
musb_ep->wPacketSize,
channel->bDesiredMode,
dma_addr,
- wFifoCount);
+ fifo_count);
if (ret == TRUE)
return;
}
#endif
- musb_read_fifo(musb_ep->hw_ep, wFifoCount, (u8 *)
+ musb_read_fifo(musb_ep->hw_ep, fifo_count, (u8 *)
(pRequest->buf + pRequest->actual));
- pRequest->actual += wFifoCount;
+ pRequest->actual += fifo_count;
/* REVISIT if we left anything in the fifo, flush
* it and report -EOVERFLOW
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -947,7 +947,7 @@ static int musb_h_ep0_continue(struct musb *musb,
{
int bMore = FALSE;
u8 *pFifoDest = NULL;
- u16 wFifoCount = 0;
+ u16 fifo_count = 0;
struct musb_hw_ep *hw_ep = musb->control_ep;
struct musb_qh *qh = hw_ep->in_qh;
struct usb_ctrlrequest *pRequest;
@@ -955,14 +955,14 @@ static int musb_h_ep0_continue(struct musb *musb,
switch (musb->bEnd0Stage) {
case MGC_END0_IN:
pFifoDest = pUrb->transfer_buffer + pUrb->actual_length;
- wFifoCount = min(wCount, ((u16) (pUrb->transfer_buffer_length
+ fifo_count = min(wCount, ((u16) (pUrb->transfer_buffer_length
- pUrb->actual_length)));
- if (wFifoCount < wCount)
+ if (fifo_count < wCount)
pUrb->status = -EOVERFLOW;
- musb_read_fifo(hw_ep, wFifoCount, pFifoDest);
+ musb_read_fifo(hw_ep, fifo_count, pFifoDest);
- pUrb->actual_length += wFifoCount;
+ pUrb->actual_length += fifo_count;
if (wCount < qh->maxpacket) {
/* always terminate on short read; it's
* rarely reported as an error.
@@ -989,18 +989,18 @@ static int musb_h_ep0_continue(struct musb *musb,
}
/* FALLTHROUGH */
case MGC_END0_OUT:
- wFifoCount = min(qh->maxpacket, ((u16)
+ fifo_count = min(qh->maxpacket, ((u16)
(pUrb->transfer_buffer_length
- pUrb->actual_length)));
- if (wFifoCount) {
+ if (fifo_count) {
pFifoDest = (u8 *) (pUrb->transfer_buffer
+ pUrb->actual_length);
DBG(3, "Sending %d bytes to %p\n",
- wFifoCount, pFifoDest);
- musb_write_fifo(hw_ep, wFifoCount, pFifoDest);
+ fifo_count, pFifoDest);
+ musb_write_fifo(hw_ep, fifo_count, pFifoDest);
- pUrb->actual_length += wFifoCount;
+ pUrb->actual_length += fifo_count;
bMore = TRUE;
}
break;
--
1.5.2.3
next prev parent reply other threads:[~2007-08-13 13:48 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-13 13:48 (no subject) Tony Lindgren
2007-08-13 13:48 ` [PATCH 1/52] musb_hdrc: Search and replace pThis with musb Tony Lindgren
2007-08-13 13:48 ` [PATCH 2/52] musb_hdrc: Search and replace pEndPt with hw_ep Tony Lindgren
2007-08-13 13:48 ` [PATCH 3/52] musb_hdrc: Search and replace pEnd with musb_ep when struct musb_ep Tony Lindgren
2007-08-13 13:48 ` [PATCH 4/52] musb_hdrc: Search and replace pEnd with musb_ep when struct musb_hw_ep Tony Lindgren
2007-08-13 13:48 ` [PATCH 5/52] musb_hdrc: Search and replace pRegs with mregs Tony Lindgren
2007-08-13 13:48 ` [PATCH 6/52] musb_hdrc: Search and replace pBase with mbase Tony Lindgren
2007-08-13 13:48 ` [PATCH 7/52] musb_hdrc: Search and replace pSource with src Tony Lindgren
2007-08-13 13:48 ` [PATCH 8/52] musb_hdrc: Search and replace pDest with dst Tony Lindgren
2007-08-13 13:48 ` [PATCH 9/52] musb_hdrc: Search and replace dwCount with len Tony Lindgren
2007-08-13 13:48 ` Tony Lindgren [this message]
2007-08-13 13:48 ` [PATCH 11/52] musb_hdrc: Search and replace wCount " Tony Lindgren
2007-08-13 13:48 ` [PATCH 12/52] musb_hdrc: Search and replace bLocalEnd with epnum Tony Lindgren
2007-08-13 13:48 ` [PATCH 13/52] musb_hdrc: Search and replace aLocalEnd with endpoints Tony Lindgren
2007-08-13 13:48 ` [PATCH 14/52] musb_hdrc: Search and replace bEndCount with nr_endpoints Tony Lindgren
2007-08-13 13:48 ` [PATCH 15/52] musb_hdrc: Search and replace bEndNumber with current_epnum Tony Lindgren
2007-08-13 13:48 ` [PATCH 16/52] musb_hdrc: Search and replace bEnd0Stage with ep0_stage Tony Lindgren
2007-08-13 13:48 ` [PATCH 17/52] musb_hdrc: Search and replace bEnd with epnum Tony Lindgren
2007-08-13 13:48 ` [PATCH 18/52] musb_hdrc: Search and replace Lock with lock Tony Lindgren
2007-08-13 13:48 ` [PATCH 19/52] musb_hdrc: Search and replace MGC_SelectEnd with musb_ep_select Tony Lindgren
2007-08-13 13:48 ` [PATCH 20/52] musb_hdrc: Search and replace _pthis with _musb Tony Lindgren
2007-08-13 13:48 ` [PATCH 21/52] musb_hdrc: Search and replace bIsHost with is_host Tony Lindgren
2007-08-13 13:48 ` [PATCH 22/52] musb_hdrc: Get rid of old unused MUSB_EpFifoDescriptor Tony Lindgren
2007-08-13 13:48 ` [PATCH 23/52] musb_hdrc: Search and replace bIsSharedFifo with is_shared_fifo Tony Lindgren
2007-08-13 13:48 ` [PATCH 24/52] musb_hdrc: Search and replace wMaxPacketSizeTx with max_packet_sz_tx Tony Lindgren
2007-08-13 13:49 ` [PATCH 25/52] musb_hdrc: Search and replace wMaxPacketSizeRx with max_packet_sz_rx Tony Lindgren
2007-08-13 13:49 ` [PATCH 26/52] musb_hdrc: Search and replace pDmaController with dma_controller Tony Lindgren
2007-08-13 13:49 ` [PATCH 27/52] musb_hdrc: Search and replace bIsMultipoint with is_multipoint Tony Lindgren
2007-08-13 13:49 ` [PATCH 28/52] musb_hdrc: Search and replace bIgnoreDisconnect with ignore_disconnect Tony Lindgren
2007-08-13 13:49 ` [PATCH 29/52] musb_hdrc: Search and replace bBulkSplit with bulk_split Tony Lindgren
2007-08-13 13:49 ` [PATCH 30/52] musb_hdrc: Search and replace bBulkCombine with bulk_combine Tony Lindgren
2007-08-13 13:49 ` [PATCH 31/52] musb_hdrc: Search and replace bAddress with address Tony Lindgren
2007-08-13 13:49 ` [PATCH 32/52] musb_hdrc: Search and replace bTestModeValue with test_mode_nr Tony Lindgren
2007-08-13 13:49 ` [PATCH 33/52] musb_hdrc: Search and replace bTestMode with test_mode Tony Lindgren
2007-08-13 13:49 ` [PATCH 34/52] musb_hdrc: Search and replace pGadgetDriver with gadget_driver Tony Lindgren
2007-08-13 13:49 ` [PATCH 35/52] musb_hdrc: Search and replace bDelayPortPowerOff with delay_port_power_off Tony Lindgren
2007-08-13 13:49 ` [PATCH 36/52] musb_hdrc: Search and replace pProcEntry with proc_entry Tony Lindgren
2007-08-13 13:49 ` [PATCH 37/52] musb_hdrc: Search and replace pPrivateData with private_data Tony Lindgren
2007-08-13 13:49 ` [PATCH 38/52] musb_hdrc: Search and replace dwMaxLength with max_len Tony Lindgren
2007-08-13 13:49 ` [PATCH 39/52] musb_hdrc: Search and replace dwActualLength with actual_len Tony Lindgren
2007-08-13 13:49 ` [PATCH 40/52] musb_hdrc: Search and replace bStatus with status Tony Lindgren
2007-08-13 13:49 ` [PATCH 41/52] musb_hdrc: Search and replace bDesiredMode with desired_mode Tony Lindgren
2007-08-13 13:49 ` [PATCH 42/52] musb_hdrc: Search and replace bMode with mode Tony Lindgren
2007-08-13 13:49 ` [PATCH 43/52] musb_hdrc: Search and replace MGC_pfDmaProgramChannel with dma_program_channel Tony Lindgren
2007-08-13 13:49 ` [PATCH 44/52] musb_hdrc: Search and replace pControlRequest with ctrlrequest Tony Lindgren
2007-08-13 13:49 ` [PATCH 45/52] musb_hdrc: Search and replace bResult with result Tony Lindgren
2007-08-13 13:49 ` [PATCH 46/52] musb_hdrc: Search and replace bSetAddress with set_address Tony Lindgren
2007-08-13 13:49 ` [PATCH 47/52] musb_hdrc: Search and replace bRecip with recip Tony Lindgren
2007-08-13 13:49 ` [PATCH 48/52] musb_hdrc: Search and replace pRequest with request Tony Lindgren
2007-08-13 13:49 ` [PATCH 49/52] musb_hdrc: Search and replace wCsrVal with csr Tony Lindgren
2007-08-13 13:49 ` [PATCH 50/52] musb_hdrc: Search and replace bTx with tx Tony Lindgren
2007-08-13 13:49 ` [PATCH 51/52] musb_hdrc: Search and replace wPacketSize with packet_sz Tony Lindgren
2007-08-13 13:49 ` [PATCH 52/52] musb_hdrc: Search and replace channelNum with chnum Tony Lindgren
2007-08-14 9:23 ` [PATCH 4/52] musb_hdrc: Search and replace pEnd with musb_ep when struct musb_hw_ep Tony Lindgren
2007-08-13 13:58 ` (no subject) Felipe Balbi
2007-08-14 8:06 ` musb CaMeLcAsEnOmOre (was: (no subject)) David Brownell
2007-08-14 8:55 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11870129934099-git-send-email-tony@atomide.com \
--to=tony@atomide.com \
--cc=linux-omap-open-source@linux.omap.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox