chengshan / rpms / kernel

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