From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/5] arm, am33x: make RTC32K OSC enable configurable
Date: Mon, 4 Nov 2013 08:02:36 +0100 [thread overview]
Message-ID: <1383548559-8233-3-git-send-email-hs@denx.de> (raw)
In-Reply-To: <1383548559-8233-1-git-send-email-hs@denx.de>
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>
---
On the dxr2 board the RTC32K_OSC it is not used, so disable it for
this board, done in the 5th patch of this patchserie
"arm-am335x-update-for-the-siemens-boards"
- no changes for v2
---
README | 3 +++
arch/arm/cpu/armv7/am33xx/board.c | 4 ++++
include/configs/ti_am335x_common.h | 1 +
3 files changed, 8 insertions(+)
diff --git a/README b/README
index 2558e42..529c2d4 100644
--- a/README
+++ b/README
@@ -4300,6 +4300,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:
-----------------------------------
diff --git a/arch/arm/cpu/armv7/am33xx/board.c b/arch/arm/cpu/armv7/am33xx/board.c
index a31bf40..7465ec5 100644
--- a/arch/arm/cpu/armv7/am33xx/board.c
+++ b/arch/arm/cpu/armv7/am33xx/board.c
@@ -148,6 +148,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 rtc_regs *rtc = (struct rtc_regs *)RTC_BASE;
@@ -163,6 +164,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)
{
@@ -231,8 +233,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
}
diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h
index d2e34ae..3441b0a 100644
--- a/include/configs/ti_am335x_common.h
+++ b/include/configs/ti_am335x_common.h
@@ -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>
--
1.8.3.1
next prev parent reply other threads:[~2013-11-04 7:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-04 7:02 [U-Boot] [PATCH v2 0/5] arm, am33xx: update for the am33xx based siemens boards Heiko Schocher
2013-11-04 7:02 ` [U-Boot] [PATCH v2 1/5] bootcount: store bootcount var in environment Heiko Schocher
2013-11-04 7:02 ` Heiko Schocher [this message]
2013-11-04 7:02 ` [U-Boot] [PATCH v2 3/5] usb, g_dnl: make iSerialNumber board configurable Heiko Schocher
2013-11-04 11:05 ` Lukasz Majewski
2013-11-04 7:02 ` [U-Boot] [PATCH v2 4/5] usb, g_dnl: make bcdDevice value configurable Heiko Schocher
2013-11-04 7:02 ` [U-Boot] [PATCH v2 5/5] arm, am335x: update for the siemens boards Heiko Schocher
2013-11-04 12:45 ` [U-Boot] [PATCH v2 0/5] arm, am33xx: update for the am33xx based " Vaibhav Bedia
2013-11-04 13:15 ` Heiko Schocher
2013-11-04 13:24 ` Vaibhav Bedia
2013-11-04 17:34 ` Marek Vasut
2013-11-04 19:45 ` Vaibhav Bedia
2013-11-05 3:30 ` Heiko Schocher
2013-11-06 12:18 ` Vaibhav Bedia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1383548559-8233-3-git-send-email-hs@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox