Commit b9706282 authored by Tony Lindgren's avatar Tony Lindgren

musb_hdrc: Search and replace wMaxPacketSizeRx with max_packet_sz_rx

Search and replace wMaxPacketSizeRx with max_packet_sz_rx
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 2fd6f314
......@@ -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);
}
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment