summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2025-06-23 20:12:28 +0800
committersakumisu <[email protected]>2025-06-23 20:12:34 +0800
commit1f7070f5c9cc2ff5a0367b613211f0693e813619 (patch)
tree6223514c4985ee8395fbac44991b6df1025210fd
parent8d8f3e757efda3d7eb228012b3aacdb29ecca9ff (diff)
revert(port/dwc2/usb_hc_dwc2): revert 4f831f58 change
Signed-off-by: sakumisu <[email protected]>
-rw-r--r--port/dwc2/usb_hc_dwc2.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/port/dwc2/usb_hc_dwc2.c b/port/dwc2/usb_hc_dwc2.c
index 46effd56..5ac59507 100644
--- a/port/dwc2/usb_hc_dwc2.c
+++ b/port/dwc2/usb_hc_dwc2.c
@@ -324,16 +324,11 @@ static inline void dwc2_chan_transfer(struct usbh_bus *bus, uint8_t ch_num, uint
static void dwc2_halt(struct usbh_bus *bus, uint8_t ch_num)
{
volatile uint32_t ChannelEna = (USB_OTG_HC(ch_num)->HCCHAR & USB_OTG_HCCHAR_CHENA) >> 31;
- volatile uint32_t HcEpType = (USB_OTG_HC(ch_num)->HCCHAR & USB_OTG_HCCHAR_EPTYP) >> 18;
- volatile uint32_t SplitEna = (USB_OTG_HC(ch_num)->HCSPLT & USB_OTG_HCSPLT_SPLITEN) >> 31;
volatile uint32_t count = 0U;
volatile uint32_t value;
- /* In buffer DMA, Channel disable must not be programmed for non-split periodic channels.
- At the end of the next uframe/frame (in the worst case), the core generates a channel halted
- and disables the channel automatically. */
- if ((((USB_OTG_GLB->GAHBCFG & USB_OTG_GAHBCFG_DMAEN) == USB_OTG_GAHBCFG_DMAEN) && (SplitEna == 0U)) &&
- ((ChannelEna == 0U) || (((HcEpType == HCCHAR_ISOC) || (HcEpType == HCCHAR_INTR))))) {
+ if (((USB_OTG_GLB->GAHBCFG & USB_OTG_GAHBCFG_DMAEN) == USB_OTG_GAHBCFG_DMAEN) &&
+ (ChannelEna == 0U)) {
return;
}