Patchwork [02/14] usb: dwc2: Add descriptive debug messages for Partial Power Down mode.

login
register
mail settings
Submitter Artur Petrosyan
Date April 12, 2019, 1:38 p.m.
Message ID <819a32be398efe3d3682d880a392a1fa54cde9df.1555075928.git.arturp@synopsys.com>
Download mbox | patch
Permalink /patch/771829/
State New
Headers show

Comments

Artur Petrosyan - April 12, 2019, 1:38 p.m.
Added dev_dbg() messages when entering and exiting from
partial power down. It is now more visible when core
enters partial power down and when exits form it.

Debug messages are added in the following functions.
- dwc2_exit_partial_power_down()
- dwc2_enter_partial_power_down()

Signed-off-by: Artur Petrosyan <arturp@synopsys.com>

---
 drivers/usb/dwc2/core.c | 8 ++++++++
 1 file changed, 8 insertions(+)

-- 
2.11.0

Patch

diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c

index 55d5ae2a7ec7..fb471d18a3de 100644

--- a/drivers/usb/dwc2/core.c

+++ b/drivers/usb/dwc2/core.c

@@ -141,6 +141,8 @@  int dwc2_exit_partial_power_down(struct dwc2_hsotg *hsotg, bool restore)

 	if (hsotg->params.power_down != DWC2_POWER_DOWN_PARAM_PARTIAL)
 		return -ENOTSUPP;
 
+	dev_dbg(hsotg->dev, "Exiting of Partial Power Down started.\n");

+

 	pcgcctl = dwc2_readl(hsotg, PCGCTL);
 	pcgcctl &= ~PCGCTL_STOPPCLK;
 	dwc2_writel(hsotg, pcgcctl, PCGCTL);
@@ -178,6 +180,8 @@  int dwc2_exit_partial_power_down(struct dwc2_hsotg *hsotg, bool restore)

 		}
 	}
 
+	dev_dbg(hsotg->dev, "Exit Partial Power Down completes here.\n");

+

 	return ret;
 }
 
@@ -194,6 +198,8 @@  int dwc2_enter_partial_power_down(struct dwc2_hsotg *hsotg)

 	if (!hsotg->params.power_down)
 		return -ENOTSUPP;
 
+	dev_dbg(hsotg->dev, "Start of Partial Power Down completed\n");

+

 	/* Backup all registers */
 	ret = dwc2_backup_global_registers(hsotg);
 	if (ret) {
@@ -238,6 +244,8 @@  int dwc2_enter_partial_power_down(struct dwc2_hsotg *hsotg)

 	pcgcctl |= PCGCTL_STOPPCLK;
 	dwc2_writel(hsotg, pcgcctl, PCGCTL);
 
+	dev_dbg(hsotg->dev, "Partial Power Down completed\n");

+

 	return ret;
 }