INIT_LIST_HEAD(&(musb->g.ep_list));
for (bEnd = 0, hw_ep = musb->endpoints;
- bEnd < musb->bEndCount;
+ bEnd < musb->nr_endpoints;
bEnd++, hw_ep++) {
if (hw_ep->bIsSharedFifo /* || !bEnd */) {
init_peripheral_ep(musb, &hw_ep->ep_in, bEnd, 0);
*/
if (driver) {
for (i = 0, hw_ep = musb->endpoints;
- i < musb->bEndCount;
+ i < musb->nr_endpoints;
i++, hw_ep++) {
MGC_SelectEnd(musb->mregs, i);
if (hw_ep->bIsSharedFifo /* || !bEnd */) {
#endif
", debug=%d [eps=%d]\n",
debug,
- musb->bEndCount);
+ musb->nr_endpoints);
if (code <= 0)
goto done;
count += code;
/* generate the report for the end points */
// REVISIT ... not unless something's connected!
- for (bEnd = 0; count >= 0 && bEnd < musb->bEndCount;
+ for (bEnd = 0; count >= 0 && bEnd < musb->nr_endpoints;
bEnd++) {
code = dump_end_info(musb, bEnd, buffer, count);
if (code > 0) {
/* start any periodic Tx transfers waiting for current frame */
wFrame = musb_readw(mbase, MGC_O_HDRC_FRAME);
ep = musb->endpoints;
- for (bEnd = 1; (bEnd < musb->bEndCount)
+ for (bEnd = 1; (bEnd < musb->nr_endpoints)
&& (musb->wEndMask >= (1 << bEnd));
bEnd++, ep++) {
// FIXME handle framecounter wraps (12 bits)
return -EINVAL;
}
epn++;
- musb->bEndCount = max(epn, musb->bEndCount);
+ musb->nr_endpoints = max(epn, musb->nr_endpoints);
}
printk(KERN_DEBUG "%s: %d/%d max ep, %d/%d memory\n",
/* 0's returned when no more endpoints */
break;
}
- musb->bEndCount++;
+ musb->nr_endpoints++;
musb->wEndMask |= (1 << bEnd);
hw_ep->wMaxPacketSizeTx = 1 << (reg & 0x0f);
musb->endpoints[0].wMaxPacketSizeRx = MGC_END0_FIFOSIZE;
/* discover endpoint configuration */
- musb->bEndCount = 1;
+ musb->nr_endpoints = 1;
musb->wEndMask = 1;
if (reg & MGC_M_CONFIGDATA_DYNFIFO) {
return status;
/* finish init, and print endpoint config */
- for (i = 0; i < musb->bEndCount; i++) {
+ for (i = 0; i < musb->nr_endpoints; i++) {
struct musb_hw_ep *hw_ep = musb->endpoints + i;
hw_ep->fifo = MUSB_FIFO_OFFSET(i) + mbase;