linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [RFC] ARM: shmobile: koelsch-reference: Work around core clock issues
@ 2014-03-13 14:29 Geert Uytterhoeven
  2014-03-14  8:51 ` Simon Horman
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: Geert Uytterhoeven @ 2014-03-13 14:29 UTC (permalink / raw)
  To: linux-sh

From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>

Due to issues with runtime PM clock management, clocks not explicitly
managed by their drivers may not be enabled at all, or be inadvertently
disabled by the clk_disable_unused() late initcall.

Until this is fixed, add a temporary workaround, calling
shmobile_clk_workaround() with enable = true.

For now this enables the clocks for: ether, i2c2, msiof0, qspi_mod, and
thermal. More clocks can be added if needed.

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
---
Tested with and without CONFIG_PM_RUNTIME

 arch/arm/mach-shmobile/board-koelsch-reference.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
index a760f7f19bc9..040c6b99cde2 100644
--- a/arch/arm/mach-shmobile/board-koelsch-reference.c
+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
@@ -107,9 +107,21 @@ static const struct clk_name clk_names[] = {
 	{ "lvds0", "lvds.0", "rcar-du-r8a7791" },
 };
 
+/*
+ * This is a really crude hack to work around core platform clock issues
+ */
+static const struct clk_name clk_enables[] = {
+	{ "ether", NULL, "ee700000.ethernet" },
+	{ "i2c2", NULL, "e6530000.i2c" },
+	{ "msiof0", NULL, "e6e20000.spi" },
+	{ "qspi_mod", NULL, "e6b10000.spi" },
+	{ "thermal", NULL, "e61f0000.thermal" },
+};
+
 static void __init koelsch_add_standard_devices(void)
 {
 	shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
+	shmobile_clk_workaround(clk_enables, ARRAY_SIZE(clk_enables), true);
 	r8a7791_add_dt_devices();
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2014-03-18  0:25 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-13 14:29 [PATCH] [RFC] ARM: shmobile: koelsch-reference: Work around core clock issues Geert Uytterhoeven
2014-03-14  8:51 ` Simon Horman
2014-03-14  8:53 ` Magnus Damm
2014-03-14  9:09 ` Geert Uytterhoeven
2014-03-14  9:23 ` Magnus Damm
2014-03-14 11:02 ` Laurent Pinchart
2014-03-14 11:10 ` Ben Dooks
2014-03-14 12:39 ` Geert Uytterhoeven
2014-03-14 12:43 ` Laurent Pinchart
2014-03-14 13:02 ` Geert Uytterhoeven
2014-03-14 14:13 ` Ben Dooks
2014-03-14 14:26 ` Laurent Pinchart
2014-03-14 14:43 ` Laurent Pinchart
2014-03-14 14:45 ` Ben Dooks
2014-03-14 15:51 ` Ben Dooks
2014-03-14 16:48 ` Magnus Damm
2014-03-14 17:11 ` Ben Dooks
2014-03-14 17:33 ` Ben Dooks
2014-03-14 17:55 ` Ben Dooks
2014-03-14 18:20 ` Ben Dooks
2014-03-17  1:15 ` Simon Horman
2014-03-18  0:25 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).