Skip to contentSkip to conversation

clk: tegra: Fix clock sources for tegra210 EMC

PATCH Applied Jon Hunter 3 participants 3 messages Dec 18, 2015 – Jan 13, 2016

Subsystems (3)
lore
Share & tools
lore

Jon Hunter

author maintainer
#0 lore raw

PATCH 1/1 clk: tegra: Fix clock sources for tegra210 EMC

The EMC clock sources for tegra210 currently incorrectly include pll_c2 and pll_c3. However, both of these should have been pll_mb as shown in the TRM. If tegra210 happens to be configured such that the pll_mb is the default clock for the EMC, as configured by the bootloader, then this will cause a system hang on boot. This is because the kernel will disable the pll_mb when disabling unused clock as it appears to be unused when it is not.

Also add the additional pll_p clock source for the EMC.

---
 drivers/clk/tegra/clk-tegra210.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/tegra/clk-tegra210.c +2 -1
index 58514c44ea83..849be30b52bf 100644
@@ -243,7 +243,8 @@ static unsigned long tegra210_input_freq[] = {
 };
 
 static const char *mux_pllmcp_clkm[] = {
-	"pll_m", "pll_c", "pll_p", "clk_m", "pll_m_ud", "pll_c2", "pll_c3",
+	"pll_m", "pll_c", "pll_p", "clk_m", "pll_m_ud", "pll_mb", "pll_mb",
+	"pll_p",
 };
 #define mux_pllmcp_clkm_idx NULL
 
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#1 lore raw
Quoted 21 lines · Jon Hunter

The EMC clock sources for tegra210 currently incorrectly include pll_c2 and pll_c3. However, both of these should have been pll_mb as shown in the TRM. If tegra210 happens to be configured such that the pll_mb is the default clock for the EMC, as configured by the bootloader, then this will cause a system hang on boot. This is because the kernel will disable the pll_mb when disabling unused clock as it appears to be unused when it is not.

Also add the additional pll_p clock source for the EMC.

---
 drivers/clk/tegra/clk-tegra210.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/tegra/clk-tegra210.c +0 -0
index 58514c44ea83..849be30b52bf 100644

drivers/clk/tegra/clk-tegra210.c static unsigned long tegra210_input_freq[] = { · line 250

Quoted 9 lines
drivers/clk/tegra/clk-tegra210.c +2 -1
@@ -243,7 +243,8 @@ static unsigned long tegra210_input_freq[] = {
 };
 
 static const char *mux_pllmcp_clkm[] = {
-	"pll_m", "pll_c", "pll_p", "clk_m", "pll_m_ud", "pll_c2", "pll_c3",
+	"pll_m", "pll_c", "pll_p", "clk_m", "pll_m_ud", "pll_mb", "pll_mb",
+	"pll_p",
 };
 #define mux_pllmcp_clkm_idx NULL
 

-rhyland

Signature · 1 line
nvpublic
#2 lore raw
In reply to Jon Hunter
Quoted 8 lines · Jon Hunter

The EMC clock sources for tegra210 currently incorrectly include pll_c2 and pll_c3. However, both of these should have been pll_mb as shown in the TRM. If tegra210 happens to be configured such that the pll_mb is the default clock for the EMC, as configured by the bootloader, then this will cause a system hang on boot. This is because the kernel will disable the pll_mb when disabling unused clock as it appears to be unused when it is not.

Quoted 6 lines

Also add the additional pll_p clock source for the EMC.

---
 drivers/clk/tegra/clk-tegra210.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Applied, thanks.

Thierry