Patchwork [U-Boot] ARMV7/Vexpress: add missing get_ticks() and get_tbclk()

login
register
mail settings
Submitter Liming Wang
Date Feb. 22, 2012, 4:40 a.m.
Message ID <1329885651-15410-1-git-send-email-liming.wang@windriver.com>
Download mbox | patch
Permalink /patch/142427/
State Accepted
Commit d721a3a7714147a54f400f9daeeac059e579a4a4
Headers show

Comments

Liming Wang - Feb. 22, 2012, 4:40 a.m.
From: walimis <walimisdev@gmail.com>

commit f31a911fe (arm, post: add missing post_time_ms for arm)
enables get_ticks and get_tbclk for all arm based boards,
arm/vexpress also needs these functions to work.

Signed-off-by: walimis <walimisdev@gmail.com>
---
 board/armltd/vexpress/ca9x4_ct_vxp.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
Marek Vasut - Feb. 22, 2012, 11:06 a.m.
> From: walimis <walimisdev@gmail.com>
> 
> commit f31a911fe (arm, post: add missing post_time_ms for arm)
> enables get_ticks and get_tbclk for all arm based boards,
> arm/vexpress also needs these functions to work.
> 
> Signed-off-by: walimis <walimisdev@gmail.com>

Please, put your real name in the SoB line. That's the purpose of the SoB line!

> ---
>  board/armltd/vexpress/ca9x4_ct_vxp.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/board/armltd/vexpress/ca9x4_ct_vxp.c
> b/board/armltd/vexpress/ca9x4_ct_vxp.c index da6f14d..0b36d12 100644
> --- a/board/armltd/vexpress/ca9x4_ct_vxp.c
> +++ b/board/armltd/vexpress/ca9x4_ct_vxp.c
> @@ -226,3 +226,13 @@ void lowlevel_init(void)
>  ulong get_board_rev(void){
>  	return readl((u32 *)SYS_ID);
>  }
> +
> +unsigned long long get_ticks(void)
> +{
> +	return get_timer(0);
> +}
> +
> +ulong get_tbclk (void)
> +{
> +	return (ulong)CONFIG_SYS_HZ;
> +}

Patch

diff --git a/board/armltd/vexpress/ca9x4_ct_vxp.c b/board/armltd/vexpress/ca9x4_ct_vxp.c
index da6f14d..0b36d12 100644
--- a/board/armltd/vexpress/ca9x4_ct_vxp.c
+++ b/board/armltd/vexpress/ca9x4_ct_vxp.c
@@ -226,3 +226,13 @@  void lowlevel_init(void)
 ulong get_board_rev(void){
 	return readl((u32 *)SYS_ID);
 }
+
+unsigned long long get_ticks(void)
+{
+	return get_timer(0);
+}
+
+ulong get_tbclk (void)
+{
+	return (ulong)CONFIG_SYS_HZ;
+}