diff mbox

[U-Boot,2/2] ARM: tegra: Use architected timer on ARMv8

Message ID 1438076154-31892-2-git-send-email-thierry.reding@gmail.com
State Accepted
Delegated to: Tom Warren
Headers show

Commit Message

Thierry Reding July 28, 2015, 9:35 a.m. UTC
From: Thierry Reding <treding@nvidia.com>

ARMv8 requires an architected timer to be present, so it can be used
instead of the Tegra US timer. This allows for better code reuse.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 include/configs/tegra-common.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Simon Glass Aug. 2, 2015, 9:29 p.m. UTC | #1
Hi Thierry,

On 28 July 2015 at 03:35, Thierry Reding <thierry.reding@gmail.com> wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> ARMv8 requires an architected timer to be present, so it can be used
> instead of the Tegra US timer. This allows for better code reuse.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  include/configs/tegra-common.h | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
> index 7b4c0d70636e..62b047115343 100644
> --- a/include/configs/tegra-common.h
> +++ b/include/configs/tegra-common.h
> @@ -18,8 +18,11 @@
>
>  #include <asm/arch/tegra.h>            /* get chip and board defs */
>
> +/* Use the Tegra US timer on ARMv7, but the architected timer on ARMv8. */
> +#ifndef CONFIG_ARM64
>  #define CONFIG_SYS_TIMER_RATE          1000000
>  #define CONFIG_SYS_TIMER_COUNTER       NV_PA_TMRUS_BASE
> +#endif
>
>  /*
>   * Display CPU and Board information
> --
> 2.4.5
>

Shouldn't this go in tegra210-common.h or similar?

Regards,
Simon
diff mbox

Patch

diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
index 7b4c0d70636e..62b047115343 100644
--- a/include/configs/tegra-common.h
+++ b/include/configs/tegra-common.h
@@ -18,8 +18,11 @@ 
 
 #include <asm/arch/tegra.h>		/* get chip and board defs */
 
+/* Use the Tegra US timer on ARMv7, but the architected timer on ARMv8. */
+#ifndef CONFIG_ARM64
 #define CONFIG_SYS_TIMER_RATE		1000000
 #define CONFIG_SYS_TIMER_COUNTER	NV_PA_TMRUS_BASE
+#endif
 
 /*
  * Display CPU and Board information