diff options
author | Tony Lindgren <tony@atomide.com> | 2013-10-10 18:45:12 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2013-10-10 18:45:12 -0400 |
commit | 8651bd8ce36fb324c218167c970d6734dc825f2c (patch) | |
tree | aef05ce78df2928d6755ef8acaac56072c95449e /arch/arm | |
parent | f1ca2218881eee7a6f7c9659b837a4c412f8fd06 (diff) |
ARM: OMAP2+: Add support for auxdata
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>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/board-generic.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/common.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pdata-quirks.c | 11 |
3 files changed, 13 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index a66575f33973..3017a9d67ac8 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -35,10 +35,7 @@ static struct of_device_id omap_dt_match_table[] __initdata = { | |||
35 | 35 | ||
36 | static void __init omap_generic_init(void) | 36 | static void __init omap_generic_init(void) |
37 | { | 37 | { |
38 | omap_sdrc_init(NULL, NULL); | 38 | pdata_quirks_init(omap_dt_match_table); |
39 | |||
40 | of_platform_populate(NULL, omap_dt_match_table, NULL, NULL); | ||
41 | pdata_quirks_init(); | ||
42 | } | 39 | } |
43 | 40 | ||
44 | #ifdef CONFIG_SOC_OMAP2420 | 41 | #ifdef CONFIG_SOC_OMAP2420 |
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index fd059e02574d..c6aebf0b42d8 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
@@ -288,7 +288,8 @@ static inline void omap4_cpu_resume(void) | |||
288 | 288 | ||
289 | #endif | 289 | #endif |
290 | 290 | ||
291 | void pdata_quirks_init(void); | 291 | void pdata_quirks_init(struct of_device_id *); |
292 | void omap_pcs_legacy_init(int irq, void (*rearm)(void)); | ||
292 | 293 | ||
293 | struct omap_sdrc_params; | 294 | struct omap_sdrc_params; |
294 | extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, | 295 | extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, |
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 9113e7037ae5..76abc5b63d6d 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/gpio.h> | 11 | #include <linux/gpio.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/of_platform.h> | ||
14 | #include <linux/wl12xx.h> | 15 | #include <linux/wl12xx.h> |
15 | 16 | ||
16 | #include "common.h" | 17 | #include "common.h" |
@@ -104,6 +105,10 @@ static void __init omap5_uevm_legacy_init(void) | |||
104 | } | 105 | } |
105 | #endif | 106 | #endif |
106 | 107 | ||
108 | struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { | ||
109 | { /* sentinel */ }, | ||
110 | }; | ||
111 | |||
107 | static struct pdata_init pdata_quirks[] __initdata = { | 112 | static struct pdata_init pdata_quirks[] __initdata = { |
108 | #ifdef CONFIG_ARCH_OMAP3 | 113 | #ifdef CONFIG_ARCH_OMAP3 |
109 | { "nokia,omap3-n9", hsmmc2_internal_input_clk, }, | 114 | { "nokia,omap3-n9", hsmmc2_internal_input_clk, }, |
@@ -120,10 +125,14 @@ static struct pdata_init pdata_quirks[] __initdata = { | |||
120 | { /* sentinel */ }, | 125 | { /* sentinel */ }, |
121 | }; | 126 | }; |
122 | 127 | ||
123 | void __init pdata_quirks_init(void) | 128 | void __init pdata_quirks_init(struct of_device_id *omap_dt_match_table) |
124 | { | 129 | { |
125 | struct pdata_init *quirks = pdata_quirks; | 130 | struct pdata_init *quirks = pdata_quirks; |
126 | 131 | ||
132 | omap_sdrc_init(NULL, NULL); | ||
133 | of_platform_populate(NULL, omap_dt_match_table, | ||
134 | omap_auxdata_lookup, NULL); | ||
135 | |||
127 | while (quirks->compatible) { | 136 | while (quirks->compatible) { |
128 | if (of_machine_is_compatible(quirks->compatible)) { | 137 | if (of_machine_is_compatible(quirks->compatible)) { |
129 | if (quirks->fn) | 138 | if (quirks->fn) |