public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Rob Herring <robherring2@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] sandbox: convert to common time functions
Date: Fri,  8 Nov 2013 08:40:44 -0600	[thread overview]
Message-ID: <1383921644-3158-2-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <1383921644-3158-1-git-send-email-robherring2@gmail.com>

From: Rob Herring <rob.herring@calxeda.com>

Convert sandbox to use common time functions.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
 board/sandbox/sandbox/sandbox.c | 14 ++------------
 include/configs/sandbox.h       |  2 ++
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/board/sandbox/sandbox/sandbox.c b/board/sandbox/sandbox/sandbox.c
index f471cb7..65dcce8 100644
--- a/board/sandbox/sandbox/sandbox.c
+++ b/board/sandbox/sandbox/sandbox.c
@@ -18,19 +18,9 @@ void flush_cache(unsigned long start, unsigned long size)
 {
 }
 
-ulong get_tbclk(void)
+unsigned long timer_read_counter(void)
 {
-	return CONFIG_SYS_HZ;
-}
-
-unsigned long long get_ticks(void)
-{
-	return get_timer(0);
-}
-
-ulong get_timer(ulong base)
-{
-	return (os_get_nsec() / 1000000) - base;
+	return os_get_nsec() / 1000;
 }
 
 int timer_init(void)
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 279abbc..01628e1 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -16,6 +16,8 @@
 
 #endif
 
+#define CONFIG_SYS_TIMER_RATE		1000000
+
 #define CONFIG_BOOTSTAGE
 #define CONFIG_BOOTSTAGE_REPORT
 
-- 
1.8.1.2

  reply	other threads:[~2013-11-08 14:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-08 14:40 [U-Boot] [PATCH 1/2] time: add weak annotation to timer_read_counter declaration Rob Herring
2013-11-08 14:40 ` Rob Herring [this message]
2013-11-08 16:32   ` [U-Boot] [PATCH 2/2] sandbox: convert to common time functions Simon Glass
2013-11-08 17:18     ` Rob Herring
2013-11-08 18:36       ` Simon Glass
2013-11-08 22:25   ` Tom Rini
2013-11-08 22:25 ` [U-Boot] [PATCH 1/2] time: add weak annotation to timer_read_counter declaration Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1383921644-3158-2-git-send-email-robherring2@gmail.com \
    --to=robherring2@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox