* [PATCH 0/2] Few more omap DT patches for next merge window
@ 2012-03-01 17:42 Tony Lindgren
2012-03-01 17:42 ` [PATCH 1/2] ARM: OMAP2+: Fix build error when only ARCH_OMAP2/3 or 4 is selected Tony Lindgren
2012-03-01 17:42 ` [PATCH 2/2] ARM: OMAP2+: Remove extra ifdefs for board-generic Tony Lindgren
0 siblings, 2 replies; 3+ messages in thread
From: Tony Lindgren @ 2012-03-01 17:42 UTC (permalink / raw)
To: linux-arm-kernel
Hi all,
Looks like we need one fix to what's currently queued up in
dt-part2 branch for omaps. And we can make board-generic more
readable by cutting down the ifdefs.
Regards,
Tony
---
Tony Lindgren (2):
ARM: OMAP2+: Fix build error when only ARCH_OMAP2/3 or 4 is selected
ARM: OMAP2+: Remove extra ifdefs for board-generic
arch/arm/mach-omap2/board-generic.c | 83 ++++++++++++++++-------------------
1 files changed, 39 insertions(+), 44 deletions(-)
--
Signature
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] ARM: OMAP2+: Fix build error when only ARCH_OMAP2/3 or 4 is selected
2012-03-01 17:42 [PATCH 0/2] Few more omap DT patches for next merge window Tony Lindgren
@ 2012-03-01 17:42 ` Tony Lindgren
2012-03-01 17:42 ` [PATCH 2/2] ARM: OMAP2+: Remove extra ifdefs for board-generic Tony Lindgren
1 sibling, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2012-03-01 17:42 UTC (permalink / raw)
To: linux-arm-kernel
Otherwise we'll get undefined reference to `gic_of_init' or
undefined reference to `omap_intc_of_init'.
This was caused by commit fbf75da733e82bb17a01e1b907b0e40d9c028823
(ARM: OMAP2+: board-generic: Use of_irq_init API).
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/board-generic.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 12f4c5f..25d195f 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -25,6 +25,13 @@
#include "common.h"
#include "common-board-devices.h"
+#if !(defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3))
+#define omap_intc_of_init NULL
+#endif
+#ifndef CONFIG_ARCH_OMAP4
+#define gic_of_init NULL
+#endif
+
static struct of_device_id irq_match[] __initdata = {
{ .compatible = "ti,omap2-intc", .data = omap_intc_of_init, },
{ .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] ARM: OMAP2+: Remove extra ifdefs for board-generic
2012-03-01 17:42 [PATCH 0/2] Few more omap DT patches for next merge window Tony Lindgren
2012-03-01 17:42 ` [PATCH 1/2] ARM: OMAP2+: Fix build error when only ARCH_OMAP2/3 or 4 is selected Tony Lindgren
@ 2012-03-01 17:42 ` Tony Lindgren
1 sibling, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2012-03-01 17:42 UTC (permalink / raw)
To: linux-arm-kernel
We need just one ifdef for each ARCH_OMAP2/3/4.
Also remove the comment about i2c & twl driver as it's
pretty obvious that we still need some platform data
until drivers are converted to device tree.
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/board-generic.c | 76 +++++++++++++++--------------------
1 files changed, 32 insertions(+), 44 deletions(-)
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 25d195f..74e1687 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -43,34 +43,6 @@ static void __init omap_init_irq(void)
of_irq_init(irq_match);
}
-/*
- * XXX: Still needed to boot until the i2c & twl driver is adapted to
- * device-tree
- */
-#ifdef CONFIG_ARCH_OMAP4
-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);
-}
-#endif
-
-#ifdef CONFIG_ARCH_OMAP3
-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);
-}
-#endif
-
static struct of_device_id omap_dt_match_table[] __initdata = {
{ .compatible = "simple-bus", },
{ .compatible = "ti,omap-infra", },
@@ -84,22 +56,6 @@ static void __init omap_generic_init(void)
of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
}
-#ifdef CONFIG_ARCH_OMAP4
-static void __init omap4_init(void)
-{
- omap4_i2c_init();
- omap_generic_init();
-}
-#endif
-
-#ifdef CONFIG_ARCH_OMAP3
-static void __init omap3_init(void)
-{
- omap3_i2c_init();
- omap_generic_init();
-}
-#endif
-
#ifdef CONFIG_SOC_OMAP2420
static const char *omap242x_boards_compat[] __initdata = {
"ti,omap2420",
@@ -139,6 +95,22 @@ MACHINE_END
#endif
#ifdef CONFIG_ARCH_OMAP3
+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 void __init omap3_init(void)
+{
+ omap3_i2c_init();
+ omap_generic_init();
+}
+
static const char *omap3_boards_compat[] __initdata = {
"ti,omap3",
NULL,
@@ -158,6 +130,22 @@ MACHINE_END
#endif
#ifdef CONFIG_ARCH_OMAP4
+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 void __init omap4_init(void)
+{
+ omap4_i2c_init();
+ omap_generic_init();
+}
+
static const char *omap4_boards_compat[] __initdata = {
"ti,omap4",
NULL,
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-01 17:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-01 17:42 [PATCH 0/2] Few more omap DT patches for next merge window Tony Lindgren
2012-03-01 17:42 ` [PATCH 1/2] ARM: OMAP2+: Fix build error when only ARCH_OMAP2/3 or 4 is selected Tony Lindgren
2012-03-01 17:42 ` [PATCH 2/2] ARM: OMAP2+: Remove extra ifdefs for board-generic Tony Lindgren
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).