summaryrefslogtreecommitdiff
path: root/board/armltd/integrator/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/armltd/integrator/timer.c')
-rw-r--r--board/armltd/integrator/timer.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/board/armltd/integrator/timer.c b/board/armltd/integrator/timer.c
index d220b877d66..9db5135a8ff 100644
--- a/board/armltd/integrator/timer.c
+++ b/board/armltd/integrator/timer.c
@@ -41,10 +41,10 @@ static unsigned long long div_clock = DIV_CLOCK_INIT;
static unsigned long long div_timer = 1; /* Divisor to convert timer reading
* change to U-Boot ticks
*/
-/* CONFIG_SYS_HZ = CONFIG_SYS_HZ_CLOCK/(div_clock * div_timer) */
+/* CONFIG_SYS_HZ = CFG_SYS_HZ_CLOCK/(div_clock * div_timer) */
static ulong timestamp; /* U-Boot ticks since startup */
-#define READ_TIMER (*(volatile ulong *)(CONFIG_SYS_TIMERBASE+4))
+#define READ_TIMER (*(volatile ulong *)(CFG_SYS_TIMERBASE+4))
/* all function return values in U-Boot ticks i.e. (1/CONFIG_SYS_HZ) sec
* - unless otherwise stated
@@ -55,7 +55,7 @@ static ulong timestamp; /* U-Boot ticks since startup */
int timer_init (void)
{
/* Load timer with initial value */
- *(volatile ulong *)(CONFIG_SYS_TIMERBASE + 0) = TIMER_LOAD_VAL;
+ *(volatile ulong *)(CFG_SYS_TIMERBASE + 0) = TIMER_LOAD_VAL;
#ifdef CONFIG_ARCH_CINTEGRATOR
/* Set timer to be
* enabled 1
@@ -66,7 +66,7 @@ int timer_init (void)
* 32 bit 1
* wrapping 0
*/
- *(volatile ulong *)(CONFIG_SYS_TIMERBASE + 8) = 0x000000C2;
+ *(volatile ulong *)(CFG_SYS_TIMERBASE + 8) = 0x000000C2;
#else
/* Set timer to be
* enabled 1
@@ -75,7 +75,7 @@ int timer_init (void)
* divider 256 10
* XX 00
*/
- *(volatile ulong *)(CONFIG_SYS_TIMERBASE + 8) = 0x00000088;
+ *(volatile ulong *)(CFG_SYS_TIMERBASE + 8) = 0x00000088;
#endif
/* init the timestamp */
@@ -85,7 +85,7 @@ int timer_init (void)
/* start "advancing" time stamp from 0 */
timestamp = 0L;
- div_timer = CONFIG_SYS_HZ_CLOCK;
+ div_timer = CFG_SYS_HZ_CLOCK;
do_div(div_timer, CONFIG_SYS_HZ);
do_div(div_timer, div_clock);
@@ -156,7 +156,7 @@ unsigned long long get_ticks(void)
*/
ulong get_tbclk(void)
{
- unsigned long long tmp = CONFIG_SYS_HZ_CLOCK;
+ unsigned long long tmp = CFG_SYS_HZ_CLOCK;
do_div(tmp, div_clock);