ARM: shmobile: r8a7779: Initial multiplatform support
authorSimon Horman <horms+renesas@verge.net.au>
Thu, 15 May 2014 11:32:05 +0000 (20:32 +0900)
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>
Wed, 4 Feb 2015 10:15:56 +0000 (11:15 +0100)
Add Marzen and r8a7779 to CONFIG_SHMOBILE_MULTI. At this
point CCF is not yet supported so you cannot run this code
yet. For CCF support to happen several different components
are needed, and this is one simple portion that moves us
forward. Other patches need to build on top of this one.

Marzen board support exists in 3 flavours:
1) SHMOBILE_MULTI, MACH_MARZEN - board-marzen-reference.c (CCF + DT)
2) SHMOBILE, MACH_MARZEN_REFERENCE - board-marzen-reference.c (DT)
3) SHMOBILE, MACH_MARZEN - board-marzen.c (legacy C code)

When CCF is done then 2) will be removed. When 1) includes same features
as 3) then 3) will be removed.

Based on work for the Koelsch and r8a7791 by Magnus Damm.

Cc: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 5016c81bf92eb01741fc71ce7fb8380183a6f66a)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/boot/dts/Makefile
arch/arm/mach-shmobile/Kconfig
arch/arm/mach-shmobile/Makefile
arch/arm/mach-shmobile/board-marzen-reference.c

index 6ec1b220c4c402e7cc4abd05f5a4ca80b8c1d58d..290dabcb63fed88b47a875d167c806402cf58e4b 100644 (file)
@@ -262,7 +262,8 @@ dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb \
        r7s72100-genmai.dtb \
        r8a7791-henninger.dtb \
        r8a7791-koelsch.dtb \
-       r8a7790-lager.dtb
+       r8a7790-lager.dtb \
+       r8a7779-marzen-reference.dtb
 dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_arria5_socdk.dtb \
        socfpga_cyclone5_socdk.dtb \
        socfpga_cyclone5_sockit.dtb \
index 22363ac76de4c4d736b0f176b82f12b8ce448cb7..d9ed05172a045b381d1b582ebad0569a0739e107 100644 (file)
@@ -27,6 +27,11 @@ config ARCH_R7S72100
        bool "RZ/A1H (R7S72100)"
        select SYS_SUPPORTS_SH_MTU2
 
+config ARCH_R8A7779
+       bool "R-Car H1 (R8A77790)"
+       select RENESAS_INTC_IRQPIN
+       select SYS_SUPPORTS_SH_TMU
+
 config ARCH_R8A7790
        bool "R-Car H2 (R8A77900)"
        select RENESAS_IRQC
@@ -53,6 +58,11 @@ config MACH_LAGER
        depends on ARCH_R8A7790
        select MICREL_PHY if SH_ETH
 
+config MACH_MARZEN
+       bool "MARZEN board"
+       depends on ARCH_R8A7779
+       select REGULATOR_FIXED_VOLTAGE if REGULATOR
+
 comment "Renesas ARM SoCs System Configuration"
 endif
 
index efe4dd295f3978707363911421d2698ea7f3d966..2bc1a45d0d008a5a018d866298d9c80405c35b00 100644 (file)
@@ -61,6 +61,7 @@ ifdef CONFIG_ARCH_SHMOBILE_MULTI
 obj-$(CONFIG_MACH_GENMAI)      += board-genmai-reference.o
 obj-$(CONFIG_MACH_KOELSCH)     += board-koelsch-reference.o
 obj-$(CONFIG_MACH_LAGER)       += board-lager-reference.o
+obj-$(CONFIG_MACH_MARZEN)      += board-marzen-reference.o
 else
 obj-$(CONFIG_MACH_APE6EVM)     += board-ape6evm.o
 obj-$(CONFIG_MACH_APE6EVM_REFERENCE)   += board-ape6evm-reference.o
index 46ed17a50183c4ff6d9818587de9fcad0c499a73..d90843b220275c4df368449a92024407eb329f4b 100644 (file)
@@ -19,6 +19,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <linux/clk-provider.h>
 #include <linux/of_platform.h>
 #include <mach/r8a7779.h>
 #include <asm/irq.h>
 
 static void __init marzen_init(void)
 {
+#ifdef CONFIG_COMMON_CLK
+       of_clk_init(NULL);
+#else
        r8a7779_clock_init();
+#endif
        r8a7779_add_standard_devices_dt();
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
        r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */