Merge tag 'mips-pull-2019-02-01' of git://git.denx.de/u-boot-mips
[oweals/u-boot.git] / arch / arm / mach-omap2 / am33xx / clock_am43xx.c
index 73ea955a6cfb1414510889e6247e3c6eec648b8b..b98bb9989c0b05725461cfe1a8b9d2041a847732 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * clock_am43xx.c
  *
@@ -5,8 +6,6 @@
  * Derived from AM33XX based boards
  *
  * Copyright (C) 2013, Texas Instruments, Incorporated - http://www.ti.com/
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -124,6 +123,27 @@ void enable_basic_clocks(void)
        writel(0x4, &cmdpll->clkselmacclk);
 }
 
+void rtc_only_enable_basic_clocks(void)
+{
+       u32 *const clk_domains[] = {
+               &cmper->emifclkstctrl,
+               0
+       };
+
+       u32 *const clk_modules_explicit_en[] = {
+               &cmper->gpio5clkctrl,
+               &cmper->emiffwclkctrl,
+               &cmper->emifclkctrl,
+               &cmper->otfaemifclkctrl,
+               0
+       };
+
+       do_enable_clocks(clk_domains, clk_modules_explicit_en, 1);
+
+       /* Select the Master osc clk as Timer2 clock source */
+       writel(0x1, &cmdpll->clktimer2clk);
+}
+
 #ifdef CONFIG_TI_EDMA3
 void enable_edma3_clocks(void)
 {