zhang / rpms / kernel

Forked from rpms/kernel 5 years ago
Clone
e336be
From patchwork Wed Apr  6 07:54:05 2016
e336be
Content-Type: text/plain; charset="utf-8"
e336be
MIME-Version: 1.0
e336be
Content-Transfer-Encoding: 7bit
e336be
Subject: usb: phy: tegra: Add 38.4MHz clock table entry
e336be
From: Hunter Laux <hunterlaux@gmail.com>
e336be
X-Patchwork-Id: 606877
e336be
Message-Id: <1459929245-23449-1-git-send-email-hunterlaux@gmail.com>
e336be
To: Stephen Warren <swarren@wwwdotorg.org>,
e336be
 Thierry Reding <thierry.reding@gmail.com>,
e336be
 Alexandre Courbot <gnurou@gmail.com>, linux-tegra@vger.kernel.org
e336be
Cc: Hunter Laux <hunterlaux@gmail.com>
e336be
Date: Wed,  6 Apr 2016 00:54:05 -0700
e336be
e336be
The Tegra210 uses a 38.4MHz OSC. This clock table entry is required to
e336be
use the ehci phy on the Jetson TX1.
e336be
e336be
The xtal_freq_count is actually a 12 bit value, so it should be a u16
e336be
instead of u8.
e336be
e336be
Signed-off-by: Hunter Laux <hunterlaux@gmail.com>
e336be
---
e336be
 drivers/usb/phy/phy-tegra-usb.c | 10 +++++++++-
e336be
 1 file changed, 9 insertions(+), 1 deletion(-)
e336be
e336be
diff --git a/drivers/usb/phy/phy-tegra-usb.c b/drivers/usb/phy/phy-tegra-usb.c
e336be
index 5fe4a57..f0431f0 100644
e336be
--- a/drivers/usb/phy/phy-tegra-usb.c
e336be
+++ b/drivers/usb/phy/phy-tegra-usb.c
e336be
@@ -164,7 +164,7 @@ struct tegra_xtal_freq {
e336be
 	u8 enable_delay;
e336be
 	u8 stable_count;
e336be
 	u8 active_delay;
e336be
-	u8 xtal_freq_count;
e336be
+	u16 xtal_freq_count;
e336be
 	u16 debounce;
e336be
 };
e336be
 
e336be
@@ -201,6 +201,14 @@ static const struct tegra_xtal_freq tegra_freq_table[] = {
e336be
 		.xtal_freq_count = 0xFE,
e336be
 		.debounce = 0xFDE8,
e336be
 	},
e336be
+	{
e336be
+		.freq = 38400000,
e336be
+		.enable_delay = 0x00,
e336be
+		.stable_count = 0x00,
e336be
+		.active_delay = 0x18,
e336be
+		.xtal_freq_count = 0x177,
e336be
+		.debounce = 0xBB80,
e336be
+	},
e336be
 };
e336be
 
e336be
 static void set_pts(struct tegra_usb_phy *phy, u8 pts_val)