From: Thierry Reding <thierry.reding@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] ARM: tegra: Initialize timer earlier
Date: Tue, 28 Jul 2015 11:35:53 +0200 [thread overview]
Message-ID: <1438076154-31892-1-git-send-email-thierry.reding@gmail.com> (raw)
In-Reply-To: <1437605770-5462-1-git-send-email-swarren@wwwdotorg.org>
From: Thierry Reding <treding@nvidia.com>
A subsequent patch will enable the use of the architected timer on
ARMv8. Doing so implies that udelay() will be backed by this timer
implementation, and hence the architected timer must be ready when
udelay() is first called. The first time udelay() is used is while
resetting the debug UART, which happens very early. Make sure that
arch_timer_init() is called before that.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
arch/arm/mach-tegra/board2.c | 6 ++++++
arch/arm/mach-tegra/clock.c | 6 ------
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c
index 82a8a3c08959..f76fcbec5a7d 100644
--- a/arch/arm/mach-tegra/board2.c
+++ b/arch/arm/mach-tegra/board2.c
@@ -218,6 +218,12 @@ void gpio_early_init(void) __attribute__((weak, alias("__gpio_early_init")));
int board_early_init_f(void)
{
+ /* Do any special system timer/TSC setup */
+#if defined(CONFIG_TEGRA_SUPPORT_NON_SECURE)
+ if (!tegra_cpu_is_non_secure())
+#endif
+ arch_timer_init();
+
pinmux_init();
board_init_uart_f();
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c
index 0e0f7431b2fb..551ce88960e3 100644
--- a/arch/arm/mach-tegra/clock.c
+++ b/arch/arm/mach-tegra/clock.c
@@ -618,12 +618,6 @@ void clock_init(void)
debug("PLLC = %d\n", pll_rate[CLOCK_ID_CGENERAL]);
debug("PLLD = %d\n", pll_rate[CLOCK_ID_DISPLAY]);
debug("PLLX = %d\n", pll_rate[CLOCK_ID_XCPU]);
-
- /* Do any special system timer/TSC setup */
-#if defined(CONFIG_TEGRA_SUPPORT_NON_SECURE)
- if (!tegra_cpu_is_non_secure())
-#endif
- arch_timer_init();
}
static void set_avp_clock_source(u32 src)
--
2.4.5
next prev parent reply other threads:[~2015-07-28 9:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-22 22:56 [U-Boot] [PATCH] armv8: Allow SoCs to override the generic timer Stephen Warren
2015-07-23 20:18 ` Simon Glass
2015-07-23 20:54 ` Tom Rini
2015-07-28 9:33 ` Thierry Reding
2015-07-28 9:35 ` Thierry Reding [this message]
2015-07-28 9:35 ` [U-Boot] [PATCH 2/2] ARM: tegra: Use architected timer on ARMv8 Thierry Reding
2015-08-02 21:29 ` Simon Glass
2015-07-28 16:08 ` [U-Boot] [PATCH 1/2] ARM: tegra: Initialize timer earlier Stephen Warren
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=1438076154-31892-1-git-send-email-thierry.reding@gmail.com \
--to=thierry.reding@gmail.com \
--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