Re: [U-Boot] [PATCH 6/6] armv8: Allow SoCs to override the generic timer

2015-03-24 Thread FengHua


hi Thierry,

 -Original Messages-
 From: Thierry Reding thierry.red...@gmail.com
 Sent Time: 2015-03-20 19:47:53 (Friday)
 To: u-boot@lists.denx.de
 Cc: Marc Zyngier marc.zyng...@arm.com
 Subject: [U-Boot] [PATCH 6/6] armv8: Allow SoCs to override the generic timer
 
 From: Thierry Reding tred...@nvidia.com
 
 Some SoCs come with a custom timer interface, so allow them to use that
 instead.
Arch timer is always available when core running, 
It's better to use arch timer instead of other custom timer interface.

 
 Cc: Albert Aribaud albert.u.b...@aribaud.net
 Cc: Marc Zyngier marc.zyng...@arm.com
 Signed-off-by: Thierry Reding tred...@nvidia.com
 ---
  arch/arm/cpu/armv8/generic_timer.c | 2 ++
  1 file changed, 2 insertions(+)
 
 diff --git a/arch/arm/cpu/armv8/generic_timer.c 
 b/arch/arm/cpu/armv8/generic_timer.c
 index 223b95e210ed..ab8573fc7cef 100644
 --- a/arch/arm/cpu/armv8/generic_timer.c
 +++ b/arch/arm/cpu/armv8/generic_timer.c
 @@ -9,6 +9,7 @@
  #include command.h
  #include asm/system.h
  
 +#ifndef CONFIG_SYS_TIMER_COUNTER
  /*
   * Generic timer implementation of get_tbclk()
   */
 @@ -29,3 +30,4 @@ unsigned long timer_read_counter(void)
   asm volatile(mrs %0, cntpct_el0 : =r (cntpct));
   return cntpct;
  }
 +#endif
 -- 
 2.3.2
 

Yours.







___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 6/6] armv8: Allow SoCs to override the generic timer

2015-03-20 Thread Thierry Reding
From: Thierry Reding tred...@nvidia.com

Some SoCs come with a custom timer interface, so allow them to use that
instead.

Cc: Albert Aribaud albert.u.b...@aribaud.net
Cc: Marc Zyngier marc.zyng...@arm.com
Signed-off-by: Thierry Reding tred...@nvidia.com
---
 arch/arm/cpu/armv8/generic_timer.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/cpu/armv8/generic_timer.c 
b/arch/arm/cpu/armv8/generic_timer.c
index 223b95e210ed..ab8573fc7cef 100644
--- a/arch/arm/cpu/armv8/generic_timer.c
+++ b/arch/arm/cpu/armv8/generic_timer.c
@@ -9,6 +9,7 @@
 #include command.h
 #include asm/system.h
 
+#ifndef CONFIG_SYS_TIMER_COUNTER
 /*
  * Generic timer implementation of get_tbclk()
  */
@@ -29,3 +30,4 @@ unsigned long timer_read_counter(void)
asm volatile(mrs %0, cntpct_el0 : =r (cntpct));
return cntpct;
 }
+#endif
-- 
2.3.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/6] armv8: Allow SoCs to override the generic timer

2015-03-20 Thread Marc Zyngier
On 20/03/15 11:47, Thierry Reding wrote:
 From: Thierry Reding tred...@nvidia.com
 
 Some SoCs come with a custom timer interface, so allow them to use that
 instead.
 
 Cc: Albert Aribaud albert.u.b...@aribaud.net
 Cc: Marc Zyngier marc.zyng...@arm.com
 Signed-off-by: Thierry Reding tred...@nvidia.com
 ---
  arch/arm/cpu/armv8/generic_timer.c | 2 ++
  1 file changed, 2 insertions(+)
 
 diff --git a/arch/arm/cpu/armv8/generic_timer.c 
 b/arch/arm/cpu/armv8/generic_timer.c
 index 223b95e210ed..ab8573fc7cef 100644
 --- a/arch/arm/cpu/armv8/generic_timer.c
 +++ b/arch/arm/cpu/armv8/generic_timer.c
 @@ -9,6 +9,7 @@
  #include command.h
  #include asm/system.h
  
 +#ifndef CONFIG_SYS_TIMER_COUNTER
  /*
   * Generic timer implementation of get_tbclk()
   */
 @@ -29,3 +30,4 @@ unsigned long timer_read_counter(void)
   asm volatile(mrs %0, cntpct_el0 : =r (cntpct));
   return cntpct;
  }
 +#endif
 

Does it mean that in this case, the generic timers are not in a working
state? For ARMv8, it would make a lot more sense to make sure that the
basic CPU stuff is actually in a working state, and avoid the madness
that we have on ARMv7...

Thanks,

M.
-- 
Jazz is not dead. It just smells funny...
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot