Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1420174 > unrolled thread

[PATCH v2 03/17] sh: set preset_lpj

Started byYoshinori Sato <ysato@users.sourceforge.jp>
First post2016-06-12 09:00 +0200
Last post2016-06-12 09:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 03/17] sh: set preset_lpj Yoshinori Sato <ysato@users.sourceforge.jp> - 2016-06-12 09:00 +0200

#1420174 — [PATCH v2 03/17] sh: set preset_lpj

FromYoshinori Sato <ysato@users.sourceforge.jp>
Date2016-06-12 09:00 +0200
Subject[PATCH v2 03/17] sh: set preset_lpj
Message-ID<rJ7xf-5js-15@gated-at.bofh.it>
Generic callibrate delay required this value.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
 arch/sh/boards/of-generic.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/sh/boards/of-generic.c b/arch/sh/boards/of-generic.c
index d24bc02..e2b4d98 100644
--- a/arch/sh/boards/of-generic.c
+++ b/arch/sh/boards/of-generic.c
@@ -128,6 +128,8 @@ static void __init sh_of_time_init(void)
 static void __init sh_of_setup(char **cmdline_p)
 {
 	struct device_node *root;
+	struct device_node *cpu;
+	u32 freq;
 
 	board_time_init = sh_of_time_init;
 
@@ -139,6 +141,10 @@ static void __init sh_of_setup(char **cmdline_p)
 	}
 
 	sh_of_smp_probe();
+
+	cpu = of_find_node_by_name(NULL, "cpu");
+	if (!of_property_read_u32(cpu, "clock-frequency", &freq))
+		preset_lpj = freq / CONFIG_HZ / 2;
 }
 
 static int sh_of_irq_demux(int irq)
-- 
2.7.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web