linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 05/10] ARM: shmobile: lager-reference: Switch to multiplaform
@ 2013-10-29 15:04 Laurent Pinchart
  2013-11-06  8:23 ` Simon Horman
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Laurent Pinchart @ 2013-10-29 15:04 UTC (permalink / raw)
  To: linux-sh

Move the Lager reference board to multiplaform ARM architecture. As
multiplatform requires usage of the common clock framework, switch from
legacy clocks to CCF by replacing the legacy clock framework
initialization code in the machine init handler with a common clock
framework initialization call in the time init handler.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 arch/arm/mach-shmobile/Kconfig                 |  7 +++++++
 arch/arm/mach-shmobile/Makefile                |  1 +
 arch/arm/mach-shmobile/board-lager-reference.c | 13 +++++++++----
 3 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 4bb548f..b39f6b6 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -20,6 +20,9 @@ comment "SH-Mobile System Type"
 config ARCH_EMEV2
 	bool "Emma Mobile EV2"
 
+config ARCH_R8A7790
+	bool "R-Car H2 (R8A77900)"
+
 comment "SH-Mobile Board Type"
 
 config MACH_KZM9D
@@ -27,6 +30,10 @@ config MACH_KZM9D
 	depends on ARCH_EMEV2
 	select REGULATOR_FIXED_VOLTAGE if REGULATOR
 
+config MACH_LAGER
+	bool "Lager board"
+	depends on ARCH_R8A7790
+
 comment "SH-Mobile System Configuration"
 endif
 
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index cc48f14..32f3975 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -57,6 +57,7 @@ obj-$(CONFIG_ARCH_R8A7779)	+= pm-r8a7779.o
 # Board objects
 ifdef CONFIG_ARCH_SHMOBILE_MULTI
 obj-$(CONFIG_MACH_KZM9D)	+= board-kzm9d-reference.o
+obj-$(CONFIG_MACH_LAGER)	+= board-lager-reference.o
 else
 obj-$(CONFIG_MACH_APE6EVM)	+= board-ape6evm.o
 obj-$(CONFIG_MACH_APE6EVM_REFERENCE)	+= board-ape6evm-reference.o
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
index 1a1a4a8..e436d06 100644
--- a/arch/arm/mach-shmobile/board-lager-reference.c
+++ b/arch/arm/mach-shmobile/board-lager-reference.c
@@ -18,16 +18,21 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <linux/clk/shmobile.h>
 #include <linux/init.h>
 #include <linux/of_platform.h>
 #include <mach/r8a7790.h>
 #include <asm/mach/arch.h>
 
-static void __init lager_add_standard_devices(void)
+static void __init lager_init_time(void)
 {
-	/* clocks are setup late during boot in the case of DT */
-	r8a7790_clock_init();
+	r8a7790_clocks_init(rcar_gen2_read_mode_pins());
+
+	rcar_gen2_timer_init();
+}
 
+static void __init lager_add_standard_devices(void)
+{
 	r8a7790_add_dt_devices();
         of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
@@ -40,7 +45,7 @@ static const char *lager_boards_compat_dt[] __initdata = {
 DT_MACHINE_START(LAGER_DT, "lager")
 	.smp		= smp_ops(r8a7790_smp_ops),
 	.init_early	= r8a7790_init_early,
-	.init_time	= rcar_gen2_timer_init,
+	.init_time	= lager_init_time,
 	.init_machine	= lager_add_standard_devices,
 	.dt_compat	= lager_boards_compat_dt,
 MACHINE_END
-- 
1.8.1.5


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

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

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-29 15:04 [PATCH 05/10] ARM: shmobile: lager-reference: Switch to multiplaform Laurent Pinchart
2013-11-06  8:23 ` Simon Horman
2013-11-06  9:15 ` Magnus Damm
2013-11-06 11:59 ` Laurent Pinchart
2013-11-06 12:37 ` Laurent Pinchart
2013-11-08  6:24 ` Simon Horman
2013-11-08  6:25 ` Simon Horman
2013-11-08 13:50 ` Laurent Pinchart
2013-11-08 15:02 ` Magnus Damm
2013-11-08 15:25 ` 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).