Patchwork [U-Boot,v2,1/6] imx: Add get_tbclk() function for imx25

login
register
mail settings
Submitter Matthias Weisser
Date July 6, 2011, 10:28 a.m.
Message ID <1309948113-12971-2-git-send-email-weisserm@arcor.de>
Download mbox | patch
Permalink /patch/103448/
State Accepted
Delegated to: Stefano Babic
Headers show

Comments

Matthias Weisser - July 6, 2011, 10:28 a.m.
Need this function for autoboot keyd

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
---
 arch/arm/cpu/arm926ejs/mx25/timer.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
Stefano Babic - July 13, 2011, 11:33 a.m.
On 07/06/2011 12:28 PM, Matthias Weisser wrote:
> Need this function for autoboot keyd
> 
> Signed-off-by: Matthias Weisser <weisserm@arcor.de>
> ---
>  arch/arm/cpu/arm926ejs/mx25/timer.c |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 

Appplied to u-boot-imx, thanks

Best regards,
Stefano Babic

Patch

diff --git a/arch/arm/cpu/arm926ejs/mx25/timer.c b/arch/arm/cpu/arm926ejs/mx25/timer.c
index 14f0c2d..7c8a71b 100644
--- a/arch/arm/cpu/arm926ejs/mx25/timer.c
+++ b/arch/arm/cpu/arm926ejs/mx25/timer.c
@@ -187,3 +187,15 @@  void __udelay (unsigned long usec)
 	while (get_ticks() < tmp)	/* loop till event */
 		 /*NOP*/;
 }
+
+/*
+ * This function is derived from PowerPC code (timebase clock frequency).
+ * On ARM it returns the number of timer ticks per second.
+ */
+ulong get_tbclk(void)
+{
+	ulong tbclk;
+
+	tbclk = CONFIG_MX25_CLK32;
+	return tbclk;
+}