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>
This commit is contained in:
Ronald G. Minnich 2013-02-14 15:09:21 -08:00 committed by Gabe Black
parent c1ee8641cb
commit 2cc105c741
1 changed files with 13 additions and 6 deletions

View File

@ -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.
*