linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: const@MakeLinux.com (Constantine Shulyupin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Add FDT support to Pandaboard initialization
Date: Sat, 27 Oct 2012 20:50:00 +0200	[thread overview]
Message-ID: <1351363800-28744-1-git-send-email-const@MakeLinux.com> (raw)

From: Constantine Shulyupin <const@MakeLinux.com>

Problem:
- FDT is supported only by generic OMAP board initialization in arch/arm/mach-omap2/board-generic.c and lacks some configurations, which are not yet configured in FDT (USB for example).
Solution:
- arch/arm/mach-omap2/board-omap4panda.c supports initialization with FDT and without it.

Signed-off-by: Constantine Shulyupin <const@MakeLinux.com>
---
 arch/arm/mach-omap2/board-omap4panda.c |   33 ++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index bfcd397..fea7a83 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -31,6 +31,7 @@
 #include <linux/ti_wilink_st.h>
 #include <linux/wl12xx.h>
 #include <linux/platform_data/omap-abe-twl6040.h>
+#include <linux/of_platform.h>
 
 #include <asm/hardware/gic.h>
 #include <asm/mach-types.h>
@@ -526,3 +527,35 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
 	.timer		= &omap4_timer,
 	.restart	= omap_prcm_restart,
 MACHINE_END
+
+static struct of_device_id omap_dt_match_table[] __initdata = {
+	{ .compatible = "simple-bus", },
+	{ .compatible = "ti,omap-infra", },
+	{ }
+};
+
+static void __init panda_dt_init(void)
+{
+	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
+	omap4_panda_init();
+}
+
+static const char *omap4_panda_compat[] __initdata = {
+	"ti,omap4-panda",
+	"ti,omap4",
+	NULL,
+};
+
+DT_MACHINE_START(OMAP4_PANDA_DT, "OMAP4 Pandaboard with FDT support")
+	.dt_compat	= omap4_panda_compat,
+	.reserve	= omap_reserve,
+	.smp		= smp_ops(omap4_smp_ops),
+	.map_io		= omap4_map_io,
+	.init_early	= omap4430_init_early,
+	.init_irq	= omap_gic_of_init,
+	.handle_irq	= gic_handle_irq,
+	.init_machine	= panda_dt_init,
+	.init_late	= omap4430_init_late,
+	.timer		= &omap4_timer,
+	.restart	= omap_prcm_restart,
+MACHINE_END
-- 
1.7.9.5

             reply	other threads:[~2012-10-27 18:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-27 18:50 Constantine Shulyupin [this message]
2012-10-29  6:14 ` [PATCH] Add FDT support to Pandaboard initialization Felipe Balbi
2012-10-29 16:01   ` Tony Lindgren

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=1351363800-28744-1-git-send-email-const@MakeLinux.com \
    --to=const@makelinux.com \
    --cc=linux-arm-kernel@lists.infradead.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).