From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Date: Fri, 8 Nov 2013 08:40:44 -0600 Subject: [U-Boot] [PATCH 2/2] sandbox: convert to common time functions In-Reply-To: <1383921644-3158-1-git-send-email-robherring2@gmail.com> References: <1383921644-3158-1-git-send-email-robherring2@gmail.com> Message-ID: <1383921644-3158-2-git-send-email-robherring2@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Rob Herring Convert sandbox to use common time functions. Signed-off-by: Rob Herring --- 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