linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang@amd.com>
To: Felipe Balbi <balbi@ti.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Paul Zimmerman <Paul.Zimmerman@synopsys.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Vincent Wan <vincent.wan@amd.com>, Tony Li <tony.li@amd.com>,
	<linux-usb@vger.kernel.org>, <linux-pci@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, Huang Rui <ray.huang@amd.com>
Subject: [PATCH v2 11/16] usb: dwc3: add delay p1p2p3 quirk
Date: Fri, 17 Oct 2014 16:53:36 +0800	[thread overview]
Message-ID: <1413536021-4886-12-git-send-email-ray.huang@amd.com> (raw)
In-Reply-To: <1413536021-4886-1-git-send-email-ray.huang@amd.com>

AMD NL needs to delay P0 to P1/P2/P3 request when entering U1/U2/U3.

Signed-off-by: Huang Rui <ray.huang@amd.com>
---
 drivers/usb/dwc3/core.c          | 3 +++
 drivers/usb/dwc3/core.h          | 2 ++
 drivers/usb/dwc3/dwc3-pci.c      | 3 ++-
 drivers/usb/dwc3/platform_data.h | 1 +
 4 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index ec8b667..a9f1d4c 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -380,6 +380,9 @@ static void dwc3_phy_setup(struct dwc3 *dwc)
 	if (dwc->quirks & DWC3_QUIRK_REQP1P2P3)
 		reg |= DWC3_GUSB3PIPECTL_REQP1P2P3;
 
+	if (dwc->quirks & DWC3_QUIRK_DEPP1P2P3)
+		reg |= DWC3_GUSB3PIPECTL_DEP1P2P3(1);
+
 	dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg);
 
 	mdelay(100);
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 8f47ade18..cf70fa6 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -178,6 +178,8 @@
 #define DWC3_GUSB3PIPECTL_PHYSOFTRST	(1 << 31)
 #define DWC3_GUSB3PIPECTL_U2SSINP3OK	(1 << 29)
 #define DWC3_GUSB3PIPECTL_REQP1P2P3	(1 << 24)
+#define DWC3_GUSB3PIPECTL_DEP1P2P3_MASK	DWC3_GUSB3PIPECTL_DEP1P2P3(7)
+#define DWC3_GUSB3PIPECTL_DEP1P2P3(n)	((n) << 19)
 #define DWC3_GUSB3PIPECTL_SUSPHY	(1 << 17)
 
 /* Global TX Fifo Size Register */
diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
index 7154d18..23ae6a7 100644
--- a/drivers/usb/dwc3/dwc3-pci.c
+++ b/drivers/usb/dwc3/dwc3-pci.c
@@ -152,7 +152,8 @@ static int dwc3_pci_probe(struct pci_dev *pci,
 		dwc3_pdata.quirks |= DWC3_QUIRK_AMD_NL
 			| DWC3_QUIRK_U2EXIT_LFPS
 			| DWC3_QUIRK_U2SSINP3OK
-			| DWC3_QUIRK_REQP1P2P3;
+			| DWC3_QUIRK_REQP1P2P3
+			| DWC3_QUIRK_DEPP1P2P3;
 	}
 
 	ret = platform_device_add_resources(dwc3, res, ARRAY_SIZE(res));
diff --git a/drivers/usb/dwc3/platform_data.h b/drivers/usb/dwc3/platform_data.h
index 850883f..e668c1f 100644
--- a/drivers/usb/dwc3/platform_data.h
+++ b/drivers/usb/dwc3/platform_data.h
@@ -33,5 +33,6 @@ struct dwc3_platform_data {
 #define DWC3_QUIRK_U2EXIT_LFPS		(1 << 2)
 #define DWC3_QUIRK_U2SSINP3OK		(1 << 3)
 #define DWC3_QUIRK_REQP1P2P3		(1 << 4)
+#define DWC3_QUIRK_DEPP1P2P3		(1 << 5)
 
 };
-- 
1.9.1


  parent reply	other threads:[~2014-10-17  9:15 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-17  8:53 [PATCH v2 00/16] usb: dwc3: add support for AMD NL SoC Huang Rui
2014-10-17  8:53 ` [PATCH v2 01/16] usb: dwc3: add AMD NL support Huang Rui
2014-10-17 15:00   ` Felipe Balbi
2014-10-17  8:53 ` [PATCH v2 02/16] pci: quirks: add quirk to avoid AMD NL to bind with xhci Huang Rui
2014-10-24 16:35   ` Bjorn Helgaas
2014-10-27  2:55     ` Huang Rui
2014-10-27 13:21       ` Bjorn Helgaas
2014-10-17  8:53 ` [PATCH v2 03/16] usb: dwc3: enable hibernation if to be supported Huang Rui
2014-10-17  8:53 ` [PATCH v2 04/16] usb: dwc3: add a flag to check if it is fpga board Huang Rui
2014-10-17  8:53 ` [PATCH v2 05/16] usb: dwc3: add quirks support to be compatible for kinds of SoCs Huang Rui
2014-10-17 14:41   ` Felipe Balbi
2014-10-20  6:02     ` Huang Rui
2014-10-24 15:25       ` Felipe Balbi
2014-10-17  8:53 ` [PATCH v2 06/16] usb: dwc3: add disscramble quirk Huang Rui
2014-10-17 14:45   ` Felipe Balbi
2014-10-20  6:38     ` Huang Rui
2014-10-24 15:26       ` Felipe Balbi
2014-10-17  8:53 ` [PATCH v2 07/16] usb: dwc3: add lpm erratum support Huang Rui
2014-10-17 14:48   ` Felipe Balbi
2014-10-24 17:01     ` Huang Rui
2014-10-24 17:35       ` Felipe Balbi
2014-10-17  8:53 ` [PATCH v2 08/16] usb: dwc3: add u2exit lfps quirk Huang Rui
2014-10-17 14:50   ` Felipe Balbi
2014-10-20  6:43     ` Huang Rui
2014-10-24 15:27       ` Felipe Balbi
2014-10-17  8:53 ` [PATCH v2 09/16] usb: dwc3: add P3 in U2 SS inactive quirk Huang Rui
2014-10-17 14:52   ` Felipe Balbi
2014-10-17  8:53 ` [PATCH v2 10/16] usb: dwc3: add request p1p2p3 quirk Huang Rui
2014-10-17 14:53   ` Felipe Balbi
2014-10-17  8:53 ` Huang Rui [this message]
2014-10-17 14:54   ` [PATCH v2 11/16] usb: dwc3: add delay " Felipe Balbi
2014-10-17  8:53 ` [PATCH v2 12/16] usb: dwc3: add delay phy power change quirk Huang Rui
2014-10-17 14:56   ` Felipe Balbi
2014-10-17  8:53 ` [PATCH v2 13/16] usb: dwc3: add lfps filter quirk Huang Rui
2014-10-17 14:56   ` Felipe Balbi
2014-10-17  8:53 ` [PATCH v2 14/16] usb: dwc3: enable rx_detect to polling lfps quirk Huang Rui
2014-10-17 14:57   ` Felipe Balbi
2014-10-17  8:53 ` [PATCH v2 15/16] usb: dwc3: add tx demphasis quirk Huang Rui
2014-10-17 14:57   ` Felipe Balbi
2014-10-17  8:53 ` [PATCH v2 16/16] usb: dwc3: enable usb suspend phy Huang Rui
2014-10-17 14:59   ` Felipe Balbi
2014-10-17 18:41     ` Paul Zimmerman
2014-10-17 18:48       ` Felipe Balbi
2014-10-20  8:41         ` Huang Rui
2014-10-20  9:01           ` Huang Rui
2014-10-20 18:17             ` Paul Zimmerman
2014-10-24 15:29             ` Felipe Balbi
2014-10-24 15:28           ` Felipe Balbi
2014-10-17 15:10 ` [PATCH v2 00/16] usb: dwc3: add support for AMD NL SoC Felipe Balbi
2014-10-20 15:38   ` Huang Rui
2014-10-24 15:30     ` Felipe Balbi

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=1413536021-4886-12-git-send-email-ray.huang@amd.com \
    --to=ray.huang@amd.com \
    --cc=Paul.Zimmerman@synopsys.com \
    --cc=balbi@ti.com \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tony.li@amd.com \
    --cc=vincent.wan@amd.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).