sch_ep 174 drivers/usb/host/xhci-mtk-sch.c struct mu3h_sch_ep_info *sch_ep; sch_ep 189 drivers/usb/host/xhci-mtk-sch.c sch_ep = kzalloc(mem_size, GFP_KERNEL); sch_ep 190 drivers/usb/host/xhci-mtk-sch.c if (!sch_ep) sch_ep 196 drivers/usb/host/xhci-mtk-sch.c kfree(sch_ep); sch_ep 201 drivers/usb/host/xhci-mtk-sch.c sch_ep->sch_tt = tt; sch_ep 202 drivers/usb/host/xhci-mtk-sch.c sch_ep->ep = ep; sch_ep 204 drivers/usb/host/xhci-mtk-sch.c return sch_ep; sch_ep 208 drivers/usb/host/xhci-mtk-sch.c struct xhci_ep_ctx *ep_ctx, struct mu3h_sch_ep_info *sch_ep) sch_ep 216 drivers/usb/host/xhci-mtk-sch.c u32 *bwb_table = sch_ep->bw_budget_table; sch_ep 228 drivers/usb/host/xhci-mtk-sch.c sch_ep->esit = get_esit(ep_ctx); sch_ep 229 drivers/usb/host/xhci-mtk-sch.c sch_ep->ep_type = ep_type; sch_ep 230 drivers/usb/host/xhci-mtk-sch.c sch_ep->maxpkt = maxpkt; sch_ep 231 drivers/usb/host/xhci-mtk-sch.c sch_ep->offset = 0; sch_ep 232 drivers/usb/host/xhci-mtk-sch.c sch_ep->burst_mode = 0; sch_ep 233 drivers/usb/host/xhci-mtk-sch.c sch_ep->repeat = 0; sch_ep 236 drivers/usb/host/xhci-mtk-sch.c sch_ep->cs_count = 0; sch_ep 243 drivers/usb/host/xhci-mtk-sch.c sch_ep->num_budget_microframes = 1; sch_ep 250 drivers/usb/host/xhci-mtk-sch.c sch_ep->pkts = max_burst + 1; sch_ep 251 drivers/usb/host/xhci-mtk-sch.c sch_ep->bw_cost_per_microframe = maxpkt * sch_ep->pkts; sch_ep 252 drivers/usb/host/xhci-mtk-sch.c bwb_table[0] = sch_ep->bw_cost_per_microframe; sch_ep 255 drivers/usb/host/xhci-mtk-sch.c sch_ep->cs_count = 0; sch_ep 256 drivers/usb/host/xhci-mtk-sch.c sch_ep->burst_mode = 1; sch_ep 267 drivers/usb/host/xhci-mtk-sch.c sch_ep->pkts = esit_pkts; sch_ep 268 drivers/usb/host/xhci-mtk-sch.c sch_ep->num_budget_microframes = 1; sch_ep 269 drivers/usb/host/xhci-mtk-sch.c bwb_table[0] = maxpkt * sch_ep->pkts; sch_ep 275 drivers/usb/host/xhci-mtk-sch.c if (sch_ep->esit == 1) sch_ep 276 drivers/usb/host/xhci-mtk-sch.c sch_ep->pkts = esit_pkts; sch_ep 277 drivers/usb/host/xhci-mtk-sch.c else if (esit_pkts <= sch_ep->esit) sch_ep 278 drivers/usb/host/xhci-mtk-sch.c sch_ep->pkts = 1; sch_ep 280 drivers/usb/host/xhci-mtk-sch.c sch_ep->pkts = roundup_pow_of_two(esit_pkts) sch_ep 281 drivers/usb/host/xhci-mtk-sch.c / sch_ep->esit; sch_ep 283 drivers/usb/host/xhci-mtk-sch.c sch_ep->num_budget_microframes = sch_ep 284 drivers/usb/host/xhci-mtk-sch.c DIV_ROUND_UP(esit_pkts, sch_ep->pkts); sch_ep 286 drivers/usb/host/xhci-mtk-sch.c sch_ep->repeat = !!(sch_ep->num_budget_microframes > 1); sch_ep 287 drivers/usb/host/xhci-mtk-sch.c sch_ep->bw_cost_per_microframe = maxpkt * sch_ep->pkts; sch_ep 289 drivers/usb/host/xhci-mtk-sch.c remainder = sch_ep->bw_cost_per_microframe; sch_ep 290 drivers/usb/host/xhci-mtk-sch.c remainder *= sch_ep->num_budget_microframes; sch_ep 292 drivers/usb/host/xhci-mtk-sch.c for (i = 0; i < sch_ep->num_budget_microframes - 1; i++) sch_ep 293 drivers/usb/host/xhci-mtk-sch.c bwb_table[i] = sch_ep->bw_cost_per_microframe; sch_ep 299 drivers/usb/host/xhci-mtk-sch.c sch_ep->pkts = 1; /* at most one packet for each microframe */ sch_ep 305 drivers/usb/host/xhci-mtk-sch.c sch_ep->cs_count = DIV_ROUND_UP(maxpkt, FS_PAYLOAD_MAX); sch_ep 306 drivers/usb/host/xhci-mtk-sch.c sch_ep->num_budget_microframes = sch_ep->cs_count; sch_ep 307 drivers/usb/host/xhci-mtk-sch.c sch_ep->bw_cost_per_microframe = sch_ep 312 drivers/usb/host/xhci-mtk-sch.c for (i = 0; i < sch_ep->num_budget_microframes; i++) sch_ep 313 drivers/usb/host/xhci-mtk-sch.c bwb_table[i] = sch_ep->bw_cost_per_microframe; sch_ep 316 drivers/usb/host/xhci-mtk-sch.c bwb_table[0] = sch_ep->bw_cost_per_microframe; sch_ep 327 drivers/usb/host/xhci-mtk-sch.c bwb_table[i] = sch_ep->bw_cost_per_microframe; sch_ep 334 drivers/usb/host/xhci-mtk-sch.c struct mu3h_sch_ep_info *sch_ep, u32 offset) sch_ep 342 drivers/usb/host/xhci-mtk-sch.c num_esit = XHCI_MTK_MAX_ESIT / sch_ep->esit; sch_ep 344 drivers/usb/host/xhci-mtk-sch.c u32 base = offset + i * sch_ep->esit; sch_ep 346 drivers/usb/host/xhci-mtk-sch.c for (j = 0; j < sch_ep->num_budget_microframes; j++) { sch_ep 348 drivers/usb/host/xhci-mtk-sch.c sch_ep->bw_budget_table[j]; sch_ep 357 drivers/usb/host/xhci-mtk-sch.c struct mu3h_sch_ep_info *sch_ep, bool used) sch_ep 364 drivers/usb/host/xhci-mtk-sch.c num_esit = XHCI_MTK_MAX_ESIT / sch_ep->esit; sch_ep 366 drivers/usb/host/xhci-mtk-sch.c base = sch_ep->offset + i * sch_ep->esit; sch_ep 367 drivers/usb/host/xhci-mtk-sch.c for (j = 0; j < sch_ep->num_budget_microframes; j++) { sch_ep 370 drivers/usb/host/xhci-mtk-sch.c sch_ep->bw_budget_table[j]; sch_ep 373 drivers/usb/host/xhci-mtk-sch.c sch_ep->bw_budget_table[j]; sch_ep 379 drivers/usb/host/xhci-mtk-sch.c struct mu3h_sch_ep_info *sch_ep, u32 offset) sch_ep 381 drivers/usb/host/xhci-mtk-sch.c struct mu3h_sch_tt *tt = sch_ep->sch_tt; sch_ep 391 drivers/usb/host/xhci-mtk-sch.c if (sch_ep->ep_type == ISOC_OUT_EP) { sch_ep 392 drivers/usb/host/xhci-mtk-sch.c last_ss = start_ss + sch_ep->cs_count - 1; sch_ep 401 drivers/usb/host/xhci-mtk-sch.c for (i = 0; i < sch_ep->cs_count; i++) sch_ep 406 drivers/usb/host/xhci-mtk-sch.c u32 cs_count = DIV_ROUND_UP(sch_ep->maxpkt, FS_PAYLOAD_MAX); sch_ep 422 drivers/usb/host/xhci-mtk-sch.c if (sch_ep->ep_type == ISOC_IN_EP) sch_ep 436 drivers/usb/host/xhci-mtk-sch.c sch_ep->cs_count = cs_count; sch_ep 438 drivers/usb/host/xhci-mtk-sch.c sch_ep->num_budget_microframes = cs_count + 2; sch_ep 444 drivers/usb/host/xhci-mtk-sch.c if (sch_ep->num_budget_microframes > sch_ep->esit) sch_ep 445 drivers/usb/host/xhci-mtk-sch.c sch_ep->num_budget_microframes = sch_ep->esit; sch_ep 452 drivers/usb/host/xhci-mtk-sch.c struct mu3h_sch_ep_info *sch_ep) sch_ep 454 drivers/usb/host/xhci-mtk-sch.c struct mu3h_sch_tt *tt = sch_ep->sch_tt; sch_ep 458 drivers/usb/host/xhci-mtk-sch.c num_esit = XHCI_MTK_MAX_ESIT / sch_ep->esit; sch_ep 460 drivers/usb/host/xhci-mtk-sch.c base = sch_ep->offset + i * sch_ep->esit; sch_ep 461 drivers/usb/host/xhci-mtk-sch.c for (j = 0; j < sch_ep->num_budget_microframes; j++) sch_ep 465 drivers/usb/host/xhci-mtk-sch.c list_add_tail(&sch_ep->tt_endpoint, &tt->ep_list); sch_ep 469 drivers/usb/host/xhci-mtk-sch.c struct mu3h_sch_bw_info *sch_bw, struct mu3h_sch_ep_info *sch_ep) sch_ep 482 drivers/usb/host/xhci-mtk-sch.c esit = sch_ep->esit; sch_ep 490 drivers/usb/host/xhci-mtk-sch.c min_cs_count = sch_ep->cs_count; sch_ep 491 drivers/usb/host/xhci-mtk-sch.c min_num_budget = sch_ep->num_budget_microframes; sch_ep 494 drivers/usb/host/xhci-mtk-sch.c ret = check_sch_tt(udev, sch_ep, offset); sch_ep 501 drivers/usb/host/xhci-mtk-sch.c if ((offset + sch_ep->num_budget_microframes) > sch_ep->esit) sch_ep 504 drivers/usb/host/xhci-mtk-sch.c worst_bw = get_max_bw(sch_bw, sch_ep, offset); sch_ep 508 drivers/usb/host/xhci-mtk-sch.c min_cs_count = sch_ep->cs_count; sch_ep 509 drivers/usb/host/xhci-mtk-sch.c min_num_budget = sch_ep->num_budget_microframes; sch_ep 526 drivers/usb/host/xhci-mtk-sch.c sch_ep->offset = min_index; sch_ep 527 drivers/usb/host/xhci-mtk-sch.c sch_ep->cs_count = min_cs_count; sch_ep 528 drivers/usb/host/xhci-mtk-sch.c sch_ep->num_budget_microframes = min_num_budget; sch_ep 535 drivers/usb/host/xhci-mtk-sch.c update_sch_tt(udev, sch_ep); sch_ep 539 drivers/usb/host/xhci-mtk-sch.c update_bus_bw(sch_bw, sch_ep, 1); sch_ep 601 drivers/usb/host/xhci-mtk-sch.c struct mu3h_sch_ep_info *sch_ep; sch_ep 634 drivers/usb/host/xhci-mtk-sch.c sch_ep = create_sch_ep(udev, ep, ep_ctx); sch_ep 635 drivers/usb/host/xhci-mtk-sch.c if (IS_ERR_OR_NULL(sch_ep)) sch_ep 638 drivers/usb/host/xhci-mtk-sch.c setup_sch_info(udev, ep_ctx, sch_ep); sch_ep 640 drivers/usb/host/xhci-mtk-sch.c ret = check_sch_bw(udev, sch_bw, sch_ep); sch_ep 646 drivers/usb/host/xhci-mtk-sch.c kfree(sch_ep); sch_ep 650 drivers/usb/host/xhci-mtk-sch.c list_add_tail(&sch_ep->endpoint, &sch_bw->bw_ep_list); sch_ep 652 drivers/usb/host/xhci-mtk-sch.c ep_ctx->reserved[0] |= cpu_to_le32(EP_BPKTS(sch_ep->pkts) sch_ep 653 drivers/usb/host/xhci-mtk-sch.c | EP_BCSCOUNT(sch_ep->cs_count) | EP_BBM(sch_ep->burst_mode)); sch_ep 654 drivers/usb/host/xhci-mtk-sch.c ep_ctx->reserved[1] |= cpu_to_le32(EP_BOFFSET(sch_ep->offset) sch_ep 655 drivers/usb/host/xhci-mtk-sch.c | EP_BREPEAT(sch_ep->repeat)); sch_ep 658 drivers/usb/host/xhci-mtk-sch.c sch_ep->pkts, sch_ep->cs_count, sch_ep->burst_mode, sch_ep 659 drivers/usb/host/xhci-mtk-sch.c sch_ep->offset, sch_ep->repeat); sch_ep 674 drivers/usb/host/xhci-mtk-sch.c struct mu3h_sch_ep_info *sch_ep; sch_ep 693 drivers/usb/host/xhci-mtk-sch.c list_for_each_entry(sch_ep, &sch_bw->bw_ep_list, endpoint) { sch_ep 694 drivers/usb/host/xhci-mtk-sch.c if (sch_ep->ep == ep) { sch_ep 695 drivers/usb/host/xhci-mtk-sch.c update_bus_bw(sch_bw, sch_ep, 0); sch_ep 696 drivers/usb/host/xhci-mtk-sch.c list_del(&sch_ep->endpoint); sch_ep 698 drivers/usb/host/xhci-mtk-sch.c list_del(&sch_ep->tt_endpoint); sch_ep 701 drivers/usb/host/xhci-mtk-sch.c kfree(sch_ep);