usb: ums: wait for usb cable connection before enter ums mode

Before this change ums mode can not be entered when device
was using the same usb port for usb/uart communication.
Switching USB cable from UART to USB always causes ums exit.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
This commit is contained in:
Przemyslaw Marczak
2014-01-07 15:08:37 +01:00
committed by Marek Vasut
parent 7da7651251
commit 3603e31db5
2 changed files with 27 additions and 0 deletions
+3
View File
@@ -20,6 +20,9 @@
#define UMS_NUM_SECTORS 0
#endif
/* Wait at maximum 60 seconds for cable connection */
#define UMS_CABLE_READY_TIMEOUT 60
struct ums {
int (*read_sector)(struct ums *ums_dev,
ulong start, lbaint_t blkcnt, void *buf);