]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
arm, am33x: make RTC32K OSC enable configurable
authorHeiko Schocher <hs@denx.de>
Mon, 4 Nov 2013 13:05:00 +0000 (14:05 +0100)
committerTom Rini <trini@ti.com>
Mon, 11 Nov 2013 17:16:30 +0000 (12:16 -0500)
As
http://www.denx.de/wiki/view/U-Boot/DesignPrinciples#2_Keep_it_Fast
states:
"Initialize devices only when they are needed within U-Boot"

enable the RTC32K OSC only, if CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC is
enabled. Enable this in ti_am335x_common.h, so all boards in mainline
should work as before.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@ti.com>
README
arch/arm/cpu/armv7/am33xx/board.c
include/configs/ti_am335x_common.h

diff --git a/README b/README
index 39b3fe66977aa6f8d5833e4eeddb18c356d6ea0e..f0ffaf491cd9c204b24a49aacf4d9712148cdf32 100644 (file)
--- a/README
+++ b/README
@@ -4319,6 +4319,9 @@ Low Level (hardware related) configuration options:
 
                NOTE : currently only supported on AM335x platforms.
 
+- CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC:
+               Enables the RTC32K OSC on AM33xx based plattforms
+
 Freescale QE/FMAN Firmware Support:
 -----------------------------------
 
index 453effa541a8837b8c34489c0dc63db91dcfd99f..803aa9c54576f31302ef598b57fbb8b8eb7be937 100644 (file)
@@ -149,6 +149,7 @@ __weak void am33xx_spl_board_init(void)
        do_setup_dpll(&dpll_mpu_regs, &dpll_mpu_opp100);
 }
 
+#if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC)
 static void rtc32k_enable(void)
 {
        struct davinci_rtc *rtc = (struct davinci_rtc *)RTC_BASE;
@@ -164,6 +165,7 @@ static void rtc32k_enable(void)
        /* Enable the RTC 32K OSC by setting bits 3 and 6. */
        writel((1 << 3) | (1 << 6), &rtc->osc);
 }
+#endif
 
 static void uart_soft_reset(void)
 {
@@ -232,8 +234,10 @@ void s_init(void)
 #if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT)
        prcm_init();
        set_mux_conf_regs();
+#if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC)
        /* Enable RTC32K clock */
        rtc32k_enable();
+#endif
        sdram_init();
 #endif
 }
index 10fe47f4d63bb346c6662356127e1a2ee2662514..0f6fa6254fbc6e397a861c86b983d016c557891c 100644 (file)
@@ -18,6 +18,7 @@
 #define CONFIG_SYS_CACHELINE_SIZE       64
 #define CONFIG_MAX_RAM_BANK_SIZE       (1024 << 20)    /* 1GB */
 #define CONFIG_SYS_TIMERBASE           0x48040000      /* Use Timer2 */
+#define CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC
 
 #include <asm/arch/omap.h>