aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2013-07-15 01:24:22 -0400
committerChris Zankel <chris@zankel.net>2013-09-06 12:48:59 -0400
commit8d5e1d8e62e87cd9eaecb4956261cce4320240fd (patch)
tree1523cdefb923b471b675570028674e112d9efa2c /arch/xtensa
parentfedc21dce814b500e2a9b3cc51f5f802d39e22e5 (diff)
xtensa: remove CCOUNT_PER_JIFFY
Use ccount_freq directly to make the code a little more readable. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/include/asm/timex.h1
-rw-r--r--arch/xtensa/kernel/setup.c4
-rw-r--r--arch/xtensa/kernel/time.c4
3 files changed, 4 insertions, 5 deletions
diff --git a/arch/xtensa/include/asm/timex.h b/arch/xtensa/include/asm/timex.h
index 86aca77339f2..27fa3c170662 100644
--- a/arch/xtensa/include/asm/timex.h
+++ b/arch/xtensa/include/asm/timex.h
@@ -36,7 +36,6 @@
36#endif 36#endif
37 37
38extern unsigned long ccount_freq; 38extern unsigned long ccount_freq;
39#define CCOUNT_PER_JIFFY (ccount_freq / HZ)
40 39
41typedef unsigned long long cycles_t; 40typedef unsigned long long cycles_t;
42 41
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 42a8bba0b0ea..4a8f027ed9ae 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -585,8 +585,8 @@ c_show(struct seq_file *f, void *slot)
585 "bogomips\t: %lu.%02lu\n", 585 "bogomips\t: %lu.%02lu\n",
586 XCHAL_BUILD_UNIQUE_ID, 586 XCHAL_BUILD_UNIQUE_ID,
587 XCHAL_HAVE_BE ? "big" : "little", 587 XCHAL_HAVE_BE ? "big" : "little",
588 CCOUNT_PER_JIFFY/(1000000/HZ), 588 ccount_freq/1000000,
589 (CCOUNT_PER_JIFFY/(10000/HZ)) % 100, 589 (ccount_freq/10000) % 100,
590 loops_per_jiffy/(500000/HZ), 590 loops_per_jiffy/(500000/HZ),
591 (loops_per_jiffy/(5000/HZ)) % 100); 591 (loops_per_jiffy/(5000/HZ)) % 100);
592 592
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c
index a65cb3808e1c..9af3dd88ad7e 100644
--- a/arch/xtensa/kernel/time.c
+++ b/arch/xtensa/kernel/time.c
@@ -130,7 +130,7 @@ void __init time_init(void)
130#else 130#else
131 ccount_freq = CONFIG_XTENSA_CPU_CLOCK*1000000UL; 131 ccount_freq = CONFIG_XTENSA_CPU_CLOCK*1000000UL;
132#endif 132#endif
133 clocksource_register_hz(&ccount_clocksource, CCOUNT_PER_JIFFY * HZ); 133 clocksource_register_hz(&ccount_clocksource, ccount_freq);
134 134
135 ccount_timer.evt.cpumask = cpumask_of(0); 135 ccount_timer.evt.cpumask = cpumask_of(0);
136 ccount_timer.evt.irq = irq_create_mapping(NULL, LINUX_TIMER_INT); 136 ccount_timer.evt.irq = irq_create_mapping(NULL, LINUX_TIMER_INT);
@@ -164,7 +164,7 @@ irqreturn_t timer_interrupt (int irq, void *dev_id)
164#ifndef CONFIG_GENERIC_CALIBRATE_DELAY 164#ifndef CONFIG_GENERIC_CALIBRATE_DELAY
165void calibrate_delay(void) 165void calibrate_delay(void)
166{ 166{
167 loops_per_jiffy = CCOUNT_PER_JIFFY; 167 loops_per_jiffy = ccount_freq / HZ;
168 printk("Calibrating delay loop (skipped)... " 168 printk("Calibrating delay loop (skipped)... "
169 "%lu.%02lu BogoMIPS preset\n", 169 "%lu.%02lu BogoMIPS preset\n",
170 loops_per_jiffy/(1000000/HZ), 170 loops_per_jiffy/(1000000/HZ),