All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artur Petrosyan <Arthur.Petrosyan@synopsys.com>
To: Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Cc: John Youn <John.Youn@synopsys.com>,
	Artur Petrosyan <Arthur.Petrosyan@synopsys.com>
Subject: [v1,13/14] usb: dwc2: Clear GINTSTS_RESTOREDONE bit after restore is generated.
Date: Fri, 19 Apr 2019 11:25:38 +0000	[thread overview]
Message-ID: <73d2c9aca58e7cac50d02bbbd853c23ab0463b48.1555672441.git.arturp@synopsys.com> (raw)

When hibernation exit is performed the dwc2_hib_restore_common()
function is called. In that function we wait until GINTSTS_RESTOREDONE
bit is set. However, after the setting of that bit we get a lot of
(dwc2_hsotg_irq:) interrupts which indicates that (GINTSTS.RstrDoneInt)
restore done interrupt is asserted.

To avoid restore done interrupt storm after restore is generated
clear GINTSTS_RESTOREDONE bit in GINTSTS register.

Signed-off-by: Artur Petrosyan <arturp@synopsys.com>
---
 drivers/usb/dwc2/core.c | 6 ++++++
 1 file changed, 6 insertions(+)

-- 
2.11.0

diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index fbbd6a2f10ad..18ea0d896e12 100644
--- a/drivers/usb/dwc2/core.c
+++ b/drivers/usb/dwc2/core.c
@@ -382,6 +382,12 @@ void dwc2_hib_restore_common(struct dwc2_hsotg *hsotg, int rem_wakeup,
 			__func__);
 	} else {
 		dev_dbg(hsotg->dev, "restore done  generated here\n");
+
+		/*
+		 * To avoid restore done interrupt storm after restore is
+		 * generated clear GINTSTS_RESTOREDONE bit.
+		 */
+		dwc2_writel(hsotg, GINTSTS_RESTOREDONE, GINTSTS);
 	}
 }
 

WARNING: multiple messages have this Message-ID (diff)
From: Artur Petrosyan <Arthur.Petrosyan@synopsys.com>
To: Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Cc: John Youn <John.Youn@synopsys.com>,
	Artur Petrosyan <Arthur.Petrosyan@synopsys.com>
Subject: [PATCH v1 13/14] usb: dwc2: Clear GINTSTS_RESTOREDONE bit after restore is generated.
Date: Fri, 19 Apr 2019 11:25:38 +0000	[thread overview]
Message-ID: <73d2c9aca58e7cac50d02bbbd853c23ab0463b48.1555672441.git.arturp@synopsys.com> (raw)
Message-ID: <20190419112538.hpaZA1HCgK3v4yX-8koAyDJWoMwegKalGnzvTK63VfI@z> (raw)
In-Reply-To: <cover.1555672441.git.arturp@synopsys.com>

When hibernation exit is performed the dwc2_hib_restore_common()
function is called. In that function we wait until GINTSTS_RESTOREDONE
bit is set. However, after the setting of that bit we get a lot of
(dwc2_hsotg_irq:) interrupts which indicates that (GINTSTS.RstrDoneInt)
restore done interrupt is asserted.

To avoid restore done interrupt storm after restore is generated
clear GINTSTS_RESTOREDONE bit in GINTSTS register.

Signed-off-by: Artur Petrosyan <arturp@synopsys.com>
---
 drivers/usb/dwc2/core.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index fbbd6a2f10ad..18ea0d896e12 100644
--- a/drivers/usb/dwc2/core.c
+++ b/drivers/usb/dwc2/core.c
@@ -382,6 +382,12 @@ void dwc2_hib_restore_common(struct dwc2_hsotg *hsotg, int rem_wakeup,
 			__func__);
 	} else {
 		dev_dbg(hsotg->dev, "restore done  generated here\n");
+
+		/*
+		 * To avoid restore done interrupt storm after restore is
+		 * generated clear GINTSTS_RESTOREDONE bit.
+		 */
+		dwc2_writel(hsotg, GINTSTS_RESTOREDONE, GINTSTS);
 	}
 }
 
