Skip to content

Commit 1f7070f

Browse files
committed
revert(port/dwc2/usb_hc_dwc2): revert 4f831f5 change
Signed-off-by: sakumisu <[email protected]>
1 parent 8d8f3e7 commit 1f7070f

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

port/dwc2/usb_hc_dwc2.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -324,16 +324,11 @@ static inline void dwc2_chan_transfer(struct usbh_bus *bus, uint8_t ch_num, uint
324324
static void dwc2_halt(struct usbh_bus *bus, uint8_t ch_num)
325325
{
326326
volatile uint32_t ChannelEna = (USB_OTG_HC(ch_num)->HCCHAR & USB_OTG_HCCHAR_CHENA) >> 31;
327-
volatile uint32_t HcEpType = (USB_OTG_HC(ch_num)->HCCHAR & USB_OTG_HCCHAR_EPTYP) >> 18;
328-
volatile uint32_t SplitEna = (USB_OTG_HC(ch_num)->HCSPLT & USB_OTG_HCSPLT_SPLITEN) >> 31;
329327
volatile uint32_t count = 0U;
330328
volatile uint32_t value;
331329

332-
/* In buffer DMA, Channel disable must not be programmed for non-split periodic channels.
333-
At the end of the next uframe/frame (in the worst case), the core generates a channel halted
334-
and disables the channel automatically. */
335-
if ((((USB_OTG_GLB->GAHBCFG & USB_OTG_GAHBCFG_DMAEN) == USB_OTG_GAHBCFG_DMAEN) && (SplitEna == 0U)) &&
336-
((ChannelEna == 0U) || (((HcEpType == HCCHAR_ISOC) || (HcEpType == HCCHAR_INTR))))) {
330+
if (((USB_OTG_GLB->GAHBCFG & USB_OTG_GAHBCFG_DMAEN) == USB_OTG_GAHBCFG_DMAEN) &&
331+
(ChannelEna == 0U)) {
337332
return;
338333
}
339334

0 commit comments

Comments
 (0)