Re: [PATCH 2/2] MIPS: Alchemy: preset loops_per_jiffy based on CPU clock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/29/2015 12:54 PM, Manuel Lauss wrote:

This was lost during the rewrite of clock framework support.

Signed-off-by: Manuel Lauss <manuel.lauss@xxxxxxxxx>
---
  arch/mips/alchemy/common/clock.c | 6 ++++++
  arch/mips/alchemy/common/setup.c | 4 +++-
  2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/mips/alchemy/common/clock.c b/arch/mips/alchemy/common/clock.c
index 428c9f0..680fbb6 100644
--- a/arch/mips/alchemy/common/clock.c
+++ b/arch/mips/alchemy/common/clock.c
@@ -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 = preset_lpj / 2 / HZ;

   How about "preset_lpj /= 2 * HZ;"?

[...]
diff --git a/arch/mips/alchemy/common/setup.c b/arch/mips/alchemy/common/setup.c
index 4e72daf..2902138 100644
--- a/arch/mips/alchemy/common/setup.c
+++ b/arch/mips/alchemy/common/setup.c
@@ -34,10 +34,12 @@
  #include <au1000.h>

  extern void __init board_setup(void);
-extern void set_cpuspec(void);

   Not documented in the change-log?

+extern void __init alchemy_set_lpj(void);

  void __init plat_mem_setup(void)
  {
+	alchemy_set_lpj();
+
[...]

WBR, Sergei






[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux