Lines Matching refs:phy_epnum
502 #define __HAL_PCD_PHYEPNUM_TO_EPADDR(phy_epnum) (((phy_epnum) / 2U) | \ argument
503 ((((phy_epnum) & 0x1U) != 0U) ? EP_DIR_IN : 0U))
667 static enum usb_status dwc3_execute_dep_cmd(dwc3_handle_t *dwc3_handle, uint8_t phy_epnum, in dwc3_execute_dep_cmd() argument
673 VERBOSE("PHYEP%d: cmd '%s' %08x params %08x %08x %08x\n", phy_epnum, in dwc3_execute_dep_cmd()
677 DWC3_regwrite(dwc3_handle->usb_device, DWC3_DEPCMDPAR0(phy_epnum), params->param0); in dwc3_execute_dep_cmd()
678 DWC3_regwrite(dwc3_handle->usb_device, DWC3_DEPCMDPAR1(phy_epnum), params->param1); in dwc3_execute_dep_cmd()
679 DWC3_regwrite(dwc3_handle->usb_device, DWC3_DEPCMDPAR2(phy_epnum), params->param2); in dwc3_execute_dep_cmd()
681 DWC3_regwrite(dwc3_handle->usb_device, DWC3_DEPCMD(phy_epnum), cmd | USB3_DEPCMD_CMDACT); in dwc3_execute_dep_cmd()
685 reg = DWC3_regread(dwc3_handle->usb_device, DWC3_DEPCMD(phy_epnum)); in dwc3_execute_dep_cmd()
689 phy_epnum, reg); in dwc3_execute_dep_cmd()
699 DWC3_DEPCMD_STATUS(reg), phy_epnum, reg); in dwc3_execute_dep_cmd()
708 static bool dwc3_is_ep_enabled(dwc3_handle_t *dwc3_handle, uint8_t phy_epnum) in dwc3_is_ep_enabled() argument
711 DWC3_DALEPENA) & DWC3_DALEPENA_EP(phy_epnum)) != 0U) { in dwc3_is_ep_enabled()
727 VERBOSE("%s PHYEP%d %x\n", __func__, dwc3_ep->phy_epnum, dwc3_ep->flags); in dwc3_ep_start_xfer()
784 ret = dwc3_execute_dep_cmd(dwc3_handle, dwc3_ep->phy_epnum, cmd, ¶ms); in dwc3_ep_start_xfer()
797 DWC3_DEPCMD(dwc3_ep->phy_epnum))); in dwc3_ep_start_xfer()
810 if (!dwc3_is_ep_enabled(dwc3_handle, dwc3_ep->phy_epnum) && ep->num != 0U) { in usb_dwc3_ep_start_xfer()
916 VERBOSE("%s PHYEP%d %x\n", __func__, dwc3_ep->phy_epnum, dwc3_ep->flags); in dwc3_ep_stop_xfer()
931 ret = dwc3_execute_dep_cmd(dwc3_handle, dwc3_ep->phy_epnum, cmd, ¶ms); in dwc3_ep_stop_xfer()
953 return dwc3_execute_dep_cmd(dwc3_handle, dwc3_ep->phy_epnum, USB_DWC3_DEPCMD_SETSTALL, in dwc3_ep_set_stall()
1170 uint8_t phy_epnum = dwc3_read_ep_evt_epnum(event); in dwc3_handle_ep0_xfernotready_event() local
1176 ep_addr = __HAL_PCD_PHYEPNUM_TO_EPADDR(phy_epnum); in dwc3_handle_ep0_xfernotready_event()
1257 uint8_t phy_epnum = dwc3_read_ep_evt_epnum(event); in dwc3_handle_ep_event() local
1263 ep_addr = __HAL_PCD_PHYEPNUM_TO_EPADDR(phy_epnum); in dwc3_handle_ep_event()
1533 return dwc3_execute_dep_cmd(dwc3_handle, dwc3_ep->phy_epnum, USB_DWC3_DEPCMD_CLEARSTALL, in dwc3_ep_clear_stall()
1599 uint16_t binterval, uint8_t phy_epnum, uint8_t intr_num, in dwc3_ep_configure() argument
1629 return dwc3_execute_dep_cmd(dwc3_handle, phy_epnum, USB_DWC3_DEPCMD_SETEPCONFIG, ¶ms); in dwc3_ep_configure()
2349 dwc3_handle->IN_ep[i].phy_epnum = __HAL_PCD_EPADDR_TO_PHYEPNUM(i | EP_DIR_IN); in usb_dwc3_init_driver()
2351 dwc3_handle->IN_ep[i].phy_epnum = 1U; in usb_dwc3_init_driver()
2371 dwc3_handle->OUT_ep[i].phy_epnum = __HAL_PCD_EPADDR_TO_PHYEPNUM(i); in usb_dwc3_init_driver()