diff options
author | Manuel Lauss <manuel.lauss@googlemail.com> | 2009-08-27 13:21:18 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-09-17 14:07:51 -0400 |
commit | a7bcb1ae6094db78b077ae17e92c69de7643014f (patch) | |
tree | b59e32e51c84bcc69a9458fa8b7bc8d11286dea0 /arch/mips/alchemy | |
parent | f7557dc8215a2e7eb22da583d03e1aef72c58b3c (diff) |
MIPS: Alchemy: override loops_per_jiffy detection
loops_per_jiffy depends on coreclk speed; preset it instead of
letting the kernel waste precious microseconds trying to approximate it.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/alchemy')
-rw-r--r-- | arch/mips/alchemy/common/setup.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/alchemy/common/setup.c b/arch/mips/alchemy/common/setup.c index 3f036b3d400e..6184baa56786 100644 --- a/arch/mips/alchemy/common/setup.c +++ b/arch/mips/alchemy/common/setup.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/ioport.h> | 29 | #include <linux/ioport.h> |
30 | #include <linux/jiffies.h> | ||
30 | #include <linux/module.h> | 31 | #include <linux/module.h> |
31 | #include <linux/pm.h> | 32 | #include <linux/pm.h> |
32 | 33 | ||
@@ -53,6 +54,9 @@ void __init plat_mem_setup(void) | |||
53 | printk(KERN_INFO "(PRId %08x) @ %lu.%02lu MHz\n", read_c0_prid(), | 54 | printk(KERN_INFO "(PRId %08x) @ %lu.%02lu MHz\n", read_c0_prid(), |
54 | est_freq / 1000000, ((est_freq % 1000000) * 100) / 1000000); | 55 | est_freq / 1000000, ((est_freq % 1000000) * 100) / 1000000); |
55 | 56 | ||
57 | /* this is faster than wasting cycles trying to approximate it */ | ||
58 | preset_lpj = (est_freq >> 1) / HZ; | ||
59 | |||
56 | _machine_restart = au1000_restart; | 60 | _machine_restart = au1000_restart; |
57 | _machine_halt = au1000_halt; | 61 | _machine_halt = au1000_halt; |
58 | pm_power_off = au1000_power_off; | 62 | pm_power_off = au1000_power_off; |