diff options
author | Heiko Schocher <hs@denx.de> | 2013-11-04 14:05:00 +0100 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-11-11 12:16:30 -0500 |
commit | 16678eb40f287067dd8ad5a4e5208fbfe94e0e76 (patch) | |
tree | ab8b73eade6f2b5afaa29b9db3a2e205d7968049 /arch | |
parent | eda0ba38a8dfd2572089bd229a027d497c340158 (diff) | |
download | u-boot-imx-16678eb40f287067dd8ad5a4e5208fbfe94e0e76.zip u-boot-imx-16678eb40f287067dd8ad5a4e5208fbfe94e0e76.tar.gz u-boot-imx-16678eb40f287067dd8ad5a4e5208fbfe94e0e76.tar.bz2 |
arm, am33x: make RTC32K OSC enable configurable
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/cpu/armv7/am33xx/board.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/am33xx/board.c b/arch/arm/cpu/armv7/am33xx/board.c index 453effa..803aa9c 100644 --- a/arch/arm/cpu/armv7/am33xx/board.c +++ b/arch/arm/cpu/armv7/am33xx/board.c @@ -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 } |