summaryrefslogtreecommitdiffstats
path: root/arch/mips/ar7/time.c
diff options
context:
space:
mode:
authorFlorian Fainelli2010-10-31 23:49:58 +0100
committerRalf Baechle2010-12-16 19:10:56 +0100
commit0bc6791707694c77b3543de39f77972a65de917a (patch)
treeb3c0f870535093c701816abcde5cd617b1cbf46e /arch/mips/ar7/time.c
parentMIPS: AR7: Fix double ar7_gpio_init declaration (diff)
downloadkernel-qcow2-linux-0bc6791707694c77b3543de39f77972a65de917a.tar.gz
kernel-qcow2-linux-0bc6791707694c77b3543de39f77972a65de917a.tar.xz
kernel-qcow2-linux-0bc6791707694c77b3543de39f77972a65de917a.zip
MIPS: AR7: Fix loops per jiffies on TNETD7200 devices
TNETD7200 run their CPU clock faster than the default CPU clock we assume. In order to have the correct loops per jiffies settings, initialize clocks right before setting mips_hpt_frequency. As a side effect, we can no longer use msleep in clocks.c which requires other parts of the kernel to be initialized, so replace these with mdelay. Signed-off-by: Florian Fainelli <florian@openwrt.org> To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1749/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/ar7/time.c')
-rw-r--r--arch/mips/ar7/time.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/ar7/time.c b/arch/mips/ar7/time.c
index 5fb8a0134085..22c93213b233 100644
--- a/arch/mips/ar7/time.c
+++ b/arch/mips/ar7/time.c
@@ -30,6 +30,9 @@ void __init plat_time_init(void)
{
struct clk *cpu_clk;
+ /* Initialize ar7 clocks so the CPU clock frequency is correct */
+ ar7_init_clocks();
+
cpu_clk = clk_get(NULL, "cpu");
if (IS_ERR(cpu_clk)) {
printk(KERN_ERR "unable to get cpu clock\n");