]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
musb_hdrc: Search and replace wMaxPacketSizeTx with max_packet_sz_tx
authorTony Lindgren <tony@atomide.com>
Mon, 13 Aug 2007 11:16:20 +0000 (04:16 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 13 Aug 2007 11:16:20 +0000 (04:16 -0700)
Search and replace wMaxPacketSizeTx with max_packet_sz_tx

Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/usb/musb/musb_gadget.c
drivers/usb/musb/musb_host.c
drivers/usb/musb/musbdefs.h
drivers/usb/musb/plat_uds.c

index a463d1874ade1b9e20c1eaea84aeb3ff57a81f25..da4152bb3b38799a4fd93e1b98526f3b698a4d06 100644 (file)
@@ -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);
index 6f1405e64621f100241d772fbc682ec74850549e..56979f2557619d36582c84376895cbd16d5a6ea7 100644 (file)
@@ -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;
index 3ea2aa85265fabae8c28a72288232c98a13d75e0..02e0e1879fd0cb451b463d3162e5ec975d2d48f0 100644 (file)
@@ -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;
index 4fbd90e0e998afb230ed1c72c24b7495af8efaa6..023bd495ce6a62338845fba2d8e4af2d00c6c78f 100644 (file)
@@ -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);
        }