diff --git a/drivers/usb/dwc3/dwc3-msm.c b/drivers/usb/dwc3/dwc3-msm.c index 827645667810..70265c74fa4e 100644 --- a/drivers/usb/dwc3/dwc3-msm.c +++ b/drivers/usb/dwc3/dwc3-msm.c @@ -44,6 +44,9 @@ #include #include #include +#ifdef CONFIG_QGKI_MSM_BOOT_TIME_MARKER +#include +#endif #include "core.h" #include "gadget.h" @@ -3810,6 +3813,14 @@ static irqreturn_t msm_dwc3_pwr_irq(int irq, void *data) dwc->t_pwr_evt_irq = ktime_get(); dev_dbg(mdwc->dev, "%s received\n", __func__); + + if (mdwc->drd_state == DRD_STATE_PERIPHERAL_SUSPEND) { + dev_info(mdwc->dev, "USB Resume start\n"); +#ifdef CONFIG_QGKI_MSM_BOOT_TIME_MARKER + place_marker("M - USB device resume started"); +#endif + } + /* * When in Low Power Mode, can't read PWR_EVNT_IRQ_STAT_REG to acertain * which interrupts have been triggered, as the clocks are disabled. @@ -5842,6 +5853,14 @@ static int dwc3_msm_pm_resume(struct device *dev) atomic_set(&mdwc->pm_suspended, 0); + if (atomic_read(&dwc->in_lpm) && + mdwc->drd_state == DRD_STATE_PERIPHERAL_SUSPEND) { + dev_info(mdwc->dev, "USB Resume start\n"); +#ifdef CONFIG_QGKI_MSM_BOOT_TIME_MARKER + place_marker("M - USB device resume started"); +#endif + } + if (!mdwc->in_host_mode) { /* kick in otg state machine */ queue_work(mdwc->dwc3_wq, &mdwc->resume_work); diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 6169ea071766..d98f8e4d3fd3 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -13,6 +13,9 @@ #include #include #include +#ifdef CONFIG_QGKI_MSM_BOOT_TIME_MARKER +#include +#endif #include #include @@ -889,6 +892,9 @@ static int set_config(struct usb_composite_dev *cdev, if (!c) goto done; +#ifdef CONFIG_QGKI_MSM_BOOT_TIME_MARKER + place_marker("M - USB Device is enumerated"); +#endif usb_gadget_set_state(gadget, USB_STATE_CONFIGURED); cdev->config = c; @@ -2413,7 +2419,10 @@ void composite_resume(struct usb_gadget *gadget) /* REVISIT: should we have config level * suspend/resume callbacks? */ - DBG(cdev, "resume\n"); + INFO(cdev, "USB Resume end\n"); +#ifdef CONFIG_QGKI_MSM_BOOT_TIME_MARKER + place_marker("M - USB Device is resumed"); +#endif if (cdev->driver->resume) cdev->driver->resume(cdev); if (cdev->config) {