diff options
author | Javier Jardón <javier.jardon@codethink.co.uk> | 2015-05-06 21:24:22 +0100 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2015-05-06 22:26:12 +0100 |
commit | fa757c05347386169c94e070a61619c70d0f4ba6 (patch) | |
tree | 8d723ce320e3c84f6693e486a0139b8cd6ef2d09 | |
parent | a5d63454aa36d3dc85835041f856c40cf1a40dd4 (diff) | |
download | u-boot-fa757c05347386169c94e070a61619c70d0f4ba6.tar.gz |
arch/arm/cpu/arm926ejs/aspeed/timer.c: Fix build
-rw-r--r-- | arch/arm/cpu/arm926ejs/aspeed/timer.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/cpu/arm926ejs/aspeed/timer.c b/arch/arm/cpu/arm926ejs/aspeed/timer.c index add4c0eef3..890d477fcd 100644 --- a/arch/arm/cpu/arm926ejs/aspeed/timer.c +++ b/arch/arm/cpu/arm926ejs/aspeed/timer.c @@ -17,17 +17,28 @@ #include <common.h> +#define TIMER_LOAD_VAL 0xffffffff + +#ifdef CONFIG_ASPEED_TIMER_CLK + #if CONFIG_ASPEED_TIMER_CLK < CONFIG_SYS_HZ #error "CONFIG_ASPEED_TIMER_CLK must be as large as CONFIG_SYS_HZ" #endif -#define TIMER_LOAD_VAL 0xffffffff #define CLK_PER_HZ (CONFIG_ASPEED_TIMER_CLK / CONFIG_SYS_HZ) /* macro to read the 32 bit timer */ #define READ_CLK (*(volatile ulong *)(CONFIG_SYS_TIMERBASE + 0)) #define READ_TIMER (READ_CLK / CLK_PER_HZ) +#else + +/* macro to read the 32 bit timer */ +#define READ_TIMER (*(volatile ulong *)(CONFIG_SYS_TIMERBASE+0)) + +#endif /* CONFIG_ASPEED_TIMER_CLK */ + + static ulong timestamp; static ulong lastdec; |