[PATCH] Avoid delay when initializing USB peripheral by dwc2

2021-03-17 Thread João Loureiro
er channel = 1s x 15), this patch adds a check to the initialization, and will skip host initialization of the device is explicitly set as peripheral. The checking is already done similarly in the `drivers/usb/gadget/dwc2_udc_otg.c` driver. Signed-off-by: João Loureiro --- drivers/usb/host/

[PATCH] Avoid delay when initializing USB peripheral by dwc2

2021-03-17 Thread João Loureiro
From: João Loureiro When `usb start` is called on the terminal, the dwc2 driver will try to start every USB device as host first, even if it is explicitly configured as peripheral in the device tree (dr_mode = "peripheral"). So to avoid an unwanted 15 seconds delay when initializi

[PATCH] Avoid delay when inializing USB peripheral by dwc2

2021-03-17 Thread João Loureiro
econd per channel = 1s x 15), this patch adds a check to the initialization, and will skip host initialization of the device is explicitly set as peripheral. The checking is already and correctly done similarly in the `drivers/usb/gadget/dwc2_udc_otg.c` driver. Signed-off-by: João Loureiro --- d

[PATCH] Avoid delay when initializing USB peripherals by dwc2

2021-03-17 Thread João Loureiro
tree entry: { compatible = "snps,dwc2"; status = "okay"; dr_mode = "peripheral"; }; Signed-off-by: João Loureiro --- drivers/usb/host/dwc2.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c index ec6