ARM: imx6: Derive spdif clock from pll3_pfd3_454m
authorNicolin Chen <Guangyu.Chen@freescale.com>
Fri, 13 Dec 2013 15:37:52 +0000 (23:37 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Tue, 31 Dec 2013 01:36:34 +0000 (09:36 +0800)
SPDIF can derive a TX clock for playback from one of its clock sources --
spdif root clock to match its supporting sample rates. So this patch set
the spdif root clock's parent to pll3_pfd3_454m since the pll3_pfd3_454m
can approximately meet its sample rate requirement.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
arch/arm/mach-imx/clk-imx6q.c
arch/arm/mach-imx/clk-imx6sl.c

index 74ecceb4b5f46ba83d8a01972f985fff2b5c7581..af2e582d2b7427e1ffa72b65fb3b90bcdb257c3a 100644 (file)
@@ -475,6 +475,9 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
        if (ret)
                pr_warn("failed to set up CLKO: %d\n", ret);
 
+       /* Audio-related clocks configuration */
+       clk_set_parent(clk[spdif_sel], clk[pll3_pfd3_454m]);
+
        /* All existing boards with PCIe use LVDS1 */
        if (IS_ENABLED(CONFIG_PCI_IMX6))
                clk_set_parent(clk[lvds1_sel], clk[sata_ref]);
index a747a7df175f08d3884c72d2138743befb4f3160..a222280e1095274d1b8272af26f88bf196bd874e 100644 (file)
@@ -261,6 +261,9 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node)
                clk_prepare_enable(clks[IMX6SL_CLK_USBPHY2_GATE]);
        }
 
+       /* Audio-related clocks configuration */
+       clk_set_parent(clks[IMX6SL_CLK_SPDIF0_SEL], clks[IMX6SL_CLK_PLL3_PFD3]);
+
        np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-gpt");
        base = of_iomap(np, 0);
        WARN_ON(!base);