linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 06/15] ARM: shmobile: koelsch-reference: Initialize CPG device
@ 2013-11-28  1:03 Laurent Pinchart
  2013-11-28  5:32 ` Magnus Damm
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Laurent Pinchart @ 2013-11-28  1:03 UTC (permalink / raw)
  To: linux-sh

On multiplatform kernels clocks are handled by the CCF CPG driver. It
must be explicitly initialized by a call to rcar_gen2_clocks_init() with
the value of the boot mode pins.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 arch/arm/mach-shmobile/board-koelsch-reference.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
index a804a17..788ccdf 100644
--- a/arch/arm/mach-shmobile/board-koelsch-reference.c
+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
@@ -19,7 +19,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <linux/clk-provider.h>
+#include <linux/clk/shmobile.h>
 #include <linux/kernel.h>
 #include <linux/of_platform.h>
 #include <mach/common.h>
@@ -27,11 +27,17 @@
 #include <mach/r8a7791.h>
 #include <asm/mach/arch.h>
 
-static void __init koelsch_add_standard_devices(void)
+static void __init koelsch_init_time(void)
 {
 #ifdef CONFIG_COMMON_CLK
-	of_clk_init(NULL);
-#else
+	rcar_gen2_clocks_init(rcar_gen2_read_mode_pins());
+#endif
+	rcar_gen2_timer_init();
+}
+
+static void __init koelsch_add_standard_devices(void)
+{
+#ifndef CONFIG_COMMON_CLK
 	r8a7791_clock_init();
 #endif
 	r8a7791_add_dt_devices();
@@ -46,7 +52,7 @@ static const char * const koelsch_boards_compat_dt[] __initconst = {
 DT_MACHINE_START(KOELSCH_DT, "koelsch")
 	.smp		= smp_ops(r8a7791_smp_ops),
 	.init_early	= r8a7791_init_early,
-	.init_time	= rcar_gen2_timer_init,
+	.init_time	= koelsch_init_time,
 	.init_machine	= koelsch_add_standard_devices,
 	.init_late	= shmobile_init_late,
 	.dt_compat	= koelsch_boards_compat_dt,
-- 
1.8.3.2


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

end of thread, other threads:[~2013-11-29 15:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-28  1:03 [PATCH v3 06/15] ARM: shmobile: koelsch-reference: Initialize CPG device Laurent Pinchart
2013-11-28  5:32 ` Magnus Damm
2013-11-28 17:17 ` Laurent Pinchart
2013-11-29  1:43 ` Magnus Damm
2013-11-29 15:21 ` Laurent Pinchart

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).