-- 
2.11.0


             reply	other threads:[~2019-04-19 11:25 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-19 11:25 Artur Petrosyan [this message]
2019-04-19 11:25 ` [PATCH v1 13/14] usb: dwc2: Clear GINTSTS_RESTOREDONE bit after restore is generated Artur Petrosyan
  -- strict thread matches above, loose matches on Subject: below --
2019-05-03  8:13 [v1,04/14] usb: dwc2: Fix suspend state in host mode for partial power down Artur Petrosyan
2019-05-03  8:13 ` [PATCH v1 04/14] " Artur Petrosyan
2019-05-03  7:58 [v1,08/14] usb: dwc2: Add default param to control power optimization Artur Petrosyan
2019-05-03  7:58 ` [PATCH v1 08/14] " Artur Petrosyan
2019-05-01  1:54 [v1,04/14] usb: dwc2: Fix suspend state in host mode for partial power down Doug Anderson
2019-05-01  1:54 ` [PATCH v1 04/14] " Doug Anderson
2019-04-30 15:23 [v1,08/14] usb: dwc2: Add default param to control power optimization Doug Anderson
2019-04-30 15:23 ` [PATCH v1 08/14] " Doug Anderson
2019-04-30 13:06 [v1,14/14] usb: dwc2: Add enter/exit hibernation from system issued suspend/resume Artur Petrosyan
2019-04-30 13:06 ` [PATCH v1 14/14] " Artur Petrosyan
2019-04-30 12:45 [v1,08/14] usb: dwc2: Add default param to control power optimization Artur Petrosyan
2019-04-30 12:45 ` [PATCH v1 08/14] " Artur Petrosyan
2019-04-30  7:10 [v1,04/14] usb: dwc2: Fix suspend state in host mode for partial power down Artur Petrosyan
2019-04-30  7:10 ` [PATCH v1 04/14] " Artur Petrosyan
2019-04-29 17:42 [v1,14/14] usb: dwc2: Add enter/exit hibernation from system issued suspend/resume Doug Anderson
2019-04-29 17:42 ` [PATCH v1 14/14] " Doug Anderson
2019-04-29 17:40 [v1,08/14] usb: dwc2: Add default param to control power optimization Doug Anderson
2019-04-29 17:40 ` [PATCH v1 08/14] " Doug Anderson
2019-04-29 17:35 [v1,04/14] usb: dwc2: Fix suspend state in host mode for partial power down Doug Anderson
2019-04-29 17:35 ` [PATCH v1 04/14] " Doug Anderson
2019-04-29 12:01 [v1,14/14] usb: dwc2: Add enter/exit hibernation from system issued suspend/resume Artur Petrosyan
2019-04-29 12:01 ` [PATCH v1 14/14] " Artur Petrosyan
2019-04-29 11:35 [v1,09/14] usb: dwc2: Update dwc2_handle_usb_suspend_intr function Artur Petrosyan
2019-04-29 11:35 ` [PATCH v1 09/14] " Artur Petrosyan
2019-04-29 11:29 [v1,08/14] usb: dwc2: Add default param to control power optimization Artur Petrosyan
2019-04-29 11:29 ` [PATCH v1 08/14] " Artur Petrosyan
2019-04-29 11:03 [v1,04/14] usb: dwc2: Fix suspend state in host mode for partial power down Artur Petrosyan
2019-04-29 11:03 ` [PATCH v1 04/14] " Artur Petrosyan
2019-04-29 10:54 [v1,03/14] usb: dwc2: Fix wakeup detected and session request interrupt handlers Artur Petrosyan
2019-04-29 10:54 ` [PATCH v1 03/14] " Artur Petrosyan
2019-04-26 21:00 [v1,14/14] usb: dwc2: Add enter/exit hibernation from system issued suspend/resume Doug Anderson
2019-04-26 21:00 ` [PATCH v1 14/14] " Doug Anderson
2019-04-26 20:51 [v1,12/14] usb: dwc2: Clear fifo_map when resetting core Doug Anderson
2019-04-26 20:51 ` [PATCH v1 12/14] " Doug Anderson
2019-04-26 20:51 [v1,09/14] usb: dwc2: Update dwc2_handle_usb_suspend_intr function Doug Anderson
2019-04-26 20:51 ` [PATCH v1 09/14] " Doug Anderson
2019-04-26 20:46 [v1,08/14] usb: dwc2: Add default param to control power optimization Doug Anderson
2019-04-26 20:46 ` [PATCH v1 08/14] " Doug Anderson
2019-04-26 20:45 [v1,06/14] usb: dwc2: Add part. power down exit from dwc2_conn_id_status_change() Doug Anderson
2019-04-26 20:45 ` [PATCH v1 06/14] " Doug Anderson
2019-04-26 20:45 [v1,05/14] usb: dwc2: Add port conn. sts. checking in _dwc2_hcd_resume() function Doug Anderson
2019-04-26 20:45 ` [PATCH v1 05/14] " Doug Anderson
2019-04-26 20:44 [v1,04/14] usb: dwc2: Fix suspend state in host mode for partial power down Doug Anderson
2019-04-26 20:44 ` [PATCH v1 04/14] " Doug Anderson
2019-04-26 20:44 [v1,03/14] usb: dwc2: Fix wakeup detected and session request interrupt handlers Doug Anderson
2019-04-26 20:44 ` [PATCH v1 03/14] " Doug Anderson
2019-04-19 11:25 [v1,14/14] usb: dwc2: Add enter/exit hibernation from system issued suspend/resume Artur Petrosyan
2019-04-19 11:25 ` [PATCH v1 14/14] " Artur Petrosyan
2019-04-19 11:25 [v1,12/14] usb: dwc2: Clear fifo_map when resetting core Artur Petrosyan
2019-04-19 11:25 ` [PATCH v1 12/14] " Artur Petrosyan
2019-04-19 11:25 [v1,11/14] usb: dwc2: Allow exiting hibernation from gpwrdn rst detect Artur Petrosyan
2019-04-19 11:25 ` [PATCH v1 11/14] " Artur Petrosyan
2019-04-19 11:25 [v1,10/14] usb: dwc2: Fix hibernation between host and device modes Artur Petrosyan
2019-04-19 11:25 ` [PATCH v1 10/14] " Artur Petrosyan
2019-04-19 11:24 [v1,09/14] usb: dwc2: Update dwc2_handle_usb_suspend_intr function Artur Petrosyan
2019-04-19 11:24 ` [PATCH v1 09/14] " Artur Petrosyan
2019-04-19 11:24 [v1,08/14] usb: dwc2: Add default param to control power optimization Artur Petrosyan
2019-04-19 11:24 ` [PATCH v1 08/14] " Artur Petrosyan
2019-04-19 11:24 [v1,07/14] usb: dwc2: Reset DEVADDR after exiting gadget hibernation Artur Petrosyan
2019-04-19 11:24 ` [PATCH v1 07/14] " Artur Petrosyan
2019-04-19 11:24 [v1,06/14] usb: dwc2: Add part. power down exit from dwc2_conn_id_status_change() Artur Petrosyan
2019-04-19 11:24 ` [PATCH v1 06/14] " Artur Petrosyan
2019-04-19 11:24 [v1,05/14] usb: dwc2: Add port conn. sts. checking in _dwc2_hcd_resume() function Artur Petrosyan
2019-04-19 11:24 ` [PATCH v1 05/14] " Artur Petrosyan
2019-04-19 11:24 [v1,04/14] usb: dwc2: Fix suspend state in host mode for partial power down Artur Petrosyan
2019-04-19 11:24 ` [PATCH v1 04/14] " Artur Petrosyan
2019-04-19 11:23 [v1,03/14] usb: dwc2: Fix wakeup detected and session request interrupt handlers Artur Petrosyan
2019-04-19 11:23 ` [PATCH v1 03/14] " Artur Petrosyan
2019-04-19 11:23 [v1,02/14] usb: dwc2: Add descriptive debug messages for Partial Power Down mode Artur Petrosyan
2019-04-19 11:23 ` [PATCH v1 02/14] " Artur Petrosyan
2019-04-19 11:23 [v1,01/14] usb: dwc2: Fix dwc2_restore_device_registers() function Artur Petrosyan
2019-04-19 11:23 ` [PATCH v1 01/14] " Artur Petrosyan
2019-04-19 11:23 [PATCH v1 00/14] usb: dwc2: Fix and improve power saving modes Artur Petrosyan
2019-04-25 12:43 ` Felipe Balbi
2019-04-25 14:00   ` Artur Petrosyan
2019-04-25 20:12     ` Doug Anderson
2019-04-26  7:10       ` Artur Petrosyan
2019-04-26 16:01         ` Doug Anderson
2019-04-26 21:06           ` Doug Anderson
2019-04-29 12:05             ` Artur Petrosyan
2019-04-29 17:43               ` Doug Anderson
2019-04-29  8:44           ` Artur Petrosyan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73d2c9aca58e7cac50d02bbbd853c23ab0463b48.1555672441.git.arturp@synopsys.com \
    --to=arthur.petrosyan@synopsys.com \
    --cc=John.Youn@synopsys.com \
    --cc=Minas.Harutyunyan@synopsys.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.