]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MLK-10161-1: ARM: imx6q: Add SPDIF_GCLK clock in clock tree
authorShengjiu Wang <shengjiu.wang@freescale.com>
Tue, 27 Jan 2015 08:24:53 +0000 (16:24 +0800)
committerShengjiu Wang <shengjiu.wang@freescale.com>
Wed, 28 Jan 2015 07:44:35 +0000 (15:44 +0800)
As spdif driver will register SPDIF clock to regmap, regmap will do
clk_prepare in init function, so SPDIF clock is prepared in probe, then its
root clock (pll clock) is prepared also, which cause the arm can't enter
low power mode.
Add SPDIF_GCLK in clock tree which share same gate bits with SPDIF clock.
Its root clock is ipg clock, and register it to regmap, then the issue can be
fixed.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
arch/arm/boot/dts/imx6qdl.dtsi
arch/arm/mach-imx/clk-imx6q.c
include/dt-bindings/clock/imx6qdl-clock.h

index 29e204fca19b4274beed23cd2f29b6da840b717c..c3a0c807de7792aaf9cdf301468709c6135e98f2 100644 (file)
                                        dmas = <&sdma 14 18 0>,
                                               <&sdma 15 18 0>;
                                        dma-names = "rx", "tx";
-                                       clocks = <&clks IMX6QDL_CLK_SPDIF>, <&clks IMX6QDL_CLK_OSC>,
+                                       clocks = <&clks IMX6QDL_CLK_SPDIF_GCLK>, <&clks IMX6QDL_CLK_OSC>,
                                                 <&clks IMX6QDL_CLK_SPDIF>, <&clks IMX6QDL_CLK_ASRC>,
                                                 <&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_ESAI_EXTAL>,
                                                 <&clks IMX6QDL_CLK_IPG>, <&clks IMX6QDL_CLK_MLB>,
index f8a22ef956e378174c475cfdfca0dd06eedc84c1..47997904a7a472a40e7e985ea57398c1d53c2323 100644 (file)
@@ -123,6 +123,7 @@ static unsigned int share_count_asrc;
 static unsigned int share_count_ssi1;
 static unsigned int share_count_ssi2;
 static unsigned int share_count_ssi3;
+static unsigned int share_count_spdif;
 
 static void __init imx6q_clocks_init(struct device_node *ccm_node)
 {
@@ -452,7 +453,8 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
        clk[IMX6QDL_CLK_SATA]         = imx_clk_gate2("sata",          "ipg",               base + 0x7c, 4);
        clk[IMX6QDL_CLK_SDMA]         = imx_clk_gate2("sdma",          "ahb",               base + 0x7c, 6);
        clk[IMX6QDL_CLK_SPBA]         = imx_clk_gate2("spba",          "ipg",               base + 0x7c, 12);
-       clk[IMX6QDL_CLK_SPDIF]        = imx_clk_gate2("spdif",         "spdif_podf",        base + 0x7c, 14);
+       clk[IMX6QDL_CLK_SPDIF]        = imx_clk_gate2_shared("spdif",     "spdif_podf",     base + 0x7c, 14, &share_count_spdif);
+       clk[IMX6QDL_CLK_SPDIF_GCLK]   = imx_clk_gate2_shared("spdif_gclk", "ipg",           base + 0x7c, 14, &share_count_spdif);
        clk[IMX6QDL_CLK_SSI1_IPG]     = imx_clk_gate2_shared("ssi1_ipg",      "ipg",        base + 0x7c, 18, &share_count_ssi1);
        clk[IMX6QDL_CLK_SSI2_IPG]     = imx_clk_gate2_shared("ssi2_ipg",      "ipg",        base + 0x7c, 20, &share_count_ssi2);
        clk[IMX6QDL_CLK_SSI3_IPG]     = imx_clk_gate2_shared("ssi3_ipg",      "ipg",        base + 0x7c, 22, &share_count_ssi3);
index 64855469729ebdf58cf39a483bae626959398811..4bd9d6e7b59dbd60d32f1093bb698bd64e5994ad 100644 (file)
 #define IMX6QDL_CAAM_MEM                       246
 #define IMX6QDL_CAAM_ACLK                      247
 #define IMX6QDL_CAAM_IPG                       248
-#define IMX6QDL_CLK_END                                249
+#define IMX6QDL_CLK_SPDIF_GCLK                 249
+#define IMX6QDL_CLK_END                                250
  
 #endif /* __DT_BINDINGS_CLOCK_IMX6QDL_H */