]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: AM43XX: Add functions to enable and disable EDMA3 clocks
authorVignesh R <vigneshr@ti.com>
Mon, 17 Aug 2015 07:59:53 +0000 (13:29 +0530)
committerJagan Teki <jteki@openedev.com>
Mon, 17 Aug 2015 17:59:14 +0000 (23:29 +0530)
Adds functions to enable and disable edma3 clocks which can be invoked
by drivers using edma3 to control the clocks.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
arch/arm/cpu/armv7/am33xx/clock_am43xx.c

index b6396942bbff5135d3224271d40f2f36f4d54237..35c431eb292d63299948e30f08bc25adaedce7d3 100644 (file)
@@ -135,3 +135,39 @@ void enable_basic_clocks(void)
        /* For OPP100 the mac clock should be /5. */
        writel(0x4, &cmdpll->clkselmacclk);
 }
+
+#ifdef CONFIG_TI_EDMA3
+void enable_edma3_clocks(void)
+{
+       u32 *const clk_domains_edma3[] = {
+               0
+       };
+
+       u32 *const clk_modules_explicit_en_edma3[] = {
+               &cmper->tpccclkctrl,
+               &cmper->tptc0clkctrl,
+               0
+       };
+
+       do_enable_clocks(clk_domains_edma3,
+                        clk_modules_explicit_en_edma3,
+                        1);
+}
+
+void disable_edma3_clocks(void)
+{
+       u32 *const clk_domains_edma3[] = {
+               0
+       };
+
+       u32 *const clk_modules_disable_edma3[] = {
+               &cmper->tpccclkctrl,
+               &cmper->tptc0clkctrl,
+               0
+       };
+
+       do_disable_clocks(clk_domains_edma3,
+                         clk_modules_disable_edma3,
+                         1);
+}
+#endif