From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: Nicolas Pitre
<nicolas.pitre-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH v5 6/8] arm/dt: Basic versatile devicetree support
Date: Fri, 29 Apr 2011 01:15:58 -0600 [thread overview]
Message-ID: <20110429071558.12522.3709.stgit@ponder> (raw)
In-Reply-To: <20110429070135.12522.35745.stgit@ponder>
This patch adds adds very basic support for booting versatile with a
device tree. It simply allows the existing machine_descs to match
against the versatile ab & pb compatible values so that the kernel can
boot. Kernel parameters and the initrd pointer is read out of the
tree instead of atags.
This is not complete device tree support. This change will be
reverted when a new machine_desc is added that can populate the
versatile device registrations directly from data in the tree instead
of using hard coded data. That change will be made in a future patch.
v5: - Add skeleton device tree for versatile AB and PB. Bare minimum needed
for booting.
Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---
arch/arm/boot/dts/skeleton.dtsi | 13 +++++++++++++
arch/arm/boot/dts/versatile-ab.dts | 7 +++++++
arch/arm/boot/dts/versatile-pb.dts | 7 +++++++
arch/arm/mach-versatile/versatile_ab.c | 6 ++++++
arch/arm/mach-versatile/versatile_pb.c | 6 ++++++
5 files changed, 39 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/boot/dts/skeleton.dtsi
create mode 100644 arch/arm/boot/dts/versatile-ab.dts
create mode 100644 arch/arm/boot/dts/versatile-pb.dts
diff --git a/arch/arm/boot/dts/skeleton.dtsi b/arch/arm/boot/dts/skeleton.dtsi
new file mode 100644
index 0000000..b41d241
--- /dev/null
+++ b/arch/arm/boot/dts/skeleton.dtsi
@@ -0,0 +1,13 @@
+/*
+ * Skeleton device tree; the bare minimum needed to boot; just include and
+ * add a compatible value. The bootloader will typically populate the memory
+ * node.
+ */
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chosen { };
+ aliases { };
+ memory { device_type = "memory"; reg = <0 0>; };
+};
diff --git a/arch/arm/boot/dts/versatile-ab.dts b/arch/arm/boot/dts/versatile-ab.dts
new file mode 100644
index 0000000..705a88f
--- /dev/null
+++ b/arch/arm/boot/dts/versatile-ab.dts
@@ -0,0 +1,7 @@
+/dts-v1/;
+/include/ "skeleton.dtsi"
+
+/ {
+ model = "ARM Versatile AB";
+ compatible = "arm,versatile-ab";
+};
diff --git a/arch/arm/boot/dts/versatile-pb.dts b/arch/arm/boot/dts/versatile-pb.dts
new file mode 100644
index 0000000..d8aabef
--- /dev/null
+++ b/arch/arm/boot/dts/versatile-pb.dts
@@ -0,0 +1,7 @@
+/dts-v1/;
+/include/ "skeleton.dtsi"
+
+/ {
+ model = "ARM Versatile PB";
+ compatible = "arm,versatile-pb";
+};
diff --git a/arch/arm/mach-versatile/versatile_ab.c b/arch/arm/mach-versatile/versatile_ab.c
index f8ae64b..b7b49ad 100644
--- a/arch/arm/mach-versatile/versatile_ab.c
+++ b/arch/arm/mach-versatile/versatile_ab.c
@@ -33,6 +33,11 @@
#include "core.h"
+static const char *versatile_ab_match[] __initdata = {
+ "arm,versatile-ab",
+ NULL,
+};
+
MACHINE_START(VERSATILE_AB, "ARM-Versatile AB")
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
.boot_params = 0x00000100,
@@ -41,4 +46,5 @@ MACHINE_START(VERSATILE_AB, "ARM-Versatile AB")
.init_irq = versatile_init_irq,
.timer = &versatile_timer,
.init_machine = versatile_init,
+ .dt_compat = versatile_ab_match,
MACHINE_END
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c
index 37c23df..9d0bc5a 100644
--- a/arch/arm/mach-versatile/versatile_pb.c
+++ b/arch/arm/mach-versatile/versatile_pb.c
@@ -101,6 +101,11 @@ static void __init versatile_pb_init(void)
}
}
+static const char *versatile_pb_match[] __initdata = {
+ "arm,versatile-pb",
+ NULL,
+};
+
MACHINE_START(VERSATILE_PB, "ARM-Versatile PB")
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
.boot_params = 0x00000100,
@@ -109,4 +114,5 @@ MACHINE_START(VERSATILE_PB, "ARM-Versatile PB")
.init_irq = versatile_init_irq,
.timer = &versatile_timer,
.init_machine = versatile_pb_init,
+ .dt_compat = versatile_pb_match,
MACHINE_END
next prev parent reply other threads:[~2011-04-29 7:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-29 7:15 [PATCH v5 0/8] Basic ARM devicetree support Grant Likely
2011-04-29 7:15 ` [PATCH v5 1/8] arm/dt: Make __vet_atags also accept a dtb image Grant Likely
2011-04-29 7:15 ` [PATCH v5 2/8] arm/dt: Allow CONFIG_OF on ARM Grant Likely
2011-04-29 7:15 ` [PATCH v5 3/8] arm/dt: consolidate atags setup into setup_machine_atags Grant Likely
2011-04-29 7:15 ` [PATCH v5 4/8] arm/dt: probe for platforms via the device tree Grant Likely
2011-05-02 15:15 ` Tony Lindgren
2011-05-02 15:34 ` Grant Likely
[not found] ` <BANLkTikue6jMUcQMv9GD4cZ=o5EEW7QDqQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-02 16:39 ` Tony Lindgren
2011-05-02 21:55 ` Grant Likely
[not found] ` <20110502215537.GE10097-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-05-03 10:44 ` Tony Lindgren
2011-05-02 21:51 ` Grant Likely
2011-04-29 7:15 ` [PATCH v5 5/8] arm/dt: Drop irq_create_of_mapping() from arm code Grant Likely
2011-04-30 0:28 ` Nicolas Pitre
2011-04-30 6:28 ` Grant Likely
2011-04-29 7:15 ` Grant Likely [this message]
2011-04-29 7:16 ` [PATCH v5 7/8] arm/dt: Basic tegra devicetree support Grant Likely
2011-04-29 7:16 ` [PATCH v5 8/8] dt: add documentation of ARM dt boot interface Grant Likely
2011-04-30 0:37 ` Nicolas Pitre
[not found] ` <alpine.LFD.2.00.1104292034450.24613-QuJgVwGFrdf/9pzu0YdTqQ@public.gmane.org>
2011-04-30 6:30 ` Grant Likely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110429071558.12522.3709.stgit@ponder \
--to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=nicolas.pitre-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).