ARM: imx: clk-vf610: fix FlexCAN clock gating
authorStefan Agner <stefan@agner.ch>
Tue, 15 Jul 2014 12:56:19 +0000 (14:56 +0200)
committerShawn Guo <shawn.guo@freescale.com>
Fri, 18 Jul 2014 08:11:40 +0000 (16:11 +0800)
Extend the clock control for FlexCAN with the second gate which
enable the clocks in the Clock Divider (CCM_CSCDR2) register too.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
arch/arm/mach-imx/clk-vf610.c
include/dt-bindings/clock/vf610-clock.h

index 2435bc4612eb6e2457ef3456c556c10b2ec03787..f60d6d569ce3b004e268f7bff29926470a1cd34d 100644 (file)
@@ -295,8 +295,10 @@ static void __init vf610_clocks_init(struct device_node *ccm_node)
 
        clk[VF610_CLK_ASRC] = imx_clk_gate2("asrc", "ipg_bus", CCM_CCGR4, CCM_CCGRx_CGn(1));
 
-       clk[VF610_CLK_FLEXCAN0] = imx_clk_gate2("flexcan0", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(0));
-       clk[VF610_CLK_FLEXCAN1] = imx_clk_gate2("flexcan1", "ipg_bus", CCM_CCGR9, CCM_CCGRx_CGn(4));
+       clk[VF610_CLK_FLEXCAN0_EN] = imx_clk_gate("flexcan0_en", "ipg_bus", CCM_CSCDR2, 11);
+       clk[VF610_CLK_FLEXCAN0] = imx_clk_gate2("flexcan0", "flexcan0_en", CCM_CCGR0, CCM_CCGRx_CGn(0));
+       clk[VF610_CLK_FLEXCAN1_EN] = imx_clk_gate("flexcan1_en", "ipg_bus", CCM_CSCDR2, 12);
+       clk[VF610_CLK_FLEXCAN1] = imx_clk_gate2("flexcan1", "flexcan1_en", CCM_CCGR9, CCM_CCGRx_CGn(4));
 
        clk[VF610_CLK_DMAMUX0] = imx_clk_gate2("dmamux0", "platform_bus", CCM_CCGR0, CCM_CCGRx_CGn(4));
        clk[VF610_CLK_DMAMUX1] = imx_clk_gate2("dmamux1", "platform_bus", CCM_CCGR0, CCM_CCGRx_CGn(5));
index a91602951d3d3c018218c37889b7ae9338191948..00953d9484cb5985f5dd6d2314c90acf8e4b8b7e 100644 (file)
 #define VF610_CLK_DMAMUX1              151
 #define VF610_CLK_DMAMUX2              152
 #define VF610_CLK_DMAMUX3              153
-#define VF610_CLK_END                  154
+#define VF610_CLK_FLEXCAN0_EN          154
+#define VF610_CLK_FLEXCAN1_EN          155
+#define VF610_CLK_END                  156
 
 #endif /* __DT_BINDINGS_CLOCK_VF610_H */