diff mbox

[U-Boot] openrisc: implement get_ticks and get_tbclk

Message ID 1329930610-14474-2-git-send-email-stefan.kristiansson@saunalahti.fi
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Stefan Kristiansson Feb. 22, 2012, 5:10 p.m. UTC
Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
---
 arch/openrisc/lib/timer.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

Comments

Tom Rini Oct. 2, 2012, 10:06 p.m. UTC | #1
On Wed, Feb 22, 2012 at 07:10:10AM -0000, Stefan Kristiansson wrote:

> Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/arch/openrisc/lib/timer.c b/arch/openrisc/lib/timer.c
index 4e92a31..89e644b 100644
--- a/arch/openrisc/lib/timer.c
+++ b/arch/openrisc/lib/timer.c
@@ -86,6 +86,16 @@  void set_timer(ulong t)
 	timestamp = t;
 }
 
+unsigned long long get_ticks(void)
+{
+	return get_timer(0);
+}
+
+ulong get_tbclk(void)
+{
+	return CONFIG_SYS_HZ;
+}
+
 void __udelay(ulong usec)
 {
 	ulong elapsed = 0;