Tom Rini
2022-07-14 11:10:49 -04:00
29 changed files with 3874 additions and 92 deletions

View File

@@ -19,7 +19,7 @@ static int spl_sdp_load_image(struct spl_image_info *spl_image,
usb_gadget_initialize(controller_index);
board_usb_init(0, USB_INIT_DEVICE);
board_usb_init(controller_index, USB_INIT_DEVICE);
g_dnl_clear_detach();
ret = g_dnl_register("usb_dnl_sdp");

View File

@@ -47,6 +47,8 @@
#define HUB_SHORT_RESET_TIME 20
#define HUB_LONG_RESET_TIME 200
#define HUB_DEBOUNCE_TIMEOUT 1000
#define PORT_OVERCURRENT_MAX_SCAN_COUNT 3
struct usb_device_scan {
@@ -208,10 +210,10 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
* will be done based on this value in the USB port loop in
* usb_hub_configure() later.
*/
hub->connect_timeout = hub->query_delay + 1000;
hub->connect_timeout = hub->query_delay + HUB_DEBOUNCE_TIMEOUT;
debug("devnum=%d poweron: query_delay=%d connect_timeout=%d\n",
dev->devnum, max(100, (int)pgood_delay),
max(100, (int)pgood_delay) + 1000);
max(100, (int)pgood_delay) + HUB_DEBOUNCE_TIMEOUT);
}
#if !CONFIG_IS_ENABLED(DM_USB)

View File

@@ -581,21 +581,22 @@ static int probe_usb_keyboard(struct usb_device *dev)
stdinname = env_get("stdin");
#if CONFIG_IS_ENABLED(CONSOLE_MUX)
error = iomux_doenv(stdin, stdinname);
if (error)
return error;
if (strstr(stdinname, DEVNAME) != NULL) {
error = iomux_doenv(stdin, stdinname);
if (error)
return error;
}
#else
/* Check if this is the standard input device. */
if (strcmp(stdinname, DEVNAME))
return 1;
if (!strcmp(stdinname, DEVNAME)) {
/* Reassign the console */
if (overwrite_console())
return 1;
/* Reassign the console */
if (overwrite_console())
return 1;
error = console_assign(stdin, DEVNAME);
if (error)
return error;
error = console_assign(stdin, DEVNAME);
if (error)
return error;
}
#endif
return 0;