From: Tony Lindgren Date: Mon, 13 Aug 2007 11:17:26 +0000 (-0700) Subject: musb_hdrc: Search and replace wMaxPacketSizeRx with max_packet_sz_rx X-Git-Tag: v2.6.23-omap1~228^2~27 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b9706282357bae263b70b83ba7eca99cfd6d9a4d;p=linux-2.6-omap-h63xx.git musb_hdrc: Search and replace wMaxPacketSizeRx with max_packet_sz_rx Search and replace wMaxPacketSizeRx with max_packet_sz_rx Signed-off-by: Tony Lindgren --- diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index da4152bb3b3..aff0120dd43 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -930,7 +930,7 @@ static int musb_gadget_enable(struct usb_ep *ep, musb_ep->is_in = 0; if (musb_ep->is_in) goto fail; - if (tmp > hw_ep->wMaxPacketSizeRx) + if (tmp > hw_ep->max_packet_sz_rx) goto fail; wIntrRxE |= (1 << epnum); @@ -1581,7 +1581,7 @@ init_peripheral_ep(struct musb *musb, struct musb_ep *ep, u8 epnum, int is_in) if (is_in) ep->end_point.maxpacket = hw_ep->max_packet_sz_tx; else - ep->end_point.maxpacket = hw_ep->wMaxPacketSizeRx; + ep->end_point.maxpacket = hw_ep->max_packet_sz_rx; ep->end_point.ops = &musb_ep_ops; list_add_tail(&ep->end_point.ep_list, &musb->g.ep_list); } @@ -1612,7 +1612,7 @@ static inline void __init musb_g_init_endpoints(struct musb *musb) epnum, 1); count++; } - if (hw_ep->wMaxPacketSizeRx) { + if (hw_ep->max_packet_sz_rx) { init_peripheral_ep(musb, &hw_ep->ep_out, epnum, 0); count++; @@ -1805,7 +1805,7 @@ stop_activity(struct musb *musb, struct usb_gadget_driver *driver) } else { if (hw_ep->max_packet_sz_tx) nuke(&hw_ep->ep_in, -ESHUTDOWN); - if (hw_ep->wMaxPacketSizeRx) + if (hw_ep->max_packet_sz_rx) nuke(&hw_ep->ep_out, -ESHUTDOWN); } } diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 56979f25576..840d6cbb998 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -1716,7 +1716,7 @@ static int musb_schedule( continue; if (is_in) - diff = hw_ep->wMaxPacketSizeRx - qh->maxpacket; + diff = hw_ep->max_packet_sz_rx - qh->maxpacket; else diff = hw_ep->max_packet_sz_tx - qh->maxpacket; diff --git a/drivers/usb/musb/musbdefs.h b/drivers/usb/musb/musbdefs.h index 02e0e1879fd..6528fd16768 100644 --- a/drivers/usb/musb/musbdefs.h +++ b/drivers/usb/musb/musbdefs.h @@ -270,7 +270,7 @@ struct musb_hw_ep { u8 tx_double_buffered; u8 rx_double_buffered; u16 max_packet_sz_tx; - u16 wMaxPacketSizeRx; + u16 max_packet_sz_rx; struct dma_channel *tx_channel; struct dma_channel *rx_channel; diff --git a/drivers/usb/musb/plat_uds.c b/drivers/usb/musb/plat_uds.c index 023bd495ce6..a23a86a9c80 100644 --- a/drivers/usb/musb/plat_uds.c +++ b/drivers/usb/musb/plat_uds.c @@ -1065,13 +1065,13 @@ 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->rx_double_buffered = !!(c_size & MGC_M_FIFOSZ_DPB); - hw_ep->wMaxPacketSizeRx = maxpacket; + hw_ep->max_packet_sz_rx = maxpacket; break; case FIFO_RXTX: musb_writeb(mbase, MGC_O_HDRC_TXFIFOSZ, c_size); musb_writew(mbase, MGC_O_HDRC_TXFIFOADD, c_off); hw_ep->rx_double_buffered = !!(c_size & MGC_M_FIFOSZ_DPB); - hw_ep->wMaxPacketSizeRx = maxpacket; + hw_ep->max_packet_sz_rx = maxpacket; musb_writeb(mbase, MGC_O_HDRC_RXFIFOSZ, c_size); musb_writew(mbase, MGC_O_HDRC_RXFIFOADD, c_off); @@ -1203,11 +1203,11 @@ static int __init ep_config_from_hw(struct musb *musb) /* shared TX/RX FIFO? */ if ((reg & 0xf0) == 0xf0) { - hw_ep->wMaxPacketSizeRx = hw_ep->max_packet_sz_tx; + hw_ep->max_packet_sz_rx = hw_ep->max_packet_sz_tx; hw_ep->is_shared_fifo = TRUE; continue; } else { - hw_ep->wMaxPacketSizeRx = 1 << ((reg & 0xf0) >> 4); + hw_ep->max_packet_sz_rx = 1 << ((reg & 0xf0) >> 4); hw_ep->is_shared_fifo = FALSE; } @@ -1216,7 +1216,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->max_packet_sz_tx < 512 - || hw_ep->wMaxPacketSizeRx < 512) + || hw_ep->max_packet_sz_rx < 512) continue; /* REVISIT: this algorithm is lazy, we should at least @@ -1335,7 +1335,7 @@ static int __init musb_core_init(u16 wType, struct musb *musb) /* configure ep0 */ musb->endpoints[0].max_packet_sz_tx = MGC_END0_FIFOSIZE; - musb->endpoints[0].wMaxPacketSizeRx = MGC_END0_FIFOSIZE; + musb->endpoints[0].max_packet_sz_rx = MGC_END0_FIFOSIZE; /* discover endpoint configuration */ musb->nr_endpoints = 1; @@ -1393,16 +1393,16 @@ static int __init musb_core_init(u16 wType, struct musb *musb) ? "doublebuffer, " : "", hw_ep->max_packet_sz_tx); } - if (hw_ep->wMaxPacketSizeRx && !hw_ep->is_shared_fifo) { + if (hw_ep->max_packet_sz_rx && !hw_ep->is_shared_fifo) { printk(KERN_DEBUG "%s: hw_ep %d%s, %smax %d\n", musb_driver_name, i, "rx", hw_ep->rx_double_buffered ? "doublebuffer, " : "", - hw_ep->wMaxPacketSizeRx); + hw_ep->max_packet_sz_rx); } - if (!(hw_ep->max_packet_sz_tx || hw_ep->wMaxPacketSizeRx)) + if (!(hw_ep->max_packet_sz_tx || hw_ep->max_packet_sz_rx)) DBG(1, "hw_ep %d not configured\n", i); }