MIPS: Alchemy: move calc_clock function.
Now that nothing in time.c depends on calc_clock, it can be moved to clocks.c where it belongs. While at it, give it a better non-generic name and call it as soon as possible in plat_mem_init. Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:

committed by
Ralf Baechle

parent
0c694de12b
commit
2699cdfb76
@@ -44,6 +44,15 @@ extern void set_cpuspec(void);
|
||||
|
||||
void __init plat_mem_setup(void)
|
||||
{
|
||||
unsigned long est_freq;
|
||||
|
||||
/* determine core clock */
|
||||
est_freq = au1xxx_calc_clock();
|
||||
est_freq += 5000; /* round */
|
||||
est_freq -= est_freq % 10000;
|
||||
printk(KERN_INFO "(PRId %08x) @ %lu.%02lu MHz\n", read_c0_prid(),
|
||||
est_freq / 1000000, ((est_freq % 1000000) * 100) / 1000000);
|
||||
|
||||
_machine_restart = au1000_restart;
|
||||
_machine_halt = au1000_halt;
|
||||
pm_power_off = au1000_power_off;
|
||||
|
Reference in New Issue
Block a user