public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH 10/36] musb_hdrc: Search and replace dwLength with len
Date: Thu, 16 Aug 2007 02:40:33 -0700	[thread overview]
Message-ID: <1187257282941-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <11872572803477-git-send-email-tony@atomide.com>

Search and replace dwLength with len

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/usb/musb/cppi_dma.c  |    6 +++---
 drivers/usb/musb/musb_host.c |   28 ++++++++++++++--------------
 drivers/usb/musb/musbhsdma.c |   20 ++++++++++----------
 3 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c
index 1441dc7..b455f8e 100644
--- a/drivers/usb/musb/cppi_dma.c
+++ b/drivers/usb/musb/cppi_dma.c
@@ -946,12 +946,12 @@ cppi_next_rx_segment(struct musb *musb, struct cppi_channel *rx, int onepacket)
  *	all short reads as errors and kick in high level fault recovery.
  *	For TX, ignored because of RNDIS mode races/glitches.
  * @dma_addr: dma address of buffer
- * @dwLength: length of buffer
+ * @len: length of buffer
  * Context: controller irqlocked
  */
 static int cppi_channel_program(struct dma_channel *pChannel,
 		u16 wPacketSz, u8 mode,
-		dma_addr_t dma_addr, u32 dwLength)
+		dma_addr_t dma_addr, u32 len)
 {
 	struct cppi_channel	*otgChannel = pChannel->private_data;
 	struct cppi		*pController = otgChannel->pController;
@@ -988,7 +988,7 @@ static int cppi_channel_program(struct dma_channel *pChannel,
 	otgChannel->currOffset = 0;
 	otgChannel->pktSize = wPacketSz;
 	otgChannel->actualLen = 0;
-	otgChannel->transferSize = dwLength;
+	otgChannel->transferSize = len;
 
 	/* TX channel? or RX? */
 	if (otgChannel->transmit)
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index 4390e42..cc05f70 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -105,7 +105,7 @@
 
 static void musb_ep_program(struct musb *musb, u8 epnum,
 			struct urb *urb, unsigned int nOut,
-			u8 * buf, u32 dwLength);
+			u8 * buf, u32 len);
 
 /*
  * Clear TX fifo. Needed to avoid BABBLE errors.
@@ -170,7 +170,7 @@ static void
 musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh)
 {
 	u16			wFrame;
-	u32			dwLength;
+	u32			len;
 	void			*buf;
 	void __iomem		*mbase =  musb->mregs;
 	struct urb		*urb = next_urb(qh);
@@ -191,17 +191,17 @@ musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh)
 		hw_ep->out_qh = qh;
 		musb->ep0_stage = MGC_END0_START;
 		buf = urb->setup_packet;
-		dwLength = 8;
+		len = 8;
 		break;
 	case USB_ENDPOINT_XFER_ISOC:
 		qh->iso_idx = 0;
 		qh->frame = 0;
 		buf = urb->transfer_buffer + urb->iso_frame_desc[0].offset;
-		dwLength = urb->iso_frame_desc[0].length;
+		len = urb->iso_frame_desc[0].length;
 		break;
 	default:		/* bulk, interrupt */
 		buf = urb->transfer_buffer;
-		dwLength = urb->transfer_buffer_length;
+		len = urb->transfer_buffer_length;
 	}
 
 	DBG(4, "qh %p urb %p dev%d ep%d%s%s, hw_ep %d, %p/%d\n",
@@ -213,14 +213,14 @@ musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh)
 			case USB_ENDPOINT_XFER_ISOC:	s = "-iso"; break;
 			default:			s = "-intr"; break;
 			}; s;}),
-			epnum, buf, dwLength);
+			epnum, buf, len);
 
 	/* Configure endpoint */
 	if (is_in || hw_ep->is_shared_fifo)
 		hw_ep->in_qh = qh;
 	else
 		hw_ep->out_qh = qh;
-	musb_ep_program(musb, epnum, urb, !is_in, buf, dwLength);
+	musb_ep_program(musb, epnum, urb, !is_in, buf, len);
 
 	/* transmit may have more work: start it when it is time */
 	if (is_in)
@@ -625,7 +625,7 @@ musb_rx_reinit(struct musb *musb, struct musb_qh *qh, struct musb_hw_ep *ep)
  */
 static void musb_ep_program(struct musb *musb, u8 epnum,
 			struct urb *urb, unsigned int is_out,
-			u8 * buf, u32 dwLength)
+			u8 * buf, u32 len)
 {
 	struct dma_controller	*dma_controller;
 	struct dma_channel	*pDmaChannel;
@@ -649,7 +649,7 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
 			epnum, urb, urb->dev->speed,
 			qh->addr_reg, qh->epnum, is_out ? "out" : "in",
 			qh->h_addr_reg, qh->h_port_reg,
-			dwLength);
+			len);
 
 	musb_ep_select(mbase, epnum);
 
@@ -755,9 +755,9 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
 
 		if (can_bulk_split(musb, qh->type))
 			wLoadCount = min((u32) hw_ep->max_packet_sz_tx,
-						dwLength);
+						len);
 		else
-			wLoadCount = min((u32) packet_sz, dwLength);
+			wLoadCount = min((u32) packet_sz, len);
 
 #ifdef CONFIG_USB_INVENTRA_DMA
 		if (pDmaChannel) {
@@ -771,7 +771,7 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
 			musb_writew(epio, MUSB_TXCSR,
 				csr | MUSB_TXCSR_MODE);
 
-			qh->segsize = min(dwLength, pDmaChannel->max_len);
+			qh->segsize = min(len, pDmaChannel->max_len);
 
 			if (qh->segsize <= packet_sz)
 				pDmaChannel->desired_mode = 0;
@@ -825,7 +825,7 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
 				csr | MUSB_TXCSR_MODE);
 
 			pDmaChannel->actual_len = 0L;
-			qh->segsize = dwLength;
+			qh->segsize = len;
 
 			/* TX uses "rndis" mode automatically, but needs help
 			 * to identify the zero-length-final-packet case.
@@ -905,7 +905,7 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
 			/* candidate for DMA */
 			if (pDmaChannel) {
 				pDmaChannel->actual_len = 0L;
-				qh->segsize = dwLength;
+				qh->segsize = len;
 
 				/* AUTOREQ is in a DMA register */
 				musb_writew(hw_ep->regs, MUSB_RXCSR, csr);
diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
index 98b5b2e..b6d3ef0 100644
--- a/drivers/usb/musb/musbhsdma.c
+++ b/drivers/usb/musb/musbhsdma.c
@@ -172,7 +172,7 @@ static void dma_channel_release(struct dma_channel *pChannel)
 
 static void configure_channel(struct dma_channel *pChannel,
 				u16 packet_sz, u8 mode,
-				dma_addr_t dma_addr, u32 dwLength)
+				dma_addr_t dma_addr, u32 len)
 {
 	struct musb_dma_channel *pImplChannel =
 		(struct musb_dma_channel *) pChannel->private_data;
@@ -182,11 +182,11 @@ static void configure_channel(struct dma_channel *pChannel,
 	u16 csr = 0;
 
 	DBG(4, "%p, pkt_sz %d, addr 0x%x, len %d, mode %d\n",
-	    pChannel, packet_sz, dma_addr, dwLength, mode);
+	    pChannel, packet_sz, dma_addr, len, mode);
 
 	if (mode) {
 		csr |= 1 << MUSB_HSDMA_MODE1_SHIFT;
-		if (dwLength < packet_sz) {
+		if (len < packet_sz) {
 			return FALSE;
 		}
 		if (packet_sz >= 64) {
@@ -212,7 +212,7 @@ static void configure_channel(struct dma_channel *pChannel,
 		    dma_addr);
 	musb_writel(mbase,
 		    MGC_HSDMA_CHANNEL_OFFSET(bChannel, MGC_O_HSDMA_COUNT),
-		    dwLength);
+		    len);
 
 	/* control (this should start things) */
 	musb_writew(mbase,
@@ -222,7 +222,7 @@ static void configure_channel(struct dma_channel *pChannel,
 
 static int dma_channel_program(struct dma_channel * pChannel,
 				u16 packet_sz, u8 mode,
-				dma_addr_t dma_addr, u32 dwLength)
+				dma_addr_t dma_addr, u32 len)
 {
 	struct musb_dma_channel *pImplChannel =
 			(struct musb_dma_channel *) pChannel->private_data;
@@ -230,23 +230,23 @@ 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",
 		pImplChannel->epnum,
 		pImplChannel->transmit ? "Tx" : "Rx",
-		packet_sz, dma_addr, dwLength, mode);
+		packet_sz, dma_addr, len, mode);
 
 	BUG_ON(pChannel->status == MGC_DMA_STATUS_UNKNOWN ||
 		pChannel->status == MGC_DMA_STATUS_BUSY);
 
 	pChannel->actual_len = 0;
 	pImplChannel->dwStartAddress = dma_addr;
-	pImplChannel->len = dwLength;
+	pImplChannel->len = len;
 	pImplChannel->wMaxPacketSize = packet_sz;
 	pChannel->status = MGC_DMA_STATUS_BUSY;
 
-	if ((mode == 1) && (dwLength >= packet_sz)) {
+	if ((mode == 1) && (len >= packet_sz)) {
 		configure_channel(pChannel, packet_sz, 1, dma_addr,
-				  dwLength);
+				  len);
 	} else
 		configure_channel(pChannel, packet_sz, 0, dma_addr,
-				  dwLength);
+				  len);
 
 	return TRUE;
 }
-- 
1.5.2.3

  reply	other threads:[~2007-08-16  9:40 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-16  9:40 [PATCH 0/36] musb_hdrc: Yet more musb clean-up Tony Lindgren
2007-08-16  9:40 ` [PATCH 1/36] musb_hdrc: Add Nokia copyright, make GPLv2 license generic Tony Lindgren
2007-08-16  9:40   ` [PATCH 2/36]_csr Tony Lindgren
2007-08-16  9:40     ` [PATCH 3/36] musb_hdrc: Search and replace wCsr with csr Tony Lindgren
2007-08-16  9:40       ` [PATCH 4/36]xe Tony Lindgren
2007-08-16  9:40         ` [PATCH 5/36] musb_hdrc: Search and replace bIntrUSB with int_usb Tony Lindgren
2007-08-16  9:40           ` [PATCH 6/36] musb_hdrc: Search and replace bIntr with int_hsdma Tony Lindgren
2007-08-16  9:40             ` [PATCH 7/36] musb_hdrc: Search and replace bTransmit with transmit Tony Lindgren
2007-08-16  9:40               ` [PATCH 8/36] musb_hdrc: Search and replace pUrb with urb Tony Lindgren
2007-08-16  9:40                 ` [PATCH 9/36] musb_hdrc: Search and replace pBuffer with buf Tony Lindgren
2007-08-16  9:40                   ` Tony Lindgren [this message]
2007-08-16  9:40                     ` [PATCH 11/36] musb_hdrc: Search and replace wEndMask with epmask Tony Lindgren
2007-08-16  9:40                       ` [PATCH 12/36] musb_hdrc: Search and replace pDmaChannel with dma_channel Tony Lindgren
2007-08-16  9:40                         ` [PATCH 13/36] musb_hdrc: Search and replace wRxCount with rx_count Tony Lindgren
2007-08-16  9:40                           ` [PATCH 14/36] musb_hdrc: Search and replace bDone with done Tony Lindgren
2007-08-16  9:40                             ` [PATCH 15/36] musb_hdrc: Search and replace nPipe with pipe Tony Lindgren
2007-08-16  9:40                               ` [PATCH 16/36] musb_hdrc: Search and replace wLoadCount with load_count Tony Lindgren
2007-08-16  9:40                                 ` [PATCH 17/36] musb_hdrc: Search and replace bDmaOk with dma_ok Tony Lindgren
2007-08-16  9:40                                   ` [PATCH 18/36] musb_hdrc: Search and replace pFifoDest with fifo_dest Tony Lindgren
2007-08-16  9:40                                     ` [PATCH 19/36] musb_hdrc: Search and replace pFifoSource with fifo_src Tony Lindgren
2007-08-16  9:40                                       ` [PATCH 20/36] musb_hdrc: Search and replace bIsochError with iso_err Tony Lindgren
2007-08-16  9:40                                         ` [PATCH 21/36] musb_hdrc: Search and replace wVal with val, except for wValue Tony Lindgren
2007-08-16  9:40                                           ` [PATCH 22/36] musb_hdrc: Search and replace wBestDiff with best_diff Tony Lindgren
2007-08-16  9:40                                             ` [PATCH 23/36] musb_hdrc: Search and replace nBestEnd with best_end Tony Lindgren
2007-08-16  9:40                                               ` [PATCH 24/36] musb_hdrc: Search and replace nEnd with epnum Tony Lindgren
2007-08-16  9:40                                                 ` [PATCH 25/36] musb_hdrc: Search and replace wFrame with frame Tony Lindgren
2007-08-16  9:40                                                   ` [PATCH 26/36] musb_hdrc: Search and replace wRelease with hwvers Tony Lindgren
2007-08-16  9:40                                                     ` [PATCH 27/36] musb_hdrc: Search and replace wRelMajor with rev_major Tony Lindgren
2007-08-16  9:40                                                       ` [PATCH 28/36] musb_hdrc: Search and replace wRelMinor with rev_minor Tony Lindgren
2007-08-16  9:40                                                         ` [PATCH 29/36] musb_hdrc: Search and replace dwData with data Tony Lindgren
2007-08-16  9:40                                                           ` [PATCH 30/36] musb_hdrc: Search and replace pController with controller Tony Lindgren
2007-08-16  9:40                                                             ` [PATCH 31/36] musb_hdrc: Search and replace wType with musb_type Tony Lindgren
2007-08-16  9:40                                                               ` [PATCH 32/36] musb_hdrc: Search and replace bReg with reg Tony Lindgren
2007-08-16  9:40                                                                 ` [PATCH 33/36] musb_hdrc: Search and replace bMore with more Tony Lindgren
2007-08-16  9:40                                                                   ` [PATCH 34/36] musb_hdrc: Search and replace bComplete with complete Tony Lindgren
2007-08-16  9:40                                                                     ` [PATCH 35/36] musb_hdrc: Get rid of unnecessary DMA typedef & fix a comment typo Tony Lindgren
2007-08-16  9:40                                                                       ` [PATCH 36/36] musb_hdrc: Search and replace MGC_DMA with MUSB_DMA Tony Lindgren
2007-08-16 18:03                 ` [PATCH 8/36] musb_hdrc: Search and replace pUrb with urb David Brownell
2007-08-17  7:18                   ` Tony Lindgren
2007-08-16 10:55 ` [PATCH 0/36] musb_hdrc: Yet more musb clean-up Felipe Balbi

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=1187257282941-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