diff options
author | Manuel Lauss <mano@roarinelk.homelinux.net> | 2008-12-21 03:26:24 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-01-11 04:57:27 -0500 |
commit | 2699cdfb765c3b7d77d28ea3bc7d84e486697177 (patch) | |
tree | 690eb6e847c7acfc0a5693a385907da480f33fd8 /arch/mips/alchemy/common/setup.c | |
parent | 0c694de12b54fa96b9555e07603f567906ce21c8 (diff) |
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>
Diffstat (limited to 'arch/mips/alchemy/common/setup.c')
-rw-r--r-- | arch/mips/alchemy/common/setup.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/mips/alchemy/common/setup.c b/arch/mips/alchemy/common/setup.c index 8ad453af2c64..3f036b3d400e 100644 --- a/arch/mips/alchemy/common/setup.c +++ b/arch/mips/alchemy/common/setup.c | |||
@@ -44,6 +44,15 @@ extern void set_cpuspec(void); | |||
44 | 44 | ||
45 | void __init plat_mem_setup(void) | 45 | void __init plat_mem_setup(void) |
46 | { | 46 | { |
47 | unsigned long est_freq; | ||
48 | |||
49 | /* determine core clock */ | ||
50 | est_freq = au1xxx_calc_clock(); | ||
51 | est_freq += 5000; /* round */ | ||
52 | est_freq -= est_freq % 10000; | ||
53 | printk(KERN_INFO "(PRId %08x) @ %lu.%02lu MHz\n", read_c0_prid(), | ||
54 | est_freq / 1000000, ((est_freq % 1000000) * 100) / 1000000); | ||
55 | |||
47 | _machine_restart = au1000_restart; | 56 | _machine_restart = au1000_restart; |
48 | _machine_halt = au1000_halt; | 57 | _machine_halt = au1000_halt; |
49 | pm_power_off = au1000_power_off; | 58 | pm_power_off = au1000_power_off; |