From: Tony Lindgren <tony@atomide.com>
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH 24/52] musb_hdrc: Search and replace wMaxPacketSizeTx with max_packet_sz_tx
Date: Mon, 13 Aug 2007 06:48:59 -0700 [thread overview]
Message-ID: <11870130272865-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <1187013024836-git-send-email-tony@atomide.com>
Search and replace wMaxPacketSizeTx with max_packet_sz_tx
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
drivers/usb/musb/musb_gadget.c | 10 +++++-----
drivers/usb/musb/musb_host.c | 6 +++---
drivers/usb/musb/musbdefs.h | 2 +-
drivers/usb/musb/plat_uds.c | 18 +++++++++---------
4 files changed, 18 insertions(+), 18 deletions(-)
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -203,7 +203,7 @@ static void nuke(struct musb_ep *ep, const int status)
static inline int max_ep_writesize(struct musb *musb, struct musb_ep *ep)
{
if (can_bulk_split(musb, ep->type))
- return ep->hw_ep->wMaxPacketSizeTx;
+ return ep->hw_ep->max_packet_sz_tx;
else
return ep->wPacketSize;
}
@@ -900,7 +900,7 @@ static int musb_gadget_enable(struct usb_ep *ep,
musb_ep->is_in = 1;
if (!musb_ep->is_in)
goto fail;
- if (tmp > hw_ep->wMaxPacketSizeTx)
+ if (tmp > hw_ep->max_packet_sz_tx)
goto fail;
wIntrTxE |= (1 << epnum);
@@ -1579,7 +1579,7 @@ init_peripheral_ep(struct musb *musb, struct musb_ep *ep, u8 epnum, int is_in)
musb->g.ep0 = &ep->end_point;
} else {
if (is_in)
- ep->end_point.maxpacket = hw_ep->wMaxPacketSizeTx;
+ ep->end_point.maxpacket = hw_ep->max_packet_sz_tx;
else
ep->end_point.maxpacket = hw_ep->wMaxPacketSizeRx;
ep->end_point.ops = &musb_ep_ops;
@@ -1607,7 +1607,7 @@ static inline void __init musb_g_init_endpoints(struct musb *musb)
init_peripheral_ep(musb, &hw_ep->ep_in, epnum, 0);
count++;
} else {
- if (hw_ep->wMaxPacketSizeTx) {
+ if (hw_ep->max_packet_sz_tx) {
init_peripheral_ep(musb, &hw_ep->ep_in,
epnum, 1);
count++;
@@ -1803,7 +1803,7 @@ stop_activity(struct musb *musb, struct usb_gadget_driver *driver)
if (hw_ep->is_shared_fifo /* || !epnum */) {
nuke(&hw_ep->ep_in, -ESHUTDOWN);
} else {
- if (hw_ep->wMaxPacketSizeTx)
+ if (hw_ep->max_packet_sz_tx)
nuke(&hw_ep->ep_in, -ESHUTDOWN);
if (hw_ep->wMaxPacketSizeRx)
nuke(&hw_ep->ep_out, -ESHUTDOWN);
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -740,7 +740,7 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
if (can_bulk_split(musb, qh->type))
musb_writew(epio, MGC_O_HDRC_TXMAXP,
wPacketSize
- | ((hw_ep->wMaxPacketSizeTx /
+ | ((hw_ep->max_packet_sz_tx /
wPacketSize) - 1) << 11);
else
musb_writew(epio, MGC_O_HDRC_TXMAXP,
@@ -754,7 +754,7 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
}
if (can_bulk_split(musb, qh->type))
- wLoadCount = min((u32) hw_ep->wMaxPacketSizeTx,
+ wLoadCount = min((u32) hw_ep->max_packet_sz_tx,
dwLength);
else
wLoadCount = min((u32) wPacketSize, dwLength);
@@ -1718,7 +1718,7 @@ static int musb_schedule(
if (is_in)
diff = hw_ep->wMaxPacketSizeRx - qh->maxpacket;
else
- diff = hw_ep->wMaxPacketSizeTx - qh->maxpacket;
+ diff = hw_ep->max_packet_sz_tx - qh->maxpacket;
if (diff > 0 && wBestDiff > diff) {
wBestDiff = diff;
--- a/drivers/usb/musb/musbdefs.h
+++ b/drivers/usb/musb/musbdefs.h
@@ -269,7 +269,7 @@ struct musb_hw_ep {
u8 is_shared_fifo;
u8 tx_double_buffered;
u8 rx_double_buffered;
- u16 wMaxPacketSizeTx;
+ u16 max_packet_sz_tx;
u16 wMaxPacketSizeRx;
struct dma_channel *tx_channel;
--- a/drivers/usb/musb/plat_uds.c
+++ b/drivers/usb/musb/plat_uds.c
@@ -1059,7 +1059,7 @@ fifo_setup(struct musb *musb, struct musb_hw_ep *hw_ep,
musb_writeb(mbase, MGC_O_HDRC_TXFIFOSZ, c_size);
musb_writew(mbase, MGC_O_HDRC_TXFIFOADD, c_off);
hw_ep->tx_double_buffered = !!(c_size & MGC_M_FIFOSZ_DPB);
- hw_ep->wMaxPacketSizeTx = maxpacket;
+ hw_ep->max_packet_sz_tx = maxpacket;
break;
case FIFO_RX:
musb_writeb(mbase, MGC_O_HDRC_RXFIFOSZ, c_size);
@@ -1076,7 +1076,7 @@ fifo_setup(struct musb *musb, struct musb_hw_ep *hw_ep,
musb_writeb(mbase, MGC_O_HDRC_RXFIFOSZ, c_size);
musb_writew(mbase, MGC_O_HDRC_RXFIFOADD, c_off);
hw_ep->tx_double_buffered = hw_ep->rx_double_buffered;
- hw_ep->wMaxPacketSizeTx = maxpacket;
+ hw_ep->max_packet_sz_tx = maxpacket;
hw_ep->is_shared_fifo = TRUE;
break;
@@ -1199,11 +1199,11 @@ static int __init ep_config_from_hw(struct musb *musb)
musb->nr_endpoints++;
musb->wEndMask |= (1 << epnum);
- hw_ep->wMaxPacketSizeTx = 1 << (reg & 0x0f);
+ hw_ep->max_packet_sz_tx = 1 << (reg & 0x0f);
/* shared TX/RX FIFO? */
if ((reg & 0xf0) == 0xf0) {
- hw_ep->wMaxPacketSizeRx = hw_ep->wMaxPacketSizeTx;
+ hw_ep->wMaxPacketSizeRx = hw_ep->max_packet_sz_tx;
hw_ep->is_shared_fifo = TRUE;
continue;
} else {
@@ -1215,7 +1215,7 @@ static int __init ep_config_from_hw(struct musb *musb)
#ifdef CONFIG_USB_MUSB_HDRC_HCD
/* pick an RX/TX endpoint for bulk */
- if (hw_ep->wMaxPacketSizeTx < 512
+ if (hw_ep->max_packet_sz_tx < 512
|| hw_ep->wMaxPacketSizeRx < 512)
continue;
@@ -1334,7 +1334,7 @@ static int __init musb_core_init(u16 wType, struct musb *musb)
musb_driver_name, type, aRevision, aDate);
/* configure ep0 */
- musb->endpoints[0].wMaxPacketSizeTx = MGC_END0_FIFOSIZE;
+ musb->endpoints[0].max_packet_sz_tx = MGC_END0_FIFOSIZE;
musb->endpoints[0].wMaxPacketSizeRx = MGC_END0_FIFOSIZE;
/* discover endpoint configuration */
@@ -1384,14 +1384,14 @@ static int __init musb_core_init(u16 wType, struct musb *musb)
hw_ep->tx_reinit = 1;
#endif
- if (hw_ep->wMaxPacketSizeTx) {
+ if (hw_ep->max_packet_sz_tx) {
printk(KERN_DEBUG
"%s: hw_ep %d%s, %smax %d\n",
musb_driver_name, i,
hw_ep->is_shared_fifo ? "shared" : "tx",
hw_ep->tx_double_buffered
? "doublebuffer, " : "",
- hw_ep->wMaxPacketSizeTx);
+ hw_ep->max_packet_sz_tx);
}
if (hw_ep->wMaxPacketSizeRx && !hw_ep->is_shared_fifo) {
printk(KERN_DEBUG
@@ -1402,7 +1402,7 @@ static int __init musb_core_init(u16 wType, struct musb *musb)
? "doublebuffer, " : "",
hw_ep->wMaxPacketSizeRx);
}
- if (!(hw_ep->wMaxPacketSizeTx || hw_ep->wMaxPacketSizeRx))
+ if (!(hw_ep->max_packet_sz_tx || hw_ep->wMaxPacketSizeRx))
DBG(1, "hw_ep %d not configured\n", i);
}
--
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 ` [PATCH 10/52] musb_hdrc: Search and replace wFifoCount with fifo_count Tony Lindgren
2007-08-13 13:48 ` [PATCH 11/52] musb_hdrc: Search and replace wCount with len 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 ` Tony Lindgren [this message]
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=11870130272865-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