ARM: shmobile: Initial r8a7791 and Koelsch multiplatform support
authorMagnus Damm <damm@opensource.se>
Wed, 6 Nov 2013 10:40:01 +0000 (19:40 +0900)
committerSimon Horman <horms+renesas@verge.net.au>
Tue, 10 Dec 2013 08:24:23 +0000 (17:24 +0900)
Add Koelsch and r8a7791 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.

Koelsch board support exists in 3 flavors:
1) SHMOBILE_MULTI, MACH_KOELSCH - board-koelsch-reference.c (CCF + DT)
2) SHMOBILE, MACH_KOELSCH_REFERENCE - board-koelsch-reference.c (DT)
3) SHMOBILE, MACH_KOELSCH - board-koelsch.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.

Signed-off-by: Magnus Damm <damm@opensource.se>
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-koelsch-reference.c

index 5839077fac912708d12dd3360d62030b7f434e44..8254bfc2260dc1c3b68611323c4f016e4e42a830 100644 (file)
@@ -232,7 +232,8 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb \
        r8a73a4-ape6evm.dtb \
        r8a73a4-ape6evm-reference.dtb \
        sh7372-mackerel.dtb
-dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb
+dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb \
+       r8a7791-koelsch-reference.dtb
 dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_arria5_socdk.dtb \
        socfpga_cyclone5_socdk.dtb \
        socfpga_cyclone5_sockit.dtb \
index 8eac47fef8dcefc906523f980e7a1b5d28cbed81..17a4f409f96d6e559d24c17ebed1ba8f24f1078a 100644 (file)
@@ -24,8 +24,16 @@ comment "SH-Mobile System Type"
 config ARCH_EMEV2
        bool "Emma Mobile EV2"
 
+config ARCH_R8A7791
+       bool "R-Car M2 (R8A77910)"
+       select RENESAS_IRQC
+
 comment "SH-Mobile Board Type"
 
+config MACH_KOELSCH
+       bool "Koelsch board"
+       depends on ARCH_R8A7791
+
 config MACH_KZM9D
        bool "KZM9D board"
        depends on ARCH_EMEV2
index 8bca9b56352ecd397ddae98ea3fe9fe41a1dee7b..021775de50aeba367deaa1acddd8243892e70ab6 100644 (file)
@@ -56,6 +56,7 @@ obj-$(CONFIG_ARCH_R8A7779)    += pm-r8a7779.o
 
 # Board objects
 ifdef CONFIG_ARCH_SHMOBILE_MULTI
+obj-$(CONFIG_MACH_KOELSCH)     += board-koelsch-reference.o
 obj-$(CONFIG_MACH_KZM9D)       += board-kzm9d-reference.o
 else
 obj-$(CONFIG_MACH_APE6EVM)     += board-ape6evm.o
index beecc8bb510fca223cd085f2fa4348da4af41008..25b558f462a3a6221d73df5564d61ab2097303f4 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/kernel.h>
 #include <linux/of_platform.h>
 #include <mach/rcar-gen2.h>
 
 static void __init koelsch_add_standard_devices(void)
 {
+#ifdef CONFIG_COMMON_CLK
+       of_clk_init(NULL);
+#else
        r8a7791_clock_init();
+#endif
        r8a7791_add_dt_devices();
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }