[U-Boot] [PATCH] ums: respect CONFIG_USB_CABLE_CHECK
Stephen Warren
swarren at wwwdotorg.org
Wed Apr 30 23:10:35 CEST 2014
From: Stephen Warren <swarren at nvidia.com>
Not all boards support usb_cable_connected(). CONFIG_USB_CABLE_CHECK is
used elsewhere to indicate whether a board does support that function.
Enhance cmd_usb_mass_storage.c to honor that config variable.
Cc: Przemyslaw Marczak <p.marczak at samsung.com>
Cc: Lukasz Majewski <l.majewski at samsung.com>
Signed-off-by: Stephen Warren <swarren at nvidia.com>
---
common/cmd_usb_mass_storage.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/common/cmd_usb_mass_storage.c b/common/cmd_usb_mass_storage.c
index 5f557d5f857d..2f69a53acc67 100644
--- a/common/cmd_usb_mass_storage.c
+++ b/common/cmd_usb_mass_storage.c
@@ -42,6 +42,7 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
g_dnl_register("ums");
+#ifdef CONFIG_USB_CABLE_CHECK
/* Timeout unit: seconds */
int cable_ready_timeout = UMS_CABLE_READY_TIMEOUT;
@@ -65,6 +66,7 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
}
puts("\r\n");
}
+#endif
while (1) {
usb_gadget_handle_interrupts();
--
1.8.1.5
More information about the U-Boot
mailing list