blob: 4d505529b57d87e1ce6d65978e821be61caa797b [file] [log] [blame]
From 9077cc954932805e7e9dbba6c91f7a261b42896b Mon Sep 17 00:00:00 2001
From: Magnus Damm <damm@opensource.se>
Date: Thu, 18 Jul 2013 05:31:18 +0900
Subject: ARM: shmobile: Add EMEV2 and KZM9D to ARCH_SHMOBILE_MULTI
Enable build of EMEV2 and KZM9D DT Reference in
case of ARCH_MULTIPLATFORM and ARCH_SHMOBILE_MULTI.
IS_ENABLED() is leaves the clock-emev2.c file out
in case of COMMON_CLK=y.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit cbc60e7c04f3c1390144d4a881f0a7b98b49da98)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/Makefile | 1 +
arch/arm/mach-shmobile/Kconfig | 15 +++++++++++++++
arch/arm/mach-shmobile/board-kzm9d-reference.c | 3 ++-
arch/arm/mach-shmobile/setup-emev2.c | 3 ++-
4 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 7c9fddc7..1d38ff07 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -172,6 +172,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
r8a73a4-ape6evm.dtb \
r8a73a4-ape6evm-reference.dtb \
sh7372-mackerel.dtb
+dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d-reference.dtb
dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_cyclone5.dtb \
socfpga_vt.dtb
dtb-$(CONFIG_ARCH_SPEAR13XX) += spear1310-evb.dtb \
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index b6ba366a..e7c399c1 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -17,6 +17,21 @@ if ARCH_SHMOBILE_MULTI
comment "SH-Mobile System Type"
+config ARCH_EMEV2
+ bool "Emma Mobile EV2"
+
+comment "SH-Mobile Board Type"
+
+config MACH_KZM9D_REFERENCE
+ bool "KZM9D board - Reference Device Tree Implementation"
+ depends on ARCH_EMEV2
+ select REGULATOR_FIXED_VOLTAGE if REGULATOR
+ ---help---
+ Use reference implementation of KZM9D board support
+ which makes a greater use of device tree at the expense
+ of not supporting a number of devices.
+
+ This is intended to aid developers
endif
if ARCH_SHMOBILE
diff --git a/arch/arm/mach-shmobile/board-kzm9d-reference.c b/arch/arm/mach-shmobile/board-kzm9d-reference.c
index a7b28b24..8f8bb2fa 100644
--- a/arch/arm/mach-shmobile/board-kzm9d-reference.c
+++ b/arch/arm/mach-shmobile/board-kzm9d-reference.c
@@ -26,7 +26,8 @@
static void __init kzm9d_add_standard_devices(void)
{
- emev2_clock_init();
+ if (!IS_ENABLED(CONFIG_COMMON_CLK))
+ emev2_clock_init();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
index 19980be7..1553af8e 100644
--- a/arch/arm/mach-shmobile/setup-emev2.c
+++ b/arch/arm/mach-shmobile/setup-emev2.c
@@ -175,7 +175,8 @@ static struct resource pmu_resources[] = {
void __init emev2_add_standard_devices(void)
{
- emev2_clock_init();
+ if (!IS_ENABLED(CONFIG_COMMON_CLK))
+ emev2_clock_init();
emev2_register_uart(0);
emev2_register_uart(1);
--
1.8.4.3.gca3854a