summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Yan <b34916@freescale.com>2011-01-25 16:31:00 +0800
committerAlan Tull <alan.tull@freescale.com>2011-02-03 16:45:07 -0600
commita4e6f5dba3859e6ae5261d07577ac3c5dc883234 (patch)
tree591dfaee6561b7b52da3b68c2ee97cc1edf64f60
parent22b4f6339b794ec8b0985dbf4da6d3615118f891 (diff)
ENGR00138477 USB: perfect usb debug file
Open usb clock before view usb debug file. avoid system hang when view usb debug information in suspend state. Signed-off-by: Zhang Yan <b34916@freescale.com>
-rw-r--r--drivers/usb/gadget/arcotg_udc.c10
-rw-r--r--drivers/usb/otg/fsl_otg.c3
2 files changed, 8 insertions, 5 deletions
diff --git a/drivers/usb/gadget/arcotg_udc.c b/drivers/usb/gadget/arcotg_udc.c
index 4e9e356c4611..d1f9af2675b5 100644
--- a/drivers/usb/gadget/arcotg_udc.c
+++ b/drivers/usb/gadget/arcotg_udc.c
@@ -2391,6 +2391,7 @@ static int fsl_proc_read(char *page, char **start, off_t off, int count,
if (off != 0)
return 0;
+ dr_clk_gate(true);
spin_lock_irqsave(&udc->lock, flags);
/* ------basic driver infomation ---- */
@@ -2613,12 +2614,13 @@ static int fsl_proc_read(char *page, char **start, off_t off, int count,
req->req.length, req->req.buf);
size -= t;
next += t;
- } /* end for each_entry of ep req */
- } /* end for else */
- } /* end for if(ep->queue) */
- } /* end (ep->desc) */
+ } /* end for each_entry of ep req */
+ } /* end for else */
+ } /* end for if(ep->queue) */
+ } /* end (ep->desc) */
spin_unlock_irqrestore(&udc->lock, flags);
+ dr_clk_gate(false);
*eof = 1;
return count - size;
diff --git a/drivers/usb/otg/fsl_otg.c b/drivers/usb/otg/fsl_otg.c
index 9fe5eb7ae8ed..51f1df4b0531 100644
--- a/drivers/usb/otg/fsl_otg.c
+++ b/drivers/usb/otg/fsl_otg.c
@@ -1088,6 +1088,7 @@ static int otg_proc_read(char *page, char **start, off_t off, int count,
if (off != 0)
return 0;
+ fsl_otg_clk_gate(true);
spin_lock_irqsave(&fsm->lock, flags);
/* ------basic driver infomation ---- */
@@ -1192,8 +1193,8 @@ static int otg_proc_read(char *page, char **start, off_t off, int count,
size -= t;
next += t;
#endif
-
spin_unlock_irqrestore(&fsm->lock, flags);
+ fsl_otg_clk_gate(false);
*eof = 1;
return count - size;