ARM: OMAP2+: Add support for auxdata
authorTony Lindgren <tony@atomide.com>
Thu, 10 Oct 2013 22:45:12 +0000 (15:45 -0700)
committerTony Lindgren <tony@atomide.com>
Thu, 10 Oct 2013 22:45:12 +0000 (15:45 -0700)
For few things we're still going to be needing platform
data for device tree based drivers. Let's set up auxdata
handling and do it in pdata-quirks.c so we have all the
legacy calls in one place.

Reviewed-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-generic.c
arch/arm/mach-omap2/common.h
arch/arm/mach-omap2/pdata-quirks.c

index a66575f33973f7dc7d332bb0b790d06b1649c21e..3017a9d67ac8cbf4fadb35f1e189a854e2182818 100644 (file)
@@ -35,10 +35,7 @@ static struct of_device_id omap_dt_match_table[] __initdata = {
 
 static void __init omap_generic_init(void)
 {
-       omap_sdrc_init(NULL, NULL);
-
-       of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
-       pdata_quirks_init();
+       pdata_quirks_init(omap_dt_match_table);
 }
 
 #ifdef CONFIG_SOC_OMAP2420
index fd059e02574dfc3d80e42a3eb27e93a83311e31e..c6aebf0b42d8d02468171fce20301eac3a9df3c6 100644 (file)
@@ -288,7 +288,8 @@ static inline void omap4_cpu_resume(void)
 
 #endif
 
-void pdata_quirks_init(void);
+void pdata_quirks_init(struct of_device_id *);
+void omap_pcs_legacy_init(int irq, void (*rearm)(void));
 
 struct omap_sdrc_params;
 extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
index 9113e7037ae53385fa88110b0e6ea2d6ebd6e9fd..76abc5b63d6d1952af6f96df4ec95ad0bed0f780 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/gpio.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/of_platform.h>
 #include <linux/wl12xx.h>
 
 #include "common.h"
@@ -104,6 +105,10 @@ static void __init omap5_uevm_legacy_init(void)
 }
 #endif
 
+struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
+       { /* sentinel */ },
+};
+
 static struct pdata_init pdata_quirks[] __initdata = {
 #ifdef CONFIG_ARCH_OMAP3
        { "nokia,omap3-n9", hsmmc2_internal_input_clk, },
@@ -120,10 +125,14 @@ static struct pdata_init pdata_quirks[] __initdata = {
        { /* sentinel */ },
 };
 
-void __init pdata_quirks_init(void)
+void __init pdata_quirks_init(struct of_device_id *omap_dt_match_table)
 {
        struct pdata_init *quirks = pdata_quirks;
 
+       omap_sdrc_init(NULL, NULL);
+       of_platform_populate(NULL, omap_dt_match_table,
+                            omap_auxdata_lookup, NULL);
+
        while (quirks->compatible) {
                if (of_machine_is_compatible(quirks->compatible)) {
                        if (quirks->fn)