From aa4418770ef9c143b0027e5038c690539b0ebb1a Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Tue, 28 Jul 2015 11:35:53 +0200 Subject: ARM: tegra: Initialize timer earlier 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 Acked-by: Stephen Warren Signed-off-by: Tom Warren --- arch/arm/mach-tegra/board2.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/arm/mach-tegra/board2.c') diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c index e0d8687cbc..36bcfb04c0 100644 --- a/arch/arm/mach-tegra/board2.c +++ b/arch/arm/mach-tegra/board2.c @@ -196,6 +196,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(); -- cgit v1.2.1