]> git.karo-electronics.de Git - linux-beck.git/commitdiff
xtensa: cleanup ccount frequency tracking
authorBaruch Siach <baruch@tkos.co.il>
Mon, 17 Jun 2013 08:29:43 +0000 (11:29 +0300)
committerChris Zankel <chris@zankel.net>
Mon, 8 Jul 2013 08:11:37 +0000 (01:11 -0700)
Remove unused nsec_per_ccount, and rename ccount_per_jiffy to ccount_preq.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Chris Zankel <chris@zankel.net>
arch/xtensa/include/asm/timex.h
arch/xtensa/kernel/platform.c
arch/xtensa/kernel/time.c
arch/xtensa/platforms/xtfpga/setup.c
arch/xtensa/variants/s6000/delay.c

index c47989a0e3ad4c7e68ac30e663cd999b14f1f503..69f901713fb6fd754301d35372eaf2f54a543c7f 100644 (file)
@@ -36,9 +36,8 @@
 #endif
 
 #ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
-extern unsigned long ccount_per_jiffy;
-extern unsigned long nsec_per_ccount;
-#define CCOUNT_PER_JIFFY ccount_per_jiffy
+extern unsigned long ccount_freq;
+#define CCOUNT_PER_JIFFY (ccount_freq / HZ)
 #else
 #define CCOUNT_PER_JIFFY (CONFIG_XTENSA_CPU_CLOCK*(1000000UL/HZ))
 #endif
index da827cbb2f59b7970a615dead9099062b7179b3c..1cf008284dd2925599df108f776ccdfb2e10e222 100644 (file)
@@ -41,6 +41,6 @@ _F(void, pcibios_init, (void), { });
 _F(void, calibrate_ccount, (void),
 {
        pr_err("ERROR: Cannot calibrate cpu frequency! Assuming 10MHz.\n");
-       ccount_per_jiffy = 10 * (1000000UL/HZ);
+       ccount_freq = 10 * 1000000UL;
 });
 #endif
index ffb4741043116dc0bb76a5ccdb11f161257ac9cd..a32bc2ea7982981f8a62b67c7dde41d2c3a7427d 100644 (file)
@@ -28,8 +28,7 @@
 #include <asm/platform.h>
 
 #ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
-unsigned long ccount_per_jiffy;                /* per 1/HZ */
-unsigned long nsec_per_ccount;         /* nsec per ccount increment */
+unsigned long ccount_freq;             /* ccount Hz */
 #endif
 
 static cycle_t ccount_read(struct clocksource *cs)
@@ -57,8 +56,8 @@ void __init time_init(void)
 #ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
        printk("Calibrating CPU frequency ");
        platform_calibrate_ccount();
-       printk("%d.%02d MHz\n", (int)ccount_per_jiffy/(1000000/HZ),
-                       (int)(ccount_per_jiffy/(10000/HZ))%100);
+       printk("%d.%02d MHz\n", (int)ccount_freq/1000000,
+                       (int)(ccount_freq/10000)%100);
 #endif
        clocksource_register_hz(&ccount_clocksource, CCOUNT_PER_JIFFY * HZ);
 
index c7ce62ff73f777cd8f36e19bb93b59d6233d18f8..74bb74fa3f878e374dafc18fe5934945b08e4c6f 100644 (file)
@@ -179,8 +179,7 @@ void __init platform_calibrate_ccount(void)
        if (!clk_freq)
                clk_freq = *(long *)XTFPGA_CLKFRQ_VADDR;
 
-       ccount_per_jiffy = clk_freq / HZ;
-       nsec_per_ccount = 1000000000UL / clk_freq;
+       ccount_freq = clk_freq;
 }
 
 #endif
index 54b2b573f166947538a6bc590504821e539928d7..baefd3a3c2aaf20fd482bb661b2762dc105791f1 100644 (file)
@@ -22,6 +22,5 @@ void platform_calibrate_ccount(void)
                        a = b;
        } while (--i >= 0);
        b -= a;
-       nsec_per_ccount = (LOOPS * 10000) / b;
-       ccount_per_jiffy = b * (100000UL / (LOOPS * HZ));
+       ccount_freq = b * (100000UL / LOOPS);
 }