aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2012-05-16 02:46:03 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-05-17 18:14:03 -0400
commit450cca47d65b7500ba05d56770adbf8c758dc87d (patch)
treecd8d8ba5024737ee372cf9d9f2753cb88e3cd03d
parent3d5de27174955702bc874302ba9e72d71d5acd58 (diff)
mach-shmobile: Use DT_MACHINE for KZM9D V3
Use DT_MACHINE_START() on the emev2 based KZM9D board. Also include a tiny DTS file to describe the board and update the Kconfig dependencies to select CONFIG_USE_OF. Update the SMP glue code to use OF for matching. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
-rw-r--r--arch/arm/boot/dts/emev2-kzm9d.dts26
-rw-r--r--arch/arm/mach-shmobile/Kconfig1
-rw-r--r--arch/arm/mach-shmobile/board-kzm9d.c8
-rw-r--r--arch/arm/mach-shmobile/platsmp.c3
4 files changed, 36 insertions, 2 deletions
diff --git a/arch/arm/boot/dts/emev2-kzm9d.dts b/arch/arm/boot/dts/emev2-kzm9d.dts
new file mode 100644
index 000000000000..297e3baba71c
--- /dev/null
+++ b/arch/arm/boot/dts/emev2-kzm9d.dts
@@ -0,0 +1,26 @@
1/*
2 * Device Tree Source for the KZM9D board
3 *
4 * Copyright (C) 2012 Renesas Solutions Corp.
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10/dts-v1/;
11
12/include/ "emev2.dtsi"
13
14/ {
15 model = "EMEV2 KZM9D Board";
16 compatible = "renesas,kzm9d", "renesas,emev2";
17
18 memory {
19 device_type = "memory";
20 reg = <0x40000000 0x8000000>;
21 };
22
23 chosen {
24 bootargs = "console=ttyS1,115200n81";
25 };
26};
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 8d3c2b18524c..7dcf08ee979d 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -107,6 +107,7 @@ config MACH_MARZEN
107config MACH_KZM9D 107config MACH_KZM9D
108 bool "KZM9D board" 108 bool "KZM9D board"
109 depends on ARCH_EMEV2 109 depends on ARCH_EMEV2
110 select USE_OF
110 111
111comment "SH-Mobile System Configuration" 112comment "SH-Mobile System Configuration"
112 113
diff --git a/arch/arm/mach-shmobile/board-kzm9d.c b/arch/arm/mach-shmobile/board-kzm9d.c
index be81f0feba06..7bc5e7d39f9b 100644
--- a/arch/arm/mach-shmobile/board-kzm9d.c
+++ b/arch/arm/mach-shmobile/board-kzm9d.c
@@ -68,7 +68,12 @@ void __init kzm9d_add_standard_devices(void)
68 platform_add_devices(kzm9d_devices, ARRAY_SIZE(kzm9d_devices)); 68 platform_add_devices(kzm9d_devices, ARRAY_SIZE(kzm9d_devices));
69} 69}
70 70
71MACHINE_START(KZM9D, "kzm9d") 71static const char *kzm9d_boards_compat_dt[] __initdata = {
72 "renesas,kzm9d",
73 NULL,
74};
75
76DT_MACHINE_START(KZM9D_DT, "kzm9d")
72 .map_io = emev2_map_io, 77 .map_io = emev2_map_io,
73 .init_early = emev2_add_early_devices, 78 .init_early = emev2_add_early_devices,
74 .nr_irqs = NR_IRQS_LEGACY, 79 .nr_irqs = NR_IRQS_LEGACY,
@@ -76,4 +81,5 @@ MACHINE_START(KZM9D, "kzm9d")
76 .handle_irq = gic_handle_irq, 81 .handle_irq = gic_handle_irq,
77 .init_machine = kzm9d_add_standard_devices, 82 .init_machine = kzm9d_add_standard_devices,
78 .timer = &shmobile_timer, 83 .timer = &shmobile_timer,
84 .dt_compat = kzm9d_boards_compat_dt,
79MACHINE_END 85MACHINE_END
diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c
index 959b021e52be..7006cdc8b8ca 100644
--- a/arch/arm/mach-shmobile/platsmp.c
+++ b/arch/arm/mach-shmobile/platsmp.c
@@ -16,6 +16,7 @@
16#include <linux/device.h> 16#include <linux/device.h>
17#include <linux/smp.h> 17#include <linux/smp.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/of.h>
19#include <asm/hardware/gic.h> 20#include <asm/hardware/gic.h>
20#include <asm/mach-types.h> 21#include <asm/mach-types.h>
21#include <mach/common.h> 22#include <mach/common.h>
@@ -23,7 +24,7 @@
23 24
24#define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2()) 25#define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2())
25#define is_r8a7779() machine_is_marzen() 26#define is_r8a7779() machine_is_marzen()
26#define is_emev2() machine_is_kzm9d() 27#define is_emev2() of_machine_is_compatible("renesas,emev2")
27 28
28static unsigned int __init shmobile_smp_get_core_count(void) 29static unsigned int __init shmobile_smp_get_core_count(void)
29{ 30{