From 2cc105c741357e7dc13a456726456bdbb6fcb5e6 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Thu, 14 Feb 2013 15:09:21 -0800 Subject: 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 Reviewed-on: http://review.coreboot.org/2397 Tested-by: build bot (Jenkins) Reviewed-by: Gabe Black --- payloads/libpayload/libc/time.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'payloads/libpayload/libc') 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. * -- cgit v1.2.3