diff mbox series

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

Message ID 819a32be398efe3d3682d880a392a1fa54cde9df.1555075928.git.arturp@synopsys.com (mailing list archive)
State Superseded
Headers show
Series usb: dwc2: Fix and improve power saving modes. | expand

Commit Message

Artur Petrosyan April 12, 2019, 1:38 p.m. UTC
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(+)
diff mbox series

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;
 }