From 2e57f1da64abe0772a8afa499c00390b04aaed15 Mon Sep 17 00:00:00 2001 From: lyz Date: Mon, 16 Mar 2015 17:11:48 +0800 Subject: [PATCH] usb: dwc_otg: fix bug in device_init routine 1.wait epenable bit timeout decrease from 10s to 1s 2.fix bug, without 'j++' this loop never break if there is some problem with ep state --- drivers/usb/dwc_otg_310/dwc_otg_cil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc_otg_310/dwc_otg_cil.c b/drivers/usb/dwc_otg_310/dwc_otg_cil.c index fc347d04615b..dae6550634c1 100755 --- a/drivers/usb/dwc_otg_310/dwc_otg_cil.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_cil.c @@ -2262,9 +2262,9 @@ void dwc_otg_core_dev_init(dwc_otg_core_if_t *core_if) DWC_READ_REG32(&core_if-> dev_if->out_ep_regs[i]-> doepint); - if (j == 100000) { + if (j++ >= 10000) { DWC_ERROR - ("EPDIS was not set during 10s\n"); + ("EPDIS was not set during 1s\n"); break; } } while (!doepint.b.epdisabled); -- 2.34.1