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;
}
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);
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;
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++;
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);
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,
}
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);
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;
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);
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;
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 {
#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;
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 */
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
? "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);
}