From patchwork Sat Nov 3 00:27:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,08/17] Update time command to avoid using get_timer_masked() Date: Fri, 02 Nov 2012 14:27:24 -0000 From: Simon Glass X-Patchwork-Id: 196782 Message-Id: <1351902453-27956-9-git-send-email-sjg@chromium.org> To: U-Boot Mailing List Cc: Tom Rini It is better to use get_timer() by itself now, according to the new timer API. Signed-off-by: Simon Glass --- common/cmd_time.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/cmd_time.c b/common/cmd_time.c index 6dbdbbf..f1891f9 100644 --- a/common/cmd_time.c +++ b/common/cmd_time.c @@ -32,6 +32,7 @@ static int run_command_and_time_it(int flag, int argc, char * const argv[], { cmd_tbl_t *cmdtp = find_cmd(argv[0]); int retval = 0; + ulong start; if (!cmdtp) { printf("%s: command not found\n", argv[0]); @@ -45,9 +46,9 @@ static int run_command_and_time_it(int flag, int argc, char * const argv[], * boards. We could use the new timer API that Graeme is proposing * so that this piece of code would be arch-independent. */ - *cycles = get_timer_masked(); + start = get_timer(0); retval = cmdtp->cmd(cmdtp, flag, argc, argv); - *cycles = get_timer_masked() - *cycles; + *cycles = get_timer(start); return retval; }