aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/s3c-hsotg.c
diff options
context:
space:
mode:
authorDu, Changbin <changbin.du@gmail.com>2012-07-23 20:19:25 -0400
committerFelipe Balbi <balbi@ti.com>2012-08-23 04:04:18 -0400
commit2868fea2d615d9f445a0ccaf988e1418a9787ebe (patch)
treefec590a434a9cf1a52155ec00a4edd971eb5e76b /drivers/usb/gadget/s3c-hsotg.c
parent4fefe9f6de3d6e0b5e58b17cbab9c47c74f88cb6 (diff)
usb: gadget: s3c-hsotg: fix core reset timeout failure
The timeout values were 1000 and timeout issue occured many times on my s3c6410 Soc based board (mostly when booting whith USB cable not connected). This patch increase the values to 10000 to guarantee the success of reset. Having set timeout to 10000, I printed the remained timeout values which could cause timeout issue before this change (tested several times). the first timeout value remained: timeout = 8079 timeout = 8079 timeout = 8078 timeout = 8081 the second timeout value remained: timeout = 7940 timeout = 7945 timeout = 7940 timeout = 7938 Seeing from above values, I think the value 10000 is big enough. Signed-off-by: Du, Changbin <changbin.du@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/s3c-hsotg.c')
-rw-r--r--drivers/usb/gadget/s3c-hsotg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
index b13e0bb5f5b8..a826cb98d306 100644
--- a/drivers/usb/gadget/s3c-hsotg.c
+++ b/drivers/usb/gadget/s3c-hsotg.c
@@ -2197,7 +2197,7 @@ static int s3c_hsotg_corereset(struct s3c_hsotg *hsotg)
2197 /* issue soft reset */ 2197 /* issue soft reset */
2198 writel(GRSTCTL_CSftRst, hsotg->regs + GRSTCTL); 2198 writel(GRSTCTL_CSftRst, hsotg->regs + GRSTCTL);
2199 2199
2200 timeout = 1000; 2200 timeout = 10000;
2201 do { 2201 do {
2202 grstctl = readl(hsotg->regs + GRSTCTL); 2202 grstctl = readl(hsotg->regs + GRSTCTL);
2203 } while ((grstctl & GRSTCTL_CSftRst) && timeout-- > 0); 2203 } while ((grstctl & GRSTCTL_CSftRst) && timeout-- > 0);
@@ -2207,7 +2207,7 @@ static int s3c_hsotg_corereset(struct s3c_hsotg *hsotg)
2207 return -EINVAL; 2207 return -EINVAL;
2208 } 2208 }
2209 2209
2210 timeout = 1000; 2210 timeout = 10000;
2211 2211
2212 while (1) { 2212 while (1) {
2213 u32 grstctl = readl(hsotg->regs + GRSTCTL); 2213 u32 grstctl = readl(hsotg->regs + GRSTCTL);