]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
MIPS: Alchemy: preset loops_per_jiffy based on CPU clock
authorManuel Lauss <manuel.lauss@gmail.com>
Thu, 29 Jan 2015 15:06:43 +0000 (16:06 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 20 Feb 2015 12:00:25 +0000 (13:00 +0100)
This was lost during the rewrite of clock framework support.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/9149/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/alchemy/common/clock.c
arch/mips/alchemy/common/setup.c

index ade73375ede6a9a6b2d042b37916b957a10794b3..3612d76007a45c29201ea0960e21ac6b0ced43b2 100644 (file)
@@ -133,6 +133,12 @@ static unsigned long alchemy_clk_cpu_recalc(struct clk_hw *hw,
        return t;
 }
 
+void __init alchemy_set_lpj(void)
+{
+       preset_lpj = alchemy_clk_cpu_recalc(NULL, ALCHEMY_ROOTCLK_RATE);
+       preset_lpj /= 2 * HZ;
+}
+
 static struct clk_ops alchemy_clkops_cpu = {
        .recalc_rate    = alchemy_clk_cpu_recalc,
 };
index 4e72daf12c325063a62da8c9255cee504a4e5fd4..9a0c4c8da1064c52f901fd52052b80475ff26bb0 100644 (file)
 
 extern void __init board_setup(void);
 extern void set_cpuspec(void);
+extern void __init alchemy_set_lpj(void);
 
 void __init plat_mem_setup(void)
 {
+       alchemy_set_lpj();
+
        if (au1xxx_cpu_needs_config_od())
                /* Various early Au1xx0 errata corrected by this */
                set_c0_config(1 << 19); /* Set Config[OD] */