Xiaodong Zhang

System hang up issue about SPDIF on i.MX51 and i.MX53 platform -blog archive

Discussion created by Xiaodong Zhang Employee on Mar 27, 2012

Recently I find a serious bug in <linux-kernel-dir>/arch/arm/mach-mx5/clock.c. SPDIF don't add secondary clock which it depends on. It will result ARM core hang up in some special case. You can follow my change to fix the issue.

 

diff --git a/arch/arm/mach-mx5/clock.c b/arch/arm/mach-mx5/clock.c
old mode 100644
new mode 100755
index 83f5fba..fdcbf35
--- a/arch/arm/mach-mx5/clock.c
+++ b/arch/arm/mach-mx5/clock.c
@@ -3720,6 +3720,7 @@ static struct clk spdif0_clk[] = {
     {
     .id = 0,
     .parent = &pll3_sw_clk,
+    .secondary = &spdif0_clk[1],
     .set_parent = _clk_spdif0_set_parent,
     .get_rate = _clk_spdif0_get_rate,
     .enable = _clk_enable,
@@ -3777,6 +3778,7 @@ static struct clk spdif1_clk[] = {
     {
     .id = 1,
     .parent = &pll3_sw_clk,
+    .secondary = &spdif1_clk[1],
     .set_parent = _clk_spdif1_set_parent,
     .get_rate = _clk_spdif1_get_rate,
     .enable = _clk_enable,

Outcomes