summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2013-02-14 15:09:21 -0800
committerGabe Black <gabeblack@chromium.org>2013-02-15 06:51:38 +0100
commit2cc105c741357e7dc13a456726456bdbb6fcb5e6 (patch)
treec26586fc8f38f65de65c9dd7572dca2d4c4825cd /payloads/libpayload
parentc1ee8641cb350de289fd77e9e9231bda46d6a386 (diff)
libpayload: get time to compile cross-arch
Get rid of the nest of includes, and make separate sections for each architecture. Also gets rid of the "there's X86 and there's everything else" structure of this file. Change-Id: I4232f50f048fa05e911e5de3aa9ec1530931b461 Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: http://review.coreboot.org/2397 Tested-by: build bot (Jenkins) Reviewed-by: Gabe Black <gabeblack@chromium.org>
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/libc/time.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/payloads/libpayload/libc/time.c b/payloads/libpayload/libc/time.c
index 5358c0247a..91f6296d85 100644
--- a/payloads/libpayload/libc/time.c
+++ b/payloads/libpayload/libc/time.c
@@ -110,14 +110,20 @@ static void gettimeofday_init(void)
clock.secs = (days * 86400) + (tm.tm_hour * 3600) +
(tm.tm_min * 60) + tm.tm_sec;
}
-#else
+#endif // CONFIG_NVRAM
+#endif // CONFIG_ARCH_X86
+
+#ifdef CONFIG_ARCH_ARMV7
+static void update_clock(void)
+{
+}
+
static void gettimeofday_init(void)
{
- /* Record the number of ticks */
- clock.ticks = rdtsc();
}
-#endif
-#endif
+#endif // CONFIG_ARCH_ARMV7
+
+
#ifdef CONFIG_ARCH_POWERPC
static void update_clock(void)
{
@@ -126,7 +132,8 @@ static void update_clock(void)
static void gettimeofday_init(void)
{
}
-#endif
+#endif // CONFIG_ARCH_POWERPC
+
/**
* Return the current time broken into a timeval structure.
*