aboutsummaryrefslogtreecommitdiff
path: root/payloads/libpayload/libc/time.c
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@coresystems.de>2009-05-21 10:02:52 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2009-05-21 10:02:52 +0000
commitd385ed29b94af71dedeb5f44d72ad8dab43c4664 (patch)
tree6eea529dc55d67078ac9fc0fbf271189318c4a12 /payloads/libpayload/libc/time.c
parent1e6f6929c1ee96b291ef17e8d801f376a5dbb0d2 (diff)
This change adds PPC support to libpayload, and hooks it up in the build
process. The PPC support is still stubbed, with commented out x86 code as guide line for an implementor. Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4293 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/libc/time.c')
-rw-r--r--payloads/libpayload/libc/time.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/payloads/libpayload/libc/time.c b/payloads/libpayload/libc/time.c
index 2d19bd173f..67675623a4 100644
--- a/payloads/libpayload/libc/time.c
+++ b/payloads/libpayload/libc/time.c
@@ -34,7 +34,9 @@
#include <libpayload-config.h>
#include <libpayload.h>
+#ifdef CONFIG_TARGET_I386
#include <arch/rdtsc.h>
+#endif
extern u32 cpu_khz;
@@ -47,6 +49,7 @@ static struct {
#define TICKS_PER_SEC (cpu_khz * 1000)
#define TICKS_PER_USEC (cpu_khz / 1000)
+#ifdef CONFIG_TARGET_I386
static void update_clock(void)
{
u64 delta = rdtsc() - clock.ticks;
@@ -114,7 +117,16 @@ static void gettimeofday_init(void)
clock.ticks = rdtsc();
}
#endif
+#endif
+#ifdef CONFIG_TARGET_POWERPC
+static void update_clock(void)
+{
+}
+static void gettimeofday_init(void)
+{
+}
+#endif
/**
* Return the current time broken into a timeval structure.
*