audio: SM1 tdmouta gated by earc [1/1]

PD#IPTV-3732

Problem:
TMDOUTA is gated by earc clk gate.
There is a bug in sm1 clk gating.

Solution:
Fix the wrong map of clk mapping.

Verify:
SM1.

Change-Id: Ia395d3307c249ef0cd64b715bb936dea3e2925ac
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
This commit is contained in:
Shuai Li
2019-07-31 19:25:39 +08:00
committed by Chris KIM
parent afd9762438
commit 855cec03a2
9 changed files with 1464 additions and 44 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -569,15 +569,15 @@
tdmacpu: cpu {
sound-dai = <&aml_tdma>;
dai-tdm-slot-tx-mask =
<1 1 1 1 1 1 1 1>;
<1>;
dai-tdm-slot-rx-mask =
<1 1 1 1 1 1 1 1>;
dai-tdm-slot-num = <8>;
dai-tdm-slot-width = <32>;
system-clock-frequency = <24576000>;
<1>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <16>;
system-clock-frequency = <256000>;
};
tdmacodec: codec {
sound-dai = <&dummy_codec &dummy_codec>;
sound-dai = <&dummy_codec>;
};
};
@@ -947,7 +947,7 @@
compatible = "amlogic, g12a-snd-tdma";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <0 1>;
dai-tdm-oe-lane-slot-mask-out = <1 0>;
dai-tdm-lane-slot-mask-out = <1 0>;
dai-tdm-clk-sel = <0>;
clocks = <&clkaudio CLKID_AUDIO_MCLK_A
&clkc CLKID_MPLL0>;

View File

@@ -566,15 +566,15 @@
tdmacpu: cpu {
sound-dai = <&aml_tdma>;
dai-tdm-slot-tx-mask =
<1 1 1 1 1 1 1 1>;
<1>;
dai-tdm-slot-rx-mask =
<1 1 1 1 1 1 1 1>;
dai-tdm-slot-num = <8>;
dai-tdm-slot-width = <32>;
system-clock-frequency = <24576000>;
<1>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <16>;
system-clock-frequency = <256000>;
};
tdmacodec: codec {
sound-dai = <&dummy_codec &dummy_codec>;
sound-dai = <&dummy_codec>;
};
};
@@ -924,7 +924,7 @@
compatible = "amlogic, g12a-snd-tdma";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <0 1>;
dai-tdm-oe-lane-slot-mask-out = <1 0>;
dai-tdm-lane-slot-mask-out = <1 0>;
dai-tdm-clk-sel = <0>;
clocks = <&clkaudio CLKID_AUDIO_MCLK_A
&clkc CLKID_MPLL0>;

View File

@@ -587,15 +587,15 @@
tdmacpu: cpu {
sound-dai = <&tdma>;
dai-tdm-slot-tx-mask =
<1 1 1 1 1 1 1 1>;
<1>;
dai-tdm-slot-rx-mask =
<1 1 1 1 1 1 1 1>;
dai-tdm-slot-num = <8>;
dai-tdm-slot-width = <32>;
system-clock-frequency = <24576000>;
<1>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <16>;
system-clock-frequency = <256000>;
};
tdmacodec: codec {
sound-dai = <&dummy_codec &dummy_codec>;
sound-dai = <&dummy_codec>;
};
};
@@ -1085,7 +1085,7 @@
compatible = "amlogic, sm1-snd-tdma";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <0 1>;
dai-tdm-oe-lane-slot-mask-out = <1 0>;
dai-tdm-lane-slot-mask-out = <1 0>;
dai-tdm-clk-sel = <0>;
clocks = <&clkaudio CLKID_AUDIO_MCLK_A
&clkc CLKID_MPLL0>;

View File

@@ -571,15 +571,15 @@
tdmacpu: cpu {
sound-dai = <&aml_tdma>;
dai-tdm-slot-tx-mask =
<1 1 1 1 1 1 1 1>;
<1>;
dai-tdm-slot-rx-mask =
<1 1 1 1 1 1 1 1>;
dai-tdm-slot-num = <8>;
dai-tdm-slot-width = <32>;
system-clock-frequency = <24576000>;
<1>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <16>;
system-clock-frequency = <256000>;
};
tdmacodec: codec {
sound-dai = <&dummy_codec &dummy_codec>;
sound-dai = <&dummy_codec>;
};
};
@@ -948,7 +948,7 @@
compatible = "amlogic, g12a-snd-tdma";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <0 1>;
dai-tdm-oe-lane-slot-mask-out = <1 0>;
dai-tdm-lane-slot-mask-out = <1 0>;
dai-tdm-clk-sel = <0>;
clocks = <&clkaudio CLKID_AUDIO_MCLK_A
&clkc CLKID_MPLL0>;

View File

@@ -568,15 +568,15 @@
tdmacpu: cpu {
sound-dai = <&aml_tdma>;
dai-tdm-slot-tx-mask =
<1 1 1 1 1 1 1 1>;
<1>;
dai-tdm-slot-rx-mask =
<1 1 1 1 1 1 1 1>;
dai-tdm-slot-num = <8>;
dai-tdm-slot-width = <32>;
system-clock-frequency = <24576000>;
<1>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <16>;
system-clock-frequency = <256000>;
};
tdmacodec: codec {
sound-dai = <&dummy_codec &dummy_codec>;
sound-dai = <&dummy_codec>;
};
};
@@ -925,7 +925,7 @@
compatible = "amlogic, g12a-snd-tdma";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <0 1>;
dai-tdm-oe-lane-slot-mask-out = <1 0>;
dai-tdm-lane-slot-mask-out = <1 0>;
dai-tdm-clk-sel = <0>;
clocks = <&clkaudio CLKID_AUDIO_MCLK_A
&clkc CLKID_MPLL0>;

View File

@@ -588,15 +588,15 @@
tdmacpu: cpu {
sound-dai = <&tdma>;
dai-tdm-slot-tx-mask =
<1 1 1 1 1 1 1 1>;
<1>;
dai-tdm-slot-rx-mask =
<1 1 1 1 1 1 1 1>;
dai-tdm-slot-num = <8>;
dai-tdm-slot-width = <32>;
system-clock-frequency = <24576000>;
<1>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <16>;
system-clock-frequency = <256000>;
};
tdmacodec: codec {
sound-dai = <&dummy_codec &dummy_codec>;
sound-dai = <&dummy_codec>;
};
};
@@ -1087,7 +1087,7 @@
compatible = "amlogic, sm1-snd-tdma";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <0 1>;
dai-tdm-oe-lane-slot-mask-out = <1 0>;
dai-tdm-lane-slot-mask-out = <1 0>;
dai-tdm-clk-sel = <0>;
clocks = <&clkaudio CLKID_AUDIO_MCLK_A
&clkc CLKID_MPLL0>;

View File

@@ -163,7 +163,10 @@ static int sm1_clk_gates_init(struct clk **clks, void __iomem *iobase)
}
for (clkid = 0; clkid < MCLK_BASE; clkid++) {
sm1_audio_clk_gates[clkid]->reg = iobase;
unsigned long offset =
(unsigned long)sm1_audio_clk_gates[clkid]->reg;
sm1_audio_clk_gates[clkid]->reg =
(void __iomem *)((unsigned long)iobase + offset);
clks[clkid] = clk_register(NULL, sm1_audio_clk_hws[clkid]);
WARN_ON(IS_ERR_OR_NULL(clks[clkid]));
}

View File

@@ -179,7 +179,10 @@ static int tm2_clk_gates_init(struct clk **clks, void __iomem *iobase)
}
for (clkid = 0; clkid < MCLK_BASE; clkid++) {
tm2_audio_clk_gates[clkid]->reg = iobase;
unsigned long offset =
(unsigned long)tm2_audio_clk_gates[clkid]->reg;
tm2_audio_clk_gates[clkid]->reg =
(void __iomem *)((unsigned long)iobase + offset);
clks[clkid] = clk_register(NULL, tm2_audio_clk_hws[clkid]);
WARN_ON(IS_ERR_OR_NULL(clks[clkid]));
}