Skip to content

Commit 6e7cd22

Browse files
committed
grstctl set fifo + flush in one assign
1 parent f452ab7 commit 6e7cd22

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/portable/synopsys/dwc2/dcd_dwc2.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,8 +796,7 @@ static void dcd_edpt_disable (uint8_t rhport, uint8_t ep_addr, bool stall)
796796
}
797797

798798
// Flush the FIFO, and wait until we have confirmed it cleared.
799-
dwc2->grstctl = (epnum << GRSTCTL_TXFNUM_Pos);
800-
dwc2->grstctl |= GRSTCTL_TXFFLSH;
799+
dwc2->grstctl = ((epnum << GRSTCTL_TXFNUM_Pos) | GRSTCTL_TXFFLSH);
801800
while ( (dwc2->grstctl & GRSTCTL_TXFFLSH_Msk) != 0 ) {}
802801
}
803802
else

0 commit comments

Comments
 (0)