Lines Matching refs:ep_ctx
940 struct xhci_ep_context_t ep_ctx = {0}; in xhci_initialize_ep() local
941 memset(&ep_ctx, 0, sizeof(struct xhci_ep_context_t)); in xhci_initialize_ep()
945 ep_ctx.tr_dequeue_ptr = virt_2_phys(xhci_hc[id].ports[port_id].ep_info[ep_num].ep_ring_vbase); in xhci_initialize_ep()
946 xhci_ep_set_dequeue_cycle_state(&ep_ctx, XHCI_TRB_CYCLE_ON); in xhci_initialize_ep()
950 …d].ports[port_id].ep_info[ep_num].current_ep_ring_cycle = xhci_ep_get_dequeue_cycle_state(&ep_ctx); in xhci_initialize_ep()
959 ep_ctx.max_packet_size = max_packet; in xhci_initialize_ep()
960 ep_ctx.linear_stream_array = 0; in xhci_initialize_ep()
961 ep_ctx.max_primary_streams = 0; in xhci_initialize_ep()
962 ep_ctx.mult = 0; in xhci_initialize_ep()
963 ep_ctx.ep_state = XHCI_EP_STATE_DISABLED; in xhci_initialize_ep()
964 ep_ctx.hid = 0; in xhci_initialize_ep()
965 ep_ctx.ep_type = XHCI_EP_TYPE_CONTROL; in xhci_initialize_ep()
966 ep_ctx.average_trb_len = 8; // 所有的control ep的该值均为8 in xhci_initialize_ep()
967 ep_ctx.err_cnt = 3; in xhci_initialize_ep()
968 ep_ctx.max_burst_size = max_burst; in xhci_initialize_ep()
969 ep_ctx.interval = ep_interval; in xhci_initialize_ep()
973 ep_ctx.max_packet_size = max_packet & 0x7ff; in xhci_initialize_ep()
974 ep_ctx.max_burst_size = max_burst; in xhci_initialize_ep()
975 ep_ctx.ep_state = XHCI_EP_STATE_DISABLED; in xhci_initialize_ep()
976 ep_ctx.mult = 0; in xhci_initialize_ep()
977 ep_ctx.err_cnt = 3; in xhci_initialize_ep()
978 ep_ctx.max_esti_payload_hi = ((max_packet * (max_burst + 1)) >> 8) & 0xff; in xhci_initialize_ep()
979 ep_ctx.max_esti_payload_lo = ((max_packet * (max_burst + 1))) & 0xff; in xhci_initialize_ep()
980 ep_ctx.interval = ep_interval; in xhci_initialize_ep()
981 ep_ctx.average_trb_len = 8; // todo: It's not sure how much to fill in this value in xhci_initialize_ep()
983 ep_ctx.ep_type = ((ep_num % 2) ? XHCI_EP_TYPE_INTR_IN : XHCI_EP_TYPE_INTR_OUT); in xhci_initialize_ep()
991 __write_ep(id, slot_vaddr, ep_num, &ep_ctx); in xhci_initialize_ep()