From: Gary King <gking@nvidia.com>
Date: Tue, 8 Dec 2009 04:52:35 +0000 (-0800)
Subject: usb: host: ehci-hcd: add controller_resets_phy quirk
X-Git-Tag: firefly_0821_release~9833^2~245
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2c7d591aa11086ba841f8712b7cee33e245b62f6;p=firefly-linux-kernel-4.4.55.git

usb: host: ehci-hcd: add controller_resets_phy quirk

only reset the controller when doing so won't also reset the phy (Tegra quirk)

Change-Id: I549a18977d0d5ebfa12c32016aa9e6bffaa8643c
Signed-off-by: Gary King <gking@nvidia.com>
---

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 1b89b2dbd9ea..09ed98e5a17d 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -259,7 +259,8 @@ static int ehci_reset (struct ehci_hcd *ehci)
 
 	command |= CMD_RESET;
 	dbg_cmd (ehci, "reset", command);
-	ehci_writel(ehci, command, &ehci->regs->command);
+	if (!ehci->controller_resets_phy)
+		ehci_writel(ehci, command, &ehci->regs->command);
 	ehci_to_hcd(ehci)->state = HC_STATE_HALT;
 	ehci->next_statechange = jiffies;
 	retval = handshake (ehci, &ehci->regs->command,
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index bde823f704e9..3de86c1debd2 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -131,6 +131,7 @@ struct ehci_hcd {			/* one per controller */
 	unsigned		need_io_watchdog:1;
 	unsigned		broken_periodic:1;
 	unsigned		fs_i_thresh:1;	/* Intel iso scheduling */
+	unsigned		controller_resets_phy:1;
 
 	/* required for usb32 quirk */
 	#define OHCI_CTRL_HCFS          (3 << 6)