Commit 8d5e1d8e authored by Baruch Siach's avatar Baruch Siach Committed by Chris Zankel

xtensa: remove CCOUNT_PER_JIFFY

Use ccount_freq directly to make the code a little more readable.
Signed-off-by: default avatarBaruch Siach <baruch@tkos.co.il>
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
Signed-off-by: default avatarChris Zankel <chris@zankel.net>
parent fedc21dc
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#endif #endif
extern unsigned long ccount_freq; extern unsigned long ccount_freq;
#define CCOUNT_PER_JIFFY (ccount_freq / HZ)
typedef unsigned long long cycles_t; typedef unsigned long long cycles_t;
......
...@@ -585,8 +585,8 @@ c_show(struct seq_file *f, void *slot) ...@@ -585,8 +585,8 @@ c_show(struct seq_file *f, void *slot)
"bogomips\t: %lu.%02lu\n", "bogomips\t: %lu.%02lu\n",
XCHAL_BUILD_UNIQUE_ID, XCHAL_BUILD_UNIQUE_ID,
XCHAL_HAVE_BE ? "big" : "little", XCHAL_HAVE_BE ? "big" : "little",
CCOUNT_PER_JIFFY/(1000000/HZ), ccount_freq/1000000,
(CCOUNT_PER_JIFFY/(10000/HZ)) % 100, (ccount_freq/10000) % 100,
loops_per_jiffy/(500000/HZ), loops_per_jiffy/(500000/HZ),
(loops_per_jiffy/(5000/HZ)) % 100); (loops_per_jiffy/(5000/HZ)) % 100);
......
...@@ -130,7 +130,7 @@ void __init time_init(void) ...@@ -130,7 +130,7 @@ void __init time_init(void)
#else #else
ccount_freq = CONFIG_XTENSA_CPU_CLOCK*1000000UL; ccount_freq = CONFIG_XTENSA_CPU_CLOCK*1000000UL;
#endif #endif
clocksource_register_hz(&ccount_clocksource, CCOUNT_PER_JIFFY * HZ); clocksource_register_hz(&ccount_clocksource, ccount_freq);
ccount_timer.evt.cpumask = cpumask_of(0); ccount_timer.evt.cpumask = cpumask_of(0);
ccount_timer.evt.irq = irq_create_mapping(NULL, LINUX_TIMER_INT); 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,7 +164,7 @@ irqreturn_t timer_interrupt (int irq, void *dev_id)
#ifndef CONFIG_GENERIC_CALIBRATE_DELAY #ifndef CONFIG_GENERIC_CALIBRATE_DELAY
void calibrate_delay(void) void calibrate_delay(void)
{ {
loops_per_jiffy = CCOUNT_PER_JIFFY; loops_per_jiffy = ccount_freq / HZ;
printk("Calibrating delay loop (skipped)... " printk("Calibrating delay loop (skipped)... "
"%lu.%02lu BogoMIPS preset\n", "%lu.%02lu BogoMIPS preset\n",
loops_per_jiffy/(1000000/HZ), loops_per_jiffy/(1000000/HZ),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment