Lines Matching full:mps
719 u32 mps = hs_ep->ep.maxpacket; in dwc2_gadget_get_chain_limit() local
729 /* Interrupt OUT EP with mps not multiple of 4 */ in dwc2_gadget_get_chain_limit()
731 if (usb_endpoint_xfer_int(ep_desc) && !dir_in && (mps % 4)) in dwc2_gadget_get_chain_limit()
732 maxsize = mps * MAX_DMA_DESC_NUM_GENERIC; in dwc2_gadget_get_chain_limit()
745 * Control out - MPS,
747 * Control In/Bulk/Interrupt - multiple of mps. This will allow to not
749 * Interrupt OUT - if mps not multiple of 4 then a single packet corresponds
757 u32 mps = hs_ep->ep.maxpacket; in dwc2_gadget_get_desc_params() local
762 desc_size = mps; in dwc2_gadget_get_desc_params()
776 /* Round down desc_size to be mps multiple */ in dwc2_gadget_get_desc_params()
777 desc_size -= desc_size % mps; in dwc2_gadget_get_desc_params()
780 /* Interrupt OUT EP with mps not multiple of 4 */ in dwc2_gadget_get_desc_params()
782 if (usb_endpoint_xfer_int(ep_desc) && !dir_in && (mps % 4)) { in dwc2_gadget_get_desc_params()
783 desc_size = mps; in dwc2_gadget_get_desc_params()
797 u32 mps = hs_ep->ep.maxpacket; in dwc2_gadget_fill_nonisoc_xfer_ddma_one() local
830 (*desc)->status |= (len % mps) ? DEV_DMA_SHORT : in dwc2_gadget_fill_nonisoc_xfer_ddma_one()
1134 u32 mps = hs_ep->ep.maxpacket; in dwc2_hsotg_start_req() local
1136 /* Adjust length: EP0 - MPS, other OUT EPs - multiple of MPS */ in dwc2_hsotg_start_req()
1139 length = mps; in dwc2_hsotg_start_req()
1140 else if (length % mps) in dwc2_hsotg_start_req()
1141 length += (mps - (length % mps)); in dwc2_hsotg_start_req()
1401 /* Don't queue ISOC request if length greater than mps*mc */ in dwc2_hsotg_ep_queue()
1420 dev_err(hs->dev, "ISOC OUT: wrong length %d (mps=%d)\n", in dwc2_hsotg_ep_queue()
2342 u32 mps = hs_ep->ep.maxpacket; in dwc2_gadget_get_xfersize_ddma() local
2348 /* Interrupt OUT EP with mps not multiple of 4 */ in dwc2_gadget_get_xfersize_ddma()
2350 if (usb_endpoint_xfer_int(ep_desc) && !dir_in && (mps % 4)) in dwc2_gadget_get_xfersize_ddma()
2351 bytes_rem_correction = 4 - (mps % 4); in dwc2_gadget_get_xfersize_ddma()
2549 * @mps: The maximum packet size in bytes.
2551 static u32 dwc2_hsotg_ep0_mps(unsigned int mps) in dwc2_hsotg_ep0_mps() argument
2553 switch (mps) { in dwc2_hsotg_ep0_mps()
2573 * @mps: The maximum packet size in bytes
2581 unsigned int ep, unsigned int mps, in dwc2_hsotg_set_ep_maxpacket() argument
2592 u32 mps_bytes = mps; in dwc2_hsotg_set_ep_maxpacket()
2595 mps = dwc2_hsotg_ep0_mps(mps_bytes); in dwc2_hsotg_set_ep_maxpacket()
2596 if (mps > 3) in dwc2_hsotg_set_ep_maxpacket()
2601 if (mps > 1024) in dwc2_hsotg_set_ep_maxpacket()
2606 hs_ep->ep.maxpacket = mps; in dwc2_hsotg_set_ep_maxpacket()
2612 reg |= mps; in dwc2_hsotg_set_ep_maxpacket()
2617 reg |= mps; in dwc2_hsotg_set_ep_maxpacket()
2624 dev_err(hsotg->dev, "ep%d: bad mps of %d\n", ep, mps); in dwc2_hsotg_set_ep_maxpacket()
3184 * not advertise a 64byte MPS on EP0. in dwc2_hsotg_irq_enumdone()
3966 u32 mps; in dwc2_hsotg_ep_enable() local
3976 "%s: ep %s: a 0x%02x, attr 0x%02x, mps 0x%04x, intr %d\n", in dwc2_hsotg_ep_enable()
3993 mps = usb_endpoint_maxp(desc); in dwc2_hsotg_ep_enable()
4039 epctrl |= DXEPCTL_MPS(mps); in dwc2_hsotg_ep_enable()
4048 dwc2_hsotg_set_ep_maxpacket(hsotg, hs_ep->index, mps, mc, dir_in); in dwc2_hsotg_ep_enable()