From: Razmik Karapetyan <razmik@xxxxxxxxxxxx> Backup PCGCCTL1 register when entering hibernation mode and restore it after exiting from hibernation, to keep active ACG feature. Signed-off-by: Razmik Karapetyan <razmik@xxxxxxxxxxxx> Signed-off-by: Grigor Tovmasyan <tovmasya@xxxxxxxxxxxx> --- drivers/usb/dwc2/core.c | 2 ++ drivers/usb/dwc2/core.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index 8d9ffde6b68a..7a236e61e2e2 100644 --- a/drivers/usb/dwc2/core.c +++ b/drivers/usb/dwc2/core.c @@ -80,6 +80,7 @@ static int dwc2_backup_global_registers(struct dwc2_hsotg *hsotg) gr->gnptxfsiz = dwc2_readl(hsotg->regs + GNPTXFSIZ); gr->hptxfsiz = dwc2_readl(hsotg->regs + HPTXFSIZ); gr->gdfifocfg = dwc2_readl(hsotg->regs + GDFIFOCFG); + gr->pcgcctl1 = dwc2_readl(hsotg->regs + PCGCCTL1); for (i = 0; i < MAX_EPS_CHANNELS; i++) gr->dtxfsiz[i] = dwc2_readl(hsotg->regs + DPTXFSIZN(i)); @@ -119,6 +120,7 @@ static int dwc2_restore_global_registers(struct dwc2_hsotg *hsotg) dwc2_writel(gr->gnptxfsiz, hsotg->regs + GNPTXFSIZ); dwc2_writel(gr->hptxfsiz, hsotg->regs + HPTXFSIZ); dwc2_writel(gr->gdfifocfg, hsotg->regs + GDFIFOCFG); + dwc2_writel(gr->pcgcctl1, hsotg->regs + PCGCCTL1); for (i = 0; i < MAX_EPS_CHANNELS; i++) dwc2_writel(gr->dtxfsiz[i], hsotg->regs + DPTXFSIZN(i)); diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index 35a971436c71..1ec0dd4d5c95 100644 --- a/drivers/usb/dwc2/core.h +++ b/drivers/usb/dwc2/core.h @@ -624,6 +624,7 @@ struct dwc2_gregs_backup { u32 gi2cctl; u32 hptxfsiz; u32 pcgcctl; + u32 pcgcctl1; u32 gdfifocfg; u32 dtxfsiz[MAX_EPS_CHANNELS]; u32 gpwrdn; -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html