summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHemant Kumar <hemantk@codeaurora.org>2015-03-29 00:37:04 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:06:49 -0700
commitd8a457b42d7ef205d0c0636449c2af2b292e8c7f (patch)
tree7421e44cc715533616d77a3f21645c9a069ff977 /drivers
parent2991c5cf8cb462971b7eee0d7197aacb8a154451 (diff)
usb: dwc3-msm: Bring controller out of LPM early upon system resume
In case of host initiated usb bus resume upon system suspend controller exits from LPM as part of dwc3 PM resume. Since call to dwc3 PM resume from PM framework involves latency due to which usb device misses the timeline of response for bus resume. This results into host issuing warm reset. Hence bring controller out of LPM in power event irq thread context. Set IRQF_EARLY_RESUME for power event irq which reduces irq level latency by enabling this irq early during system resume. Also, save power event irq time stamp to track latency between hard irq and irq thread. CRs-Fixed: 804476 Change-Id: Ib5470c6046ffbfff55b89e717f040bd6435454da Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/dwc3/core.h1
-rw-r--r--drivers/usb/dwc3/debugfs.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index d377efb32b5c..8997c5c2b44e 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -972,6 +972,7 @@ struct dwc3 {
unsigned bh_handled_evt_cnt[MAX_INTR_STATS];
unsigned bh_dbg_index;
ktime_t irq_start_time[MAX_INTR_STATS];
+ ktime_t t_pwr_evt_irq;
unsigned irq_completion_time[MAX_INTR_STATS];
unsigned irq_event_count[MAX_INTR_STATS];
unsigned irq_dbg_index;
diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c
index fbbcbf04e558..4312a8f86e57 100644
--- a/drivers/usb/dwc3/debugfs.c
+++ b/drivers/usb/dwc3/debugfs.c
@@ -1172,6 +1172,9 @@ static int dwc3_gadget_int_events_show(struct seq_file *s, void *unused)
seq_printf(s, "%d\t", dwc->bh_completion_time[i]);
seq_putc(s, '\n');
+ seq_printf(s, "t_pwr evt irq : %lld\t",
+ ktime_to_us(dwc->t_pwr_evt_irq));
+
spin_unlock_irqrestore(&dwc->lock, flags);
return 0;
}