This commit is contained in:
commit
3311e35081
@ -1099,3 +1099,15 @@ config FDT_SIMPLEFB
|
|||||||
|
|
||||||
config IO_TRACE
|
config IO_TRACE
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
config USB_HUB_DEBOUNCE_TIMEOUT
|
||||||
|
int "Timeout in milliseconds for USB HUB connection"
|
||||||
|
depends on USB
|
||||||
|
default 1000
|
||||||
|
help
|
||||||
|
Value in milliseconds of the USB connection timeout, the max delay to
|
||||||
|
wait the hub port status to be connected steadily after being powered
|
||||||
|
off and powered on in the usb hub driver.
|
||||||
|
This define allows to increase the HUB_DEBOUNCE_TIMEOUT default
|
||||||
|
value = 1s because some usb device needs around 1.5s to be initialized
|
||||||
|
and a 2s value should solve detection issue on problematic USB keys.
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
#define HUB_SHORT_RESET_TIME 20
|
#define HUB_SHORT_RESET_TIME 20
|
||||||
#define HUB_LONG_RESET_TIME 200
|
#define HUB_LONG_RESET_TIME 200
|
||||||
|
|
||||||
#define HUB_DEBOUNCE_TIMEOUT 1000
|
#define HUB_DEBOUNCE_TIMEOUT CONFIG_USB_HUB_DEBOUNCE_TIMEOUT
|
||||||
|
|
||||||
#define PORT_OVERCURRENT_MAX_SCAN_COUNT 3
|
#define PORT_OVERCURRENT_MAX_SCAN_COUNT 3
|
||||||
|
|
||||||
|
@ -236,6 +236,14 @@ static int udc_enable(struct dwc2_udc *dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int dwc2_gadget_pullup(struct usb_gadget *g, int is_on)
|
||||||
|
{
|
||||||
|
clrsetbits_le32(®->dctl, SOFT_DISCONNECT,
|
||||||
|
is_on ? 0 : SOFT_DISCONNECT);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#if !CONFIG_IS_ENABLED(DM_USB_GADGET)
|
#if !CONFIG_IS_ENABLED(DM_USB_GADGET)
|
||||||
/*
|
/*
|
||||||
Register entry point for the peripheral controller driver.
|
Register entry point for the peripheral controller driver.
|
||||||
@ -805,6 +813,7 @@ static void dwc2_fifo_flush(struct usb_ep *_ep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct usb_gadget_ops dwc2_udc_ops = {
|
static const struct usb_gadget_ops dwc2_udc_ops = {
|
||||||
|
.pullup = dwc2_gadget_pullup,
|
||||||
/* current versions must always be self-powered */
|
/* current versions must always be self-powered */
|
||||||
#if CONFIG_IS_ENABLED(DM_USB_GADGET)
|
#if CONFIG_IS_ENABLED(DM_USB_GADGET)
|
||||||
.udc_start = dwc2_gadget_start,
|
.udc_start = dwc2_gadget_start,
|
||||||
|
@ -421,6 +421,7 @@ static int fastboot_tx_write_str(const char *buffer)
|
|||||||
|
|
||||||
static void compl_do_reset(struct usb_ep *ep, struct usb_request *req)
|
static void compl_do_reset(struct usb_ep *ep, struct usb_request *req)
|
||||||
{
|
{
|
||||||
|
g_dnl_unregister();
|
||||||
do_reset(NULL, 0, 0, NULL);
|
do_reset(NULL, 0, 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -542,7 +543,6 @@ static void rx_handler_command(struct usb_ep *ep, struct usb_request *req)
|
|||||||
case FASTBOOT_COMMAND_REBOOT_FASTBOOTD:
|
case FASTBOOT_COMMAND_REBOOT_FASTBOOTD:
|
||||||
case FASTBOOT_COMMAND_REBOOT_RECOVERY:
|
case FASTBOOT_COMMAND_REBOOT_RECOVERY:
|
||||||
fastboot_func->in_req->complete = compl_do_reset;
|
fastboot_func->in_req->complete = compl_do_reset;
|
||||||
g_dnl_trigger_detach();
|
|
||||||
break;
|
break;
|
||||||
case FASTBOOT_COMMAND_ACMD:
|
case FASTBOOT_COMMAND_ACMD:
|
||||||
if (CONFIG_IS_ENABLED(FASTBOOT_UUU_SUPPORT))
|
if (CONFIG_IS_ENABLED(FASTBOOT_UUU_SUPPORT))
|
||||||
|
Loading…
Reference in New Issue
Block a user