Lines Matching defs:frame
61 #define FOTG210_TUNE_FLS 1 /* (medium) 512-frame schedule */
147 itd->frame, itd, hc32_to_cpu(fotg210, itd->hw_next),
3300 static void periodic_unlink(struct fotg210_hcd *fotg210, unsigned frame,
3303 union fotg210_shadow *prev_p = &fotg210->pshadow[frame];
3304 __hc32 *hw_p = &fotg210->periodic[frame];
3331 unsigned frame, unsigned uframe)
3333 __hc32 *hw_p = &fotg210->periodic[frame];
3334 union fotg210_shadow *q = &fotg210->pshadow[frame];
3355 * bandwidth from the previous frame
3373 frame * 8 + uframe, usecs);
3390 * for a periodic transfer starting at the specified frame, using
3394 struct usb_device *dev, unsigned frame, u32 uf_mask)
3403 for (; frame < fotg210->periodic_size; frame += period) {
3408 here = fotg210->pshadow[frame];
3409 type = Q_NEXT_TYPE(fotg210, fotg210->periodic[frame]);
3434 "periodic frame %d bogus type %d\n",
3435 frame, type);
3552 * waiting at least one frame, as described in EHCI 4.12.2.5.
3666 static int check_period(struct fotg210_hcd *fotg210, unsigned frame,
3671 /* complete split running into next frame?
3686 claimed = periodic_usecs(fotg210, frame,
3691 } while ((frame += 1) < fotg210->periodic_size);
3696 claimed = periodic_usecs(fotg210, frame, uframe);
3699 } while ((frame += period) < fotg210->periodic_size);
3706 static int check_intr_schedule(struct fotg210_hcd *fotg210, unsigned frame,
3715 if (!check_period(fotg210, frame, uframe, qh->period, qh->usecs))
3734 if (tt_no_collision(fotg210, qh->period, qh->dev, frame, mask)) {
3735 if (!check_period(fotg210, frame, uframe + qh->gap_uf + 1,
3738 if (!check_period(fotg210, frame, uframe + qh->gap_uf,
3755 unsigned frame; /* 0..(qh->period - 1), or NO_FRAME */
3760 frame = qh->start;
3763 if (frame < qh->period) {
3765 status = check_intr_schedule(fotg210, frame, --uframe,
3782 frame = ++fotg210->random_frame % qh->period;
3785 frame, uframe, qh,
3794 frame = 0;
3800 qh->start = frame;
3802 /* reset S-frame and (maybe) C-frame masks */
3946 /* usbfs wants to report the average usecs per frame tied up
4102 if (itd->frame == fotg210->now_frame)
4214 /* need to schedule; when's the next (u)frame we could start?
4321 static inline void itd_link(struct fotg210_hcd *fotg210, unsigned frame,
4324 union fotg210_shadow *prev = &fotg210->pshadow[frame];
4325 __hc32 *hw_p = &fotg210->periodic[frame];
4342 itd->frame = frame;
4352 unsigned next_uframe, uframe, frame;
4385 frame = next_uframe >> 3;
4394 if (((next_uframe >> 3) != frame)
4396 itd_link(fotg210, frame & (fotg210->periodic_size - 1),
4420 * assuming (a) no more than two urbs per frame on this endpoint, and also
4574 static inline int scan_frame_queue(struct fotg210_hcd *fotg210, unsigned frame,
4582 /* scan each element in frame's queue for completions */
4583 q_p = &fotg210->pshadow[frame];
4584 hw_p = &fotg210->periodic[frame];
4595 * frame is current.
4597 if (frame == now_frame && live) {
4627 fotg210_dbg(fotg210, "corrupt type %d frame %d shadow %p\n",
4628 type, frame, q.ptr);
4646 unsigned uf, now_frame, frame, ret;
4665 frame = fotg210->next_frame;
4669 ret = scan_frame_queue(fotg210, frame,
4672 /* Stop when we have reached the current frame */
4673 if (frame == now_frame)
4675 frame = (frame + 1) & fmask;
4699 unsigned frame, uframe;
4730 for (frame = 0; frame < fotg210->periodic_size; ++frame)
4733 periodic_usecs(fotg210, frame,
4922 * hw default: 1K periodic list heads, one per frame.