From: Benoit Cousson <b-cousson@ti.com>
To: tony@atomide.com, grant.likely@secretlab.ca
Cc: paul@pwsan.com, khilman@ti.com, rnayak@ti.com,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
devicetree-discuss@lists.ozlabs.org,
Benoit Cousson <b-cousson@ti.com>
Subject: [PATCH 08/11] OMAP2+: board-generic: Add i2c static init
Date: Fri, 23 Sep 2011 22:23:16 +0200 [thread overview]
Message-ID: <1316809399-19579-9-git-send-email-b-cousson@ti.com> (raw)
In-Reply-To: <1316809399-19579-1-git-send-email-b-cousson@ti.com>
Still needed to boot until the i2c & twl driver is adapted to
device-tree. Otherwise the voltage control code will try to
access the twl and crash.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/board-generic.c | 41 +++++++++++++++++++++++++++++++++-
1 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index dcbd64c..1186a76 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -11,6 +11,7 @@
#include <linux/io.h>
#include <linux/of_platform.h>
#include <linux/irqdomain.h>
+#include <linux/i2c/twl.h>
#include <mach/hardware.h>
#include <asm/mach/arch.h>
@@ -18,7 +19,31 @@
#include <plat/board.h>
#include <plat/common.h>
#include <mach/omap4-common.h>
+#include "common-board-devices.h"
+/*
+ * XXX: Still needed to boot until the i2c & twl driver is adapted to
+ * device-tree
+ */
+static struct twl4030_platform_data sdp4430_twldata = {
+ .irq_base = TWL6030_IRQ_BASE,
+ .irq_end = TWL6030_IRQ_END,
+};
+
+static void __init omap4_i2c_init(void)
+{
+ omap4_pmic_init("twl6030", &sdp4430_twldata);
+}
+
+static struct twl4030_platform_data beagle_twldata = {
+ .irq_base = TWL4030_IRQ_BASE,
+ .irq_end = TWL4030_IRQ_END,
+};
+
+static void __init omap3_i2c_init(void)
+{
+ omap3_pmic_init("twl4030", &beagle_twldata);
+}
static struct of_device_id omap_dt_match_table[] __initdata = {
{ .compatible = "simple-bus", },
@@ -44,6 +69,18 @@ static void __init omap_generic_init(void)
of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
}
+static void __init omap4_init(void)
+{
+ omap4_i2c_init();
+ omap_generic_init();
+}
+
+static void __init omap3_init(void)
+{
+ omap3_i2c_init();
+ omap_generic_init();
+}
+
#if defined(CONFIG_SOC_OMAP2420)
static const char *omap242x_boards_compat[] __initdata = {
"ti,omap2420",
@@ -89,7 +126,7 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
.map_io = omap3_map_io,
.init_early = omap3430_init_early,
.init_irq = omap3_init_irq,
- .init_machine = omap_generic_init,
+ .init_machine = omap3_init,
.timer = &omap3_timer,
.dt_compat = omap3_boards_compat,
MACHINE_END
@@ -106,7 +143,7 @@ DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
.map_io = omap4_map_io,
.init_early = omap4430_init_early,
.init_irq = gic_init_irq,
- .init_machine = omap_generic_init,
+ .init_machine = omap4_init,
.timer = &omap4_timer,
.dt_compat = omap4_boards_compat,
MACHINE_END
--
1.7.0.4
next prev parent reply other threads:[~2011-09-23 20:23 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-23 20:23 [PATCH 00/11] OMAP: Add initial support for DT on OMAP3 & OMAP4 Benoit Cousson
2011-09-23 20:23 ` [PATCH 01/11] OMAP2+: Add SoC specific map_io functions Benoit Cousson
2011-09-23 23:00 ` Tony Lindgren
2011-09-26 23:15 ` Tony Lindgren
2011-09-26 23:16 ` [PATCH] ARM: OMAP2+: Use SoC specifc map_io Tony Lindgren
2011-09-26 23:18 ` [PATCH] ARM: OMAP2+: Remove custom init_irq for remaining boards Tony Lindgren
2012-05-04 15:59 ` [PATCH 01/11] OMAP2+: Add SoC specific map_io functions Thomas Petazzoni
2012-05-14 15:06 ` Cousson, Benoit
2012-05-14 19:55 ` Nicolas Pitre
2011-09-23 20:23 ` [PATCH 02/11] arm/dts: Add initial device tree support for OMAP4 SoC Benoit Cousson
2011-09-23 20:23 ` [PATCH 03/11] arm/dts: Add support for OMAP4 PandaBoard Benoit Cousson
2011-09-23 23:21 ` Grant Likely
2011-09-26 12:38 ` Cousson, Benoit
2011-09-23 20:23 ` [PATCH 04/11] arm/dts: Add support for OMAP4 SDP board Benoit Cousson
2011-09-23 20:23 ` [PATCH 05/11] arm/dts: Add initial device tree support for OMAP3 SoC Benoit Cousson
2011-09-23 20:23 ` [PATCH 06/11] arm/dts: Add support for OMAP3 Beagle board Benoit Cousson
2011-09-23 20:23 ` [PATCH 07/11] OMAP2+: board-generic: Add DT support to generic board Benoit Cousson
2011-09-23 23:08 ` Tony Lindgren
2011-09-26 12:35 ` Cousson, Benoit
2011-09-26 21:37 ` Tony Lindgren
2011-09-26 6:32 ` Rajendra Nayak
[not found] ` <4E801C62.5020700-l0cyMroinI0@public.gmane.org>
2011-09-26 9:00 ` Cousson, Benoit
2011-09-23 20:23 ` Benoit Cousson [this message]
2011-09-23 23:12 ` [PATCH 08/11] OMAP2+: board-generic: Add i2c static init Tony Lindgren
2011-09-23 23:47 ` Grant Likely
2011-09-26 16:45 ` Tony Lindgren
2011-09-23 20:23 ` [PATCH 09/11] OMAP2+: l3-noc: Add support for device-tree Benoit Cousson
2011-09-23 20:23 ` [PATCH 10/11] arm/dts: OMAP4: Add a main ocp entry bound to l3-noc driver Benoit Cousson
2011-09-23 22:58 ` Tony Lindgren
2011-09-26 12:13 ` Cousson, Benoit
2011-09-26 21:44 ` Tony Lindgren
2011-09-23 20:23 ` [PATCH 11/11] arm/dts: OMAP3+: Add mpu, dsp and iva nodes Benoit Cousson
2011-09-23 23:26 ` 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=1316809399-19579-9-git-send-email-b-cousson@ti.com \
--to=b-cousson@ti.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=rnayak@ti.com \
--cc=tony@atomide.com \
/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).