Skip to content
Snippets Groups Projects
Commit c90a4dd7 authored by Christian Riesch's avatar Christian Riesch Committed by Wolfgang Denk
Browse files

post/post.c: Use lldiv for 64-bit divisions


Signed-off-by: default avatarChristian Riesch <christian.riesch@omicron.at>
Cc: Tom Rini <trini@ti.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
parent e21b3dfb
No related branches found
No related tags found
No related merge requests found
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <common.h> #include <common.h>
#include <stdio_dev.h> #include <stdio_dev.h>
#include <watchdog.h> #include <watchdog.h>
#include <div64.h>
#include <post.h> #include <post.h>
#ifdef CONFIG_SYS_POST_HOTKEYS_GPIO #ifdef CONFIG_SYS_POST_HOTKEYS_GPIO
...@@ -495,7 +496,7 @@ void post_reloc(void) ...@@ -495,7 +496,7 @@ void post_reloc(void)
unsigned long post_time_ms(unsigned long base) unsigned long post_time_ms(unsigned long base)
{ {
#if defined(CONFIG_PPC) || defined(CONFIG_ARM) #if defined(CONFIG_PPC) || defined(CONFIG_ARM)
return (unsigned long)(get_ticks() / (get_tbclk() / CONFIG_SYS_HZ)) return (unsigned long)lldiv(get_ticks(), get_tbclk() / CONFIG_SYS_HZ)
- base; - base;
#else #else
#warning "Not implemented yet" #warning "Not implemented yet"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment