ARM: clk-imx6q: refine clock tree for ASRC
authorShengjiu Wang <shengjiu.wang@freescale.com>
Thu, 4 Sep 2014 09:48:58 +0000 (17:48 +0800)
committerShawn Guo <shawn.guo@freescale.com>
Tue, 16 Sep 2014 02:06:47 +0000 (10:06 +0800)
ASRC has "asrc", "asrc_ipg", "asrc_mem" clocks, and they share
the same gate bits.

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

index 2edcebf67cee55f900e3dd54d1a56c3e26d2cda9..d5bf1e2940bf486536669b79613adc36f46ff5fa 100644 (file)
@@ -107,6 +107,7 @@ static struct clk_div_table video_div_table[] = {
 };
 
 static unsigned int share_count_esai;
+static unsigned int share_count_asrc;
 
 static void __init imx6q_clocks_init(struct device_node *ccm_node)
 {
@@ -317,7 +318,9 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
 
        /*                                            name             parent_name          reg         shift */
        clk[IMX6QDL_CLK_APBH_DMA]     = imx_clk_gate2("apbh_dma",      "usdhc3",            base + 0x68, 4);
-       clk[IMX6QDL_CLK_ASRC]         = imx_clk_gate2("asrc",          "asrc_podf",         base + 0x68, 6);
+       clk[IMX6QDL_CLK_ASRC]         = imx_clk_gate2_shared("asrc",         "asrc_podf",   base + 0x68, 6, &share_count_asrc);
+       clk[IMX6QDL_CLK_ASRC_IPG]     = imx_clk_gate2_shared("asrc_ipg",     "ahb",         base + 0x68, 6, &share_count_asrc);
+       clk[IMX6QDL_CLK_ASRC_MEM]     = imx_clk_gate2_shared("asrc_mem",     "ahb",         base + 0x68, 6, &share_count_asrc);
        clk[IMX6QDL_CLK_CAN1_IPG]     = imx_clk_gate2("can1_ipg",      "ipg",               base + 0x68, 14);
        clk[IMX6QDL_CLK_CAN1_SERIAL]  = imx_clk_gate2("can1_serial",   "can_root",          base + 0x68, 16);
        clk[IMX6QDL_CLK_CAN2_IPG]     = imx_clk_gate2("can2_ipg",      "ipg",               base + 0x68, 18);
index 323e8650f1988f21efd07b0a231c6cdec8bbd54a..1e996135cfc71712ba43fb91fb51208bc6e46892 100644 (file)
 #define IMX6QDL_CLK_LVDS2_GATE                 207
 #define IMX6QDL_CLK_ESAI_IPG                   208
 #define IMX6QDL_CLK_ESAI_MEM                   209
-#define IMX6QDL_CLK_END                                210
+#define IMX6QDL_CLK_ASRC_IPG                   210
+#define IMX6QDL_CLK_ASRC_MEM                   211
+#define IMX6QDL_CLK_END                                212
 
 #endif /* __DT_BINDINGS_CLOCK_IMX6QDL_H */