]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/cpu/armv7/ls102xa/timer.c
Merge branch 'master' of git://git.denx.de/u-boot-video
[u-boot] / arch / arm / cpu / armv7 / ls102xa / timer.c
index 11b17b2c748aa60e937e184fb4cc84f99653602a..d5237d214a2e4b202cac653f0864f29f0b092254 100644 (file)
@@ -56,12 +56,13 @@ static inline unsigned long long us_to_tick(unsigned long long usec)
 int timer_init(void)
 {
        struct sctr_regs *sctr = (struct sctr_regs *)SCTR_BASE_ADDR;
-       unsigned long ctrl, val, freq;
+       unsigned long ctrl, freq;
+       unsigned long long val;
 
        /* Enable System Counter */
        writel(SYS_COUNTER_CTRL_ENABLE, &sctr->cntcr);
 
-       freq = GENERIC_TIMER_CLK;
+       freq = COUNTER_FREQUENCY;
        asm("mcr p15, 0, %0, c14, c0, 0" : : "r" (freq));
 
        /* Set PL1 Physical Timer Ctrl */