blob: a157935ba4b88e73dc10d2df58f4a29c5fe3274a [file] [log] [blame]
From koba@kmckk.co.jp Mon Sep 24 22:09:51 2012
From: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Date: Tue, 25 Sep 2012 14:07:52 +0900
Subject: [PATCH 16/21] ARM: mach-shmobile: Use DT_MACHINE for KZM9G
To: greg@kroah.com
Cc: ltsi-dev@lists.linuxfoundation.org, horms@verge.net.au, damm@opensource.se, kuninori.morimoto.gx@renesas.com, "Rafael J. Wysocki" <rjw@sisk.pl>, Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Message-ID: <1348549677-1458-17-git-send-email-koba@kmckk.co.jp>
From: Magnus Damm <damm@opensource.se>
Use DT_MACHINE_START() on the sh73a0 based KZM9G board.
Also include a tiny DTS file to describe the board and
update the Kconfig dependencies to select CONFIG_USE_OF.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
(cherry picked from commit 7296d93201710865233fbebf7c9853d2f95d7716)
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
---
arch/arm/boot/dts/sh73a0-kzm9g.dts | 22 ++++++++++++++++++++++
arch/arm/mach-shmobile/Kconfig | 1 +
arch/arm/mach-shmobile/board-kzm9g.c | 8 +++++++-
3 files changed, 30 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/boot/dts/sh73a0-kzm9g.dts
--- /dev/null
+++ b/arch/arm/boot/dts/sh73a0-kzm9g.dts
@@ -0,0 +1,22 @@
+/*
+ * Device Tree Source for the KZM-A9-GT board
+ *
+ * Copyright (C) 2012 Renesas Solutions Corp.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/dts-v1/;
+/include/ "skeleton.dtsi"
+
+/ {
+ model = "KZM-A9-GT";
+ compatible = "renesas,kzm9g";
+
+ memory {
+ device_type = "memory";
+ reg = <0x41000000 0x1e800000>;
+ };
+};
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -111,6 +111,7 @@ config MACH_KZM9G
bool "KZM-A9-GT board"
depends on ARCH_SH73A0
select ARCH_REQUIRE_GPIOLIB
+ select USE_OF
comment "SH-Mobile System Configuration"
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -443,7 +443,12 @@ static void __init kzm_init(void)
platform_add_devices(kzm_devices, ARRAY_SIZE(kzm_devices));
}
-MACHINE_START(KZM9G, "kzm9g")
+static const char *kzm9g_boards_compat_dt[] __initdata = {
+ "renesas,kzm9g",
+ NULL,
+};
+
+DT_MACHINE_START(KZM9G_DT, "kzm9g")
.map_io = sh73a0_map_io,
.init_early = sh73a0_add_early_devices,
.nr_irqs = NR_IRQS_LEGACY,
@@ -451,4 +456,5 @@ MACHINE_START(KZM9G, "kzm9g")
.handle_irq = gic_handle_irq,
.init_machine = kzm_init,
.timer = &shmobile_timer,
+ .dt_compat = kzm9g_boards_compat_dt,
MACHINE_END