usb: otg-dev: disable and flush endpoints on reset

Only resetting the fifo memory pointers can result in corrupt data.

Tested on f4 disco board with the gadget0 test suite.
This commit is contained in:
Karl Palsson
2015-09-19 21:41:41 +00:00
parent 53c1d2c8d9
commit f49cbee683
2 changed files with 15 additions and 0 deletions

View File

@@ -124,6 +124,7 @@
#define OTG_GRSTCTL_AHBIDL (1 << 31)
/* Bits 30:11 - Reserved */
#define OTG_GRSTCTL_TXFNUM_MASK (0x1f << 6)
#define OTG_GRSTCTL_TXFNUM_ALL (0x10 << 6)
#define OTG_GRSTCTL_TXFFLSH (1 << 5)
#define OTG_GRSTCTL_RXFFLSH (1 << 4)
/* Bit 3 - Reserved